Comment on page
RewardEthToken
StakeWise RewardEthToken smart contract details.
The RewardEthToken is an ERC-20 contract. It reflects the rewards accumulated by the stakers in the form of
prETH
tokens. The tokens are mapped 1 to 1 to ETH. The total supply of
prETH
is the amount that is above the effective balance of all the validators registered for the StakeWise Permissioned Pool. Interactions with the RewardEthToken contract are limited only to the addresses included in the WhiteListManager contract.
Checkpoints are used to keep track of the staker's previously accumulated rewards and calculate the current reward. The checkpoint is updated in the following scenarios:
psETH
amount has changed. The staker starts earning a bigger or smaller portion of the rewards because he now holds more/lesspsETH
.- The staker has transferred the
prETH
tokens to a different address. The staker will continue earning rewards as usual but hisprETH
balance will decrease by the amount of transferredprETH
.
Every checkpoint stores:
rewardPerToken
- the number of earnedprETH
tokens per everypsETH
tokenreward
- the staker's totalprETH
balance calculated based on therewardPerToken

The Permissioned Pool's rewards are updated periodically by the Oracles contract using the
updateTotalRewards
function in the RewardEthToken contract. When the total rewards are updated, the new value of rewardPerToken
is calculated.If the
rewardPerToken
is smaller than the previous value, it means that the Permissioned Pool's validators have received a penalty. Every staker's current reward gets reduced proportionally to their share of the total supply of psETH
. If the
rewardPerToken
is greater than the previous value, it means that the Permissioned Pool's rewards have increased. The amount of prETH
tokens of every psETH
holder is then increased based on their share of the total supply of psETH
. The total amount of
prETH
tokens for each individual staker is calculated based on the following formula when calling the balanceOf
function:where:
In situations where
psETH
lands in a contract that does not support the redistribution of prETH
that it begins to accumulate, StakeWise governance (or Admin) can disable the accrual of prETH
to that contract by calling the setRewardsDisabled
function in the RewardEthToken contract. The function will divert all the prETH
that would be accruing (and unclaimable) from the contract with psETH
into the MerkleDistributor contract. Last modified 1yr ago