Morpho Blue Rewards Emission
1. Jump on the Rewards Emission Data Provider contract:
E.g: Ethereum mainnet address is 0xf27fa85b6748c8a64d4b0d3d6083eb26f18bde8e
The EmissionDataProvider
contract provides a streamlined method for tracking emissions of a specific ERC20 token within a rewards program operated on Morpho Blue. It allows users to set emission rates for various reward tokens in different markets. Full repository here.
2. Fill all attributes on the rewardsEmissions
function:
Provide the following details in the rewardsEmissions
function:
-
sender
: The address initiating the rewards emission.
E.g: 0x640428D38189B11B844dAEBDBAAbbdfbd8aE0143 (morpho-operator.eth). -
urd
: The address of the Universal Rewards Distributor.
E.g: 0x678dDC1d07eaa166521325394cDEb1E4c086DF43 (URD distributing MORPHO). -
rewardToken
: The address of the token used as a reward.
E.g: 0x9994E35Db50125E0DF82e4c2dde62496CE330999 (MORPHO token). -
marketId
: The identifier for the specific market.
E.g: 0xc54d7acf14de29e0e5527cabd7a576506870346a78a11a6762e2cca66322ec41 (wstETH/WETH (94.5%, AdaptiveCurve) market)
- Most information is available in the Addresses section of the documentation.
- Rates are defined annually. Ensure you understand the terms by reading the README section of the repository.
3. Computation:
To get the reward emission rate a user can expect, the formula for $1000 deposited is as follows:
Where:
rewardsEmission
: One of the return values (supplyRewardTokensPerYear
,borrowRewardTokensPerYear
, orcollateralRewardTokensPerYear
).tokenPriceUSD
: The USD value of the loan token for supply/borrow computations, or the collateral token for collateral rate computations.underlyingDecimals
: The number of decimals of the token (e.g., WETH has 18 decimals).totalUnderlyingAssets
: The total assets in the market, on the supply, collateral, or borrow side.
Consider the wstETH/WETH (94.5%) market from the Addresses section with this ID: 0xc54d7acf14de29e0e5527cabd7a576506870346a78a11a6762e2cca66322ec41
Query the market
function on the Morpho Blue contract to compute: