Rewards Emission Data Provider
Contract Overview
The EmissionDataProvider
contract orchestrates the management and tracking of ERC20 token emission rates within the Morpho rewards programs. It enables precision in setting emission rates for different rewards tokens in various markets, directly associating these rates with a Universal Rewards Distributor (URD) for the effective distribution of rewards.
Functions
setRewardsEmission
Sets the emission rates for a specific reward token within a market.
function setRewardsEmission(
address rewardToken,
address urd,
Id market,
RewardsEmission calldata rewardsEmission
) public;
Allows users to define or adjust the emission rates associated with a reward token in a given market.
Parameters
Name | Type | Description |
---|---|---|
rewardToken | address | The address of the reward token. |
urd | address | The address of the Universal Rewards Distributor (URD). |
market | Id | The identifier of the market where rewards are distributed. |
rewardsEmission | RewardsEmission | The structured data representing emission rates for supply, borrow, and collateral. |
Events
RewardsEmissionSet
Emitted when the rewards emission rates are defined or updated.
event RewardsEmissionSet(
address indexed rewardToken,
Id indexed market,
address indexed sender,
address urd,
RewardsEmission rewardsEmission
);
Parameters
Name | Type | Description |
---|---|---|
rewardToken | address | The address of the reward token. |
market | Id | The identifier of the market where rewards are distributed. |
sender | address | The address of the user who sets the emission rate. |
urd | address | The address of the Universal Rewards Distributor (URD). |
rewardsEmission | RewardsEmission | The structured data representing emission rates for supply, borrow, and collateral. |
Roles
General Users
Any user can interact with the setRewardsEmission
function to propose new rates for rewards tokens across various markets. However, the acceptance and utilization of these rates depend on the governance structure and trustworthiness of the Universal Rewards Distributor with the right owner and sender.