getAssetData()
method, passing in the associated aToken or debtToken address of the incentivised asset. To get a list of associated tokens per asset, see also getReserveTokensAddresses()
in the Protocol Data Provider.getRewardsBalance()
method, passing in the relevant token addresses (aTokens and/or debtTokens) as an array.claimRewards()
method, passing in the relevant token addresses (aTokens and/or debtTokens) as an array. The msg.sender
must match the user's address that has accrued the rewards.setClaimer()
method, enabling the caller to claim on the user's behalf.claimRewardsOnBehalf()
method, passing in the relevant token addresses (aTokens and/or debtTokens) as an array. The msg.sender
must have been previously set via setClaimer()
.withdraw()
on the WMATIC contract.APY = normalizedEmissionPerSecond * rewardTokenPriceInEth * SECONDS_PER_YEAR / normalizedTotalTokenSupply
normalizedEmissionPerSecond = emissionPerSecond/RWARD_TOKEN_DECIMALS
normalizedTotalTokenSupply = tokenTotalSupplyNormalized * tokenPriceInEth
,where token is the incentivized a/s/v token and token price is same as underlying asset's price. function claimRewards(address[] calldata assets, uint256 amount, address to)
assets
, accumulating any pending rewards.assets
getReserveTokensAddresses()
in the Protocol Data Provider.amount
to
function claimRewardsOnBehalf(address[] calldata assets, uint256 amount, address user, address to)
assets
, accumulating any pending rewards, on behalf of user
.assets
getReserveTokensAddresses()
in the Protocol Data Provider.amount
user
to
function setClaimer(address user, address caller)
caller
to claim all rewards on behalf of the user
. This can only be set via Governance.user
caller
getAssetData()
is currently available only on ethereum markets. In case you are working on Polygon markets (main or mumbai), please read data from the public mapping assets
directly 😅function getAssetData(address asset)
asset
getReserveTokensAddresses()
in the Protocol Data Provider. function getClaimer(address user)
user
function getRewardsBalance(address[] assets, address user)
user
for assets.
assets
getReserveTokensAddresses()
in the Protocol Data Provider.user
function getUserAssetData(address user, address asset)
user
on a distribution from asset
user
asset
getReserveTokensAddresses()
in the Protocol Data Provider. function getUserUnclaimedRewards(address user)
user
for their last action in the protocol.user
function getDistributionEnd()