Claim Rewards
To claim rewards, a staker can call RewardsManager.claimRewards
:
which transfers all of the msg.sender
's accrued rewards to the receiver_
address.
Note that claiming rewards claims accrued rewards from all reward pools.
Claim rewards mechanics
On claiming rewards, we follow the following steps for each reward pool:
Drip from the reward pool since time may have passed since the last drip.
Compute and update the
ClaimableRewardsData
for the (stake pool, reward pool) pair.Update the
UserRewardsData
for the (stake pool, reward pool) pair.Transfer the user's
accruedRewards
from the reward pool to thereceiver_.
Reset
accruedRewards
to 0.Emit a
ClaimedRewards
event.
Last updated