Skip to main content

Rewards Emission Data Provider

Contract Overview

The EmissionDataProvider contract orchestrates the management and tracking of ERC20 token emission rates within the Morpho Blue 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

NameTypeDescription
rewardTokenaddressThe address of the reward token.
urdaddressThe address of the Universal Rewards Distributor (URD).
marketIdThe identifier of the market where rewards are distributed.
rewardsEmissionRewardsEmissionThe 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

NameTypeDescription
rewardTokenaddressThe address of the reward token.
marketIdThe identifier of the market where rewards are distributed.
senderaddressThe address of the user who sets the emission rate.
urdaddressThe address of the Universal Rewards Distributor (URD).
rewardsEmissionRewardsEmissionThe 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.