All rewards type enabled in Themis V2 are managed by RewardsDistributor.sol . This is the contract used to check rewards data, user’s rewards balance and for claiming the rewards.
getRewardsData (asset, reward)
Get the data of the reward emitted for the asset.
Call Params
Return Value
getRewardsByAsset (asset)
Get the list of rewards activated for the asset
claimRewards (assets, amount, to, reward)
Claims single reward type specified by reward for the list of assets. Rewards are received by to address.
claimRewardsOnBehalfOf (assets, amount, user, to, reward)
Claims single reward type specified by reward for the given list of assets on behalf of the user . Rewards are received by to address.
The msg.sender must be an authorised claimer set using
setClaimer()
method, via Governance Vote.
claimRewardsToSelf (assets, amount, reward)
Claims single reward type accrued by the msg.sender
specified by reward for the given list of assets. Rewards are received by msg.sender
.
claimAllRewards (assets, to)
Claims all rewards for the list of assets. Rewards are received by to address.
claimAllRewardsOnBehalfOf (assets, user, to)
Claims all rewards for the given list of assets on behalf of the user . Rewards are received by to address.
The msg.sender must be an authorised claimer set using setClaimer()
method, via Governance Vote.
claimAllRewardsToSelf (assets)
Claims all rewards accrued by msg.sender for the given list of assets. Rewards are received by msg.sender .
Name | Type |
---|---|
Name | Type |
---|---|
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 |
---|---|---|
rewards
mapping(address ⇒ RewardData)
availableRewards
address[]
decimals
uint8
emissionPerSecond
uint88
index
uint104
lastUpdateTimestamp
uint32
distributionEnd
uint32
usersIndex
mapping(address => uint256)
asset
address
address of the t/s/v Tokens for which incentive information is requested
reward
address
address of the reward token
uint104
index of the reward token
uint88
total reward tokens awarded per second for the given asset pool
uint32
unix timestamp of last time the emissions were updated
uint32
unix timestamp of when the emissions will end
asset
address
address of the t/s/vTokens for which incentive rewards list is requested
address[]
list of reward token addresses activated for the given asset
assets
address[]
address list of assets for which rewards are being claimed. Pass t/s/vToken addresses
amount
uint256
amount to claim, expressed in wei. Pass MAX_UINT to claim entire unclaimed reward balance
to
address
address which will receive the reward tokens
reward
address
address of the reward token being claimed. eg. stkAthemis
assets
address[]
address list of assets for which rewards are being claimed. Pass t/s/vToken addresses
amount
uint256
amount to claim, expressed in wei. Pass MAX_UINT to claim entire unclaimed reward balance
user
address
address of user who’s rewards are being claimed
to
address
address which will receive the reward tokens
reward
address
address of the reward token being claimed. eg. stkAthemis
assets
address[]
address list of assets for which rewards are being claimed. Pass t/s/vToken addresses
amount
uint256
amount to claim, expressed in wei. Pass MAX_UINT to claim entire unclaimed reward balance
reward
address
address of the reward token being claimed. eg. stkAthemis
assets
address[]
address list of assets for which rewards are being claimed. Pass t/s/vToken addresses
to
address
address which will receive the reward tokens
assets
address[]
address list of assets for which rewards are being claimed. Pass t/s/vToken addresses
user
address
address of user who’s rewards are being claimed
reward
address
address of the reward token being claimed. eg. stkTMS
assets
address[]
address list of assets for which rewards are being claimed. Pass t/s/vToken addresses