EOL Extra Rewards
Before diving in, make sure to read Extra Rewards Settlement & Distribution to get a solid understanding of how extra rewards from EOL are distributed and claimed.
miAssets are yield-bearing tokens that automatically reflect the "yield" and "loss" from EOL, requiring no additional integration. However, users need to explicitly claim "extra rewards". Extra rewards accumulate in any account (EOA or CA) holding miAssets. It's important to note that when a user deposits miAssets into dApp contracts, the extra rewards accumulate in those contracts. This scenario closely parallels the voting power situation described in EOL Governance.
There are two contracts for claiming extra rewards:
TWABRewardDistributor
MerkleRewardDistributor
In the public testnet, MerkleRewardDistributor
will be used exclusively for extra rewards redistribution. The majority of extra rewards will be distributed via the TWABRewardDistributor
. The MerkleRewardDistributor
will handle only redistributed extra rewards.
For most use cases, it's sufficient to integrate solely with the TWABRewardDistributor
.
// See full code: https://github.com/mitosis-org/protocol-public/blob/main/src/interfaces/hub/reward/ITWABRewardDistributor.sol
interface ITWABRewardDistributor {
function claimableAmount(address eolVault, address account, address reward, uint48 toTimestamp) external view returns (uint256);
function claim(address eolVault, address receiver, address reward, uint48 toTimestamp) external returns (uint256 claimedAmount);
}
However, there are a few challenges to consider:
- Your dApp might consist of multiple contracts, meaning extra rewards are accumulated across several contracts. This requires each contract to claim them individually.
- You might prefer that the contracts don't claim extra rewards 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 offer a method to delegate the extra rewards 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 the extra rewards back to your dApp's users, refer to Redistribution of Voting Power & Extra Rewards. Keep in mind that if you decide to redistribute extra rewards, your contract won't need to integrate with Reward Distributor, as it won't claim the rewards itself.