IAaveIncentivesController
IAaveIncentivesController
RewardsAccrued
event RewardsAccrued(address user, uint256 amount)
RewardsClaimed
event RewardsClaimed(address user, address to, uint256 amount)
RewardsClaimed
event RewardsClaimed(address user, address to, address claimer, uint256 amount)
ClaimerSet
event ClaimerSet(address user, address claimer)
getAssetData
function getAssetData(address asset) external view returns (uint256, uint256, uint256)
setClaimer
function setClaimer(address user, address claimer) external
Whitelists an address to claim the rewards on behalf of another address
Parameters
Name | Type | Description |
---|
user | address | The address of the user |
claimer | address | The address of the claimer |
getClaimer
function getClaimer(address user) external view returns (address)
Returns the whitelisted claimer for a certain address (0x0 if not set)
Parameters
Name | Type | Description |
---|
user | address | The address of the user |
Return Values
Name | Type | Description |
---|
[0] | address | The claimer address |
function configureAssets(address[] assets, uint256[] emissionsPerSecond) external
Configure assets for a certain rewards emission
Parameters
Name | Type | Description |
---|
assets | address[] | The assets to incentivize |
emissionsPerSecond | uint256[] | The emission for each asset |
handleAction
function handleAction(address asset, uint256 userBalance, uint256 totalSupply) external
Called by the corresponding asset on any update that affects the rewards distribution
Parameters
Name | Type | Description |
---|
asset | address | The address of the user |
userBalance | uint256 | The balance of the user of the asset in the lending pool |
totalSupply | uint256 | The total supply of the asset in the lending pool |
getRewardsBalance
function getRewardsBalance(address[] assets, address user) external view returns (uint256)
Returns the total of rewards of an user, already accrued + not yet accrued
Parameters
Name | Type | Description |
---|
assets | address[] | |
user | address | The address of the user |
Return Values
Name | Type | Description |
---|
[0] | uint256 | The rewards |
claimRewards
function claimRewards(address[] assets, uint256 amount, address to) external returns (uint256)
Claims reward for an user, on all the assets of the lending pool,
accumulating the pending rewards
Parameters
Name | Type | Description |
---|
assets | address[] | |
amount | uint256 | Amount of rewards to claim |
to | address | Address that will be receiving the rewards |
Return Values
Name | Type | Description |
---|
[0] | uint256 | Rewards claimed |
claimRewardsOnBehalf
function claimRewardsOnBehalf(address[] assets, uint256 amount, address user, address to) external returns (uint256)
Claims reward for an user on behalf, on all the assets of the
lending pool, accumulating the pending rewards. The caller must
be whitelisted via "allowClaimOnBehalf" function by the RewardsAdmin role manager
Parameters
Name | Type | Description |
---|
assets | address[] | |
amount | uint256 | Amount of rewards to claim |
user | address | Address to check and claim rewards |
to | address | Address that will be receiving the rewards |
Return Values
Name | Type | Description |
---|
[0] | uint256 | Rewards claimed |
getUserUnclaimedRewards
function getUserUnclaimedRewards(address user) external view returns (uint256)
returns the unclaimed rewards of the user
Parameters
Name | Type | Description |
---|
user | address | the address of the user |
Return Values
Name | Type | Description |
---|
[0] | uint256 | the unclaimed user rewards |
getUserAssetData
function getUserAssetData(address user, address asset) external view returns (uint256)
returns the unclaimed rewards of the user
Parameters
Name | Type | Description |
---|
user | address | the address of the user |
asset | address | The asset to incentivize |
Return Values
Name | Type | Description |
---|
[0] | uint256 | the user index for the asset |
REWARD_TOKEN
function REWARD_TOKEN() external view returns (address)
for backward compatibility with previous implementation of the Incentives controller
PRECISION
function PRECISION() external view returns (uint8)
for backward compatibility with previous implementation of the Incentives controller
DISTRIBUTION_END
function DISTRIBUTION_END() external view returns (uint256)
Gets the distribution end timestamp of the emissions