getTotalRewardsBalance()
to fetch the pending rewards. To claim the rewards, call claimRewards()
.stakersColldowns()
+ COOLDOWN_SECONDS()
.UNSTAKE_WINDOW()
of time to redeem their tokens. If they do not redeem before this time period has elapsed, then the cool down timer is reset and they will need to activate the cool down again.coolDown()
period, as detailed below.onBehalfOf
address).msg.sender
must already have a balance of AAVE token.onBehalfOf
msg.sender
if the stkAAVE should be sent to the same calling address.amount
amount
of AAVE rewards that the msg.sender
has accrued, with the option of sending the rewards to a different account.to
msg.sender
if the AAVE rewards should be sent to the same calling address.amount
uint(-1)
to claim all outstanding rewards for the user.stakersCooldowns()
+ COOLDOWN_SECONDS()
for their address must be greater than the current unix block timestamp, andredeem()
before the sum of stakersCooldowns()
+ COOLDOWN_SECONDS()
+UNSTAKE_WINDOW()
has passed.to
msg.sender
if the AAVE should be sent to the same calling address.amount
uint(-1)
to redeem the entire balance of the user.staker
activated the cool down by calling cooldown()
.COOLDOWN_SECONDS
in unix time has passed.COOLDOWN_SECONDS
value is 864000 seconds (i.e. 10 days). This value should always be checked directly from the contracts.redeem()
their stake once a cooldown()
period has been completed.UNSTAKE_WINDOW
value is 172800 seconds (i.e. 2 days). This value should always be checked directly from the contracts.function getNextCooldownTimestamp(uint256 fromCooldownTimestamp, uint256 amountToReceive, address toAddress, uint256 toBalance) public returns (uint256)
- code​stake()
), while they already have a cool down period active:UNSTAKE_WINDOW
), then the cool down period will remain expired.redeem()
. This will reset the cool down timestamp.claimRewards()
. The cool down timestamp is not affected.msg.sender
remains the same.msg.sender
, a weighted average is calculated with the current cool down timestamp of the user.msg.sender
have valid cool down periods, and the msg.sender
cool down period ends before the receiver, then the receiver's cool down period remains the same.fromCooldownTimestamp
amountToReceive
toAddress
toBalance
staker