EOL Governance
To get started, familiarize yourself with EOL Governance as outlined in EOL Governance.
Any account (EOA or CA) holding miAssets has voting power in EOL Governance proportional to its miAsset holdings.
It's crucial to note that when a user deposits miAssets into a dApp contract, that contract acquires the voting power.
Therefore, if you want to leverage this voting power, your contract should actively participate in EOL Governance by casting votes.
There are two key contracts for EOL Governance:
EOLProtocolGovernor
- Integrate with this contract to participate in initiation voting.
EOLGaugeGovernor
- Integrate with this contract to participate in gauge voting.
// See full code: https://github.com/mitosis-org/protocol-public
enum VoteOption {
None,
Yes,
No,
Abstain
}
interface IEOLProtocolGovernor {
function castVote(uint256 proposalId_, VoteOption option) external;
}
interface IEOLGaugeGovernor {
function castVote(uint256 chainId, uint32[] memory gauges) external;
}
However, there are a few challenges to consider:
- Your dApp might consist of multiple contracts, which means its voting power is distributed across several contracts. Consequently, all contracts would need to cast votes individually.
- You may prefer that the contracts don't cast votes directly, as this would require adding a function to your contract that can only be called by a permitted actor.
To address these issues, we provide a method to delegate the voting power of your dApp's contracts to a single account. This can significantly streamline management. For more details, check out EOL Delegate.
If you want to redistribute voting power back to your users, refer to Redistribution of Voting Power & Extra Rewards.
Keep in mind that if you decide to redistribute voting power, your contract won't need to integrate with EOL Governance, as it won't be casting votes itself.