Euler finance
App

Introducing Euler’s Governance Proposal Creation Tool (for EulerDAO Phase 1)

Introducing Euler’s Governance Proposal Creation Tool (for EulerDAO Phase 1)

Learn how to create on-chain proposals during EulerDAO’s phase 1 launch.

Introduction

In the first phase of the EulerDAO Governance launch actions performed directly on the Euler protocol smart contracts will be executed by the Euler team on behalf of the community. In this case, all on-chain governance proposals will point to or target a function in a stub smart contract (in place of the Euler protocol smart contracts).

Examples of the kinds of decisions token holders might vote on include proposals to modify:

  • The tier of an asset
  • Collateral and borrow factors
  • Price oracle parameters
  • Reactive interest rate model parameters
  • Reserve factors

Should the proposal become successful and executed, the target function will then be executed (via the TimelockController controller smart contract). It will emit the proposal description string and proposal transaction data, which will then be validated by the Euler team and executed against the Exec module via the Euler multisig (on OpenZeppelin Defender).

Hence, the governorOnly() modifier in the Euler Governance module will be checking that the caller of its functions is the Euler mulisig and not the TimelockController smart contract of the DAO.

To create the proposal transaction data, a tool has been implemented which will help the proposal creator to auto-generate it depending on what actions should be executed. The proposal transaction data is simply an encoded version of the on-chain transaction to the Exec module’s batchDispatch function.

The rest of the article will describe the process of creating the proposal transaction data on Euler’s governance proposal creation tool and using the generated proposal transaction data to create an on-chain proposal on the Tally governance dashboard.

Section 1: Creating the proposal transaction data for Euler’s Exec Module

Step 1

Navigate to the proposal transaction data creation tool at: https://proposal.euler.finance/

The web application should look like the following image:

Step 2

The tool requires MetaMask to be installed in your browser.

Switch your MetaMask wallet to mainnet. The tool currently supports mainnet and our Ropsten testnet Exec modules. It will create the appropriate transaction data to be executed depending on the selected network.

Step 3

At the top left of the window, there is a text field for proposal description and below that is a dropdown menu representing a list of tokens, e.g., USDC, DAI, etc.

At the left side of the window, under the token list, there is a set of dropdown menus and text fields which will be autopopulated with the current token configurations (if the token has an activated market on Euler).

To create the proposal transaction data, the proposer needs to enter a proposal description and then select a token from the token list. Once selected, the rest of the fields will be automatically populated with the current configuration of the token or market on Euler if it has an activated market.

The image below shows the proposal description and the fields on the left populated with the current market configuration for USDC on Euler.

Step 4

The proposer can then make modifications and generate the proposal transaction hex data to be executed via the Euler Exec module (batchDispatch() function) and use this hex data as the input to the target function in the stub smart contract when creating a proposal on Tally (this is described in Section 2 below).

For example purposes, let’s change the borrow factor of USDC to 0.6. To do this, simply change the collateral factor from 0.9 to 0.6 in the text field for collateral factor and click on “CREATE PROPOSAL DATA”. Once this is done, the markdown table should show the desired changes to the asset. The batch item’s Hex transaction data is also shown, which is needed for the on-chain governance proposal stub smart contract on Tally.

Note: This process can be repeated for multiple tokens and configurations (or multiple configurations of the same token). They will be added in a batch and encoded to form the transaction data for the batchDispatch functionality in the Euler Exec module.

For example, select DAI from the token list and change the borrow factor of DAI to 0.3. Again, the fields are automatically populated when DAI is selected and when the borrow factor changes to 0.3 and click on “CREATE PROPOSAL DATA”. The list of configuration updates is updated to reflect the change that are being made to DAI, while the USDC update information remains. The transaction hex is also updated.

Step 5

To validate the selected updates, copy the auto-generated hex under batch items hex TX data (under batch items, which is under proposal description) and click on “DEBUG TX HEX DATA” and paste the copied hex into the text field.

The tool should also decode the hex and show a markdown with the updates the Euler team will be applying to the selected tokens once the proposal gets executed. The Euler team will also follow this process to make sure that the proposal description reflects the updates to be made before executing the transaction in the Exec module on behalf of the community.

As shown in the image above, the hex data is decoded to show the selected updates to be applied to DAI and USDC. There is a close button at the bottom right of the window to close the debug modal and return to the main page.

At this point, the proposal transaction data can be used to create an on-chain proposal on Tally. After the voting period, if successfully executed, the decoded hex data will be submitted to OpenZeppelin Defender for the Euler team to execute on behalf of the community.

Please ask any questions or leave feedback while using the tool in the Discord Governance channel.

Section 2: Using the Auto-Generated transaction data for Euler’s Exec Module to Create an on-chain proposal for the DAO on Tally

At this point, the user should now have the proposal transaction hex data needed for the Euler Exec module’s batchDispatch function. The next step is to create the on-chain proposal for members of the community (and delegates) to vote on.

Below is a description of the steps required to accomplish this goal.

Step 1

Head over to the EulerDAO dashboard on Tally and connect a MetaMask wallet.

Step 2

Click on “Create new proposal” at the right corner of the window.

It should then lead to the proposal creation window below.

Click on “Continue” to move onto the next step (“Name your proposal”).

Step 3

Enter a proposal title and description and click “Continue”.

Step 4

In the next section, the user will be required to specify the governance proposal actions, i.e., target smart contract, target function and parameters. The Tally dashboard allows users to specify multiple actions in a single proposal which will be called/executed if the proposal is successful and executed.

To add the proposal transaction hex from Section 1 and set the governance stub contract as the target smart contract, click on “Add custom action” => enter the stub smart contract address as the target smart contract. Then select the “executeProposal” function from the dropdown menu under “contract method” as the target function in the target smart contract.

Here’s the interesting part: enter the required parameters, i.e., proposal description string and the proposalData which is your proposal transaction hex data from Section 1.

Step 5

Once completed, click continue and review the proposal. If the result looks accurate, click “Submit on-chain” which will open a MetaMask pop-up window to sign the transaction to create the proposal on-chain, via the Governance smart contract.

About Euler

Euler is a capital-efficient permissionless lending protocol that helps users to earn interest on their crypto assets or hedge against volatile markets without the need for a trusted third-party. Euler features a number of innovations not seen before in DeFi, including permissionless lending markets, reactive interest rates, protected collateral, MEV-resistant liquidations, multi-collateral stability pools, sub-accounts, risk-adjusted loans, and much more. For more information, visit euler.finance.

Join the Community

Follow us on Twitter. Join our Discord. Keep in touch on Telegram (community, announcements). Check out our website.

This content is provided by Euler Labs, Ltd., for informational purposes only and should not be interpreted as investment, tax, legal, insurance, or business advice. Euler Labs, Ltd, is an independent software development company.

Neither Euler Labs, Ltd. nor any of its owners, members, directors, officers, employees, agents, independent contractors or affiliates are registered as an investment advisor, broker-dealer, futures commission merchant or commodity trading advisor or are members of any self-regulatory organization.

The information provided herein is not intended to be, and should not be construed in any manner whatsoever, as personalized advice or advice tailored to the needs of any specific person. Nothing on the Website should be construed as an offer to sell, a solicitation of an offer to buy, or a recommendation for any asset or transaction.

Euler Labs Ltd, does not represent or speak for on or behalf of Euler Finance or the users of Euler Finance. The commentary and opinions provided by Euler Labs Ltd., are for general informational purposes only, are provided “AS IS,” and without any warranty of any kind. To the best of our knowledge and belief, all information contained herein is accurate and reliable, and has been obtained from public sources we believe to be accurate and reliable at the time of publication.

All content provided is presented only as of the date published or indicated, and may be superseded by subsequent events or for other reasons. As events markets change continuously, previously published information and data may not be current and should not be relied upon.

Keep up to date.

Euler Newsletter

You can unsubscribe at any time. Privacy Policy.