RewardsController*
Last updated
Last updated
Abstract contract template to build Distributors contracts for ERC20 rewards to protocol participants
function setClaimer(address user, address claimer) external
Whitelists an address to claim the rewards on behalf of another address
Name | Type | Description |
---|---|---|
function setTransferStrategy(address reward, ITransferStrategyBase transferStrategy) external
Sets a TransferStrategy logic contract that determines the logic of the rewards transfer
Name | Type | Description |
---|---|---|
function setRewardOracle(address reward, IEACAggregatorProxy rewardOracle) external
Sets an Oracle contract to enforce rewards with a source of value.
At the moment of reward configuration, the Incentives Controller performs a check to see if the reward asset oracle is compatible with IEACAggregator proxy. This check is enforced for integrators to be able to show incentives at the current UI without the need to setup an external price registry
function configureAssets(RewardsDataTypes.RewardsConfigInput[] memory config) external
Configure assets to incentivize with an emission of rewards per second until the end of distribution.
function handleAction( address user, uint256 userBalance, uint256 totalSupply ) external;
Called by the corresponding asset on any update that affects the rewards distribution.Default borrow type m0.
function handleAction( address user, uint256 m0UserBalance, uint256 m1UserBalance, uint256 m0TotalSupply, uint256 m1totalSupply ) external
Called by the corresponding asset on any update that affects the rewards distribution
function claimRewards( address[] calldata assets, uint256 amount, address to, address reward ) external returns (uint256,uint256);
Claims reward for a user to the desired address, on all the assets of the pool, accumulating the pending rewards
function claimRewardsOnBehalf( address[] calldata assets, uint256 amount, address user, address to, address reward ) external returns (uint256,uint256);
Claims reward for a user on behalf, on all the assets of the pool, accumulating the pending rewards. The caller must be whitelisted via "allowClaimOnBehalf" function by the RewardsAdmin role manager
function claimRewardsToSelf( address[] calldata assets, uint256 amount, address reward, uint256 borrowType ) external returns (uint256,uint256);
Claims reward for msg.sender, on all the assets of the pool, accumulating the pending rewards
@return The m0 amount of rewards claimed
@return The m1 amount of rewards claimed
function claimAllRewards(address[] calldata assets, address to) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts);
Claims all rewards for a user to the desired address, on all the assets of the pool, accumulating the pending rewards
function claimAllRewardsOnBehalf( address[] calldata assets, address user, address to, uint256 borrowType ) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts);
function claimAllRewardsToSelf(address[] calldata assets,uint256 borrowType) external returns (address[] memory rewardsList, uint256[] memory claimedAmounts);
Claims all reward for msg.sender, on all the assets of the pool, accumulating the pending rewards
function getRewardOracle(address reward) external view returns (address)
Get the price aggregator oracle address
function getClaimer(address user) external view returns (address)
Returns the whitelisted claimer for a certain address (0x0 if not set)
function getTransferStrategy(address reward) external view returns (address)
Returns the Transfer Strategy implementation contract address being used for a reward address
function getTransferStrategy(address reward) external view returns (address)
Returns the Transfer Strategy implementation contract address being used for a reward address
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|