sETH2 (staking ETH) and rETH2 (reward ETH) are tokens that are issued to stakers in StakeWise Pool. Built on the ERC-20 standard, these tokens represent the growth of one's stake when they're held and can be transferred or exchanged for other tokens to exit from staking or utilize yield opportunities in DeFi protocols.
One of the main advantages of StakeWise tokens is that they reflect deposits and rewards separately, which allows users to separate their holdings into different risk classes, avoid impermanent loss when providing liquidity and potentially compound their returns.
sETH2 (staking ETH) is a token that represents users' deposits in StakeWise Pool in a 1:1 ratio. Hence, sETH2 is always backed by ETH that has entered our Pool contract. With every new ETH deposit into the Pool, StakedETHToken contract updates
totalSupply and mints an equal amount of sETH2 to the depositor.
rETH2 (reward ETH) is a token that represents users' ETH rewards in StakeWise Pool in a 1:1 ratio. These rewards do not physically exist, but their record is stored in the Beacon Chain, so they can be measured and used to back rETH2 in a 1:1 ratio. The record about the Pool's rewards specifically is calculated from the balances of StakeWise validators. The balances are measured from the Beacon Chain and submitted to the RewardETHToken contract using Oracles.
The Beacon Chain exists separately from Eth1, so information about the rewards is not accessible on-chain. Hence, communication about the amount of rewards between the Beacon Chain and the RewardETHToken contract is done using Oracles.
totalSupply in the contract is updated every 24 hours. This should pose no problems to stakers who utilize their rETH2 in DeFi protocols since even during periods of high yield in Ethereum 2.0 rewards earned in a single 24-hour period are minuscule (6/10^4 %). This makes potentially missing out on them inconsequential for one's long-term earnings.
The Oracle nodes are distributed geographically and they read balances of all the Pool validators from the Beacon Chain and submit them on-chain simultaneously but independently. As soon as 3 out of 4 Oracle nodes submit the same data about the rewards, the total supply of RewardETHToken contract is updated. The update happens every 24 hours.
Upon Phase 2, holders of sETH2 and rETH2 will be able to exchange their tokens for ETH from the StakeWise Pool by burning their tokens. The exchange will happen at a 1:1 ratio, where sETH2 and rETH2 can be exchanged for 1 ETH each.
sETH2 can be transferred to any address on the Ethereum network, including a contract, where it will continue accruing rETH2. However, the design of some contracts may not allow withdrawing accrued rETH2, forcing one to forego the rewards for the period that sETH2 is stored in such a contract. Typically, these are contracts that issue tokens to represent your share of the total value locked in them.
To avoid this challenge, StakeWise whitelists the most popular of such contracts and allows stakers to continue earning rewards even when their sETH2 is assigned to the whitelisted contract address. This is done by staking the tokens minted for the sETH2 holder by the whitelisted contract. Once sETH2 migrates from the whitelisted contract to another address, rETH2 automatically starts accruing to that address, by the same logic as before.
Staker wants to provide liquidity for sETH2/ETH pool in Uniswap, so requests StakeWise to whitelist that specific contract
StakeWise whitelists the contract and creates
holder contract that accrues rETH2 from sETH2 stored in the Uniswap contract
Staker adds liquidity to the sETH2/ETH Uniswap pool and receives LP tokens
He/she stakes LP tokens in the
holder contract and continues to earn rETH2 while providing liquidity
When someone exchanges ETH for sETH2 in the Uniswap pool, they will accrue rETH2 to their address as normal.