RebasedStakedCelo
RebasedStakedCelo.sol (wrap & unwrap)
This is a wrapper token (ticker: rstCELO) around stCELO that, instead of accruing value to each token as staking rewards accrue in the pool, rebases balances, such that an account's balance always represents the amount of CELO that could be withdrawn for the underlying stCELO. Thus, the value of one unit of rstCELO and one unit of CELO should be approximately equivalent.
Mainnet Deployment:
0xDc5762753043327d74e0a538199c1488FC1F44cfAlfajores Testnet Deployment:
0xe26Ed019Aa0d780Ac49826604357B1319b12602F
Methods
Initialize
Replaces the constructor for proxy implementation.
function initialize(
address _stakedCelo,
address _account,
address _owner
) external initializer {
__ERC20_init("Rebased Staked CELO", "rstCELO");
_transferOwnership(_owner);
stakedCelo = IStakedCelo(_stakedCelo);
account = IAccount(_account);
}Deposit
Deposit stCELO in return for rstCELO. Although rstCELO is never minted to any account, the rstCELO balance is calculated based on the account's deposited stCELO. See `balanceOf()` function below.
Withdraw
Withdraws stCELO. This function transfers back some or all of the sender's. previously deposited stCELO.
totalSupply
Used to query the total supply of rstCELO. The calculated total supply of rstCELO.
balanceOf
Used to query the rstCELO balance of an address.
toStakedCelo
Computes the amount of stCELO that is represented by an amount of rstCELO.
toRebasedStakedCelo
Computes the amount of rstCELO that is represented by an amount of stCELO.
_transfer
Moves `amount` of rstCELO from `sender` to `recipient`.
Last updated