This is only a demo/mock code, don't use it in production!
This repo contains the Lido protocol code with governance, ACL and other important stuff removed. It's not safe and is not intended for production use.
To get stETH for testing, do the following:
- Call
stETH.submit(0)
, sending ETH along with the transaction. This will mint stETH tokens for the tx sender address. Preferrably, send a multiple of 32 ETH (this will help with rebase simulation). - Call
stETH.depositBufferedEther()
from any address.
The mock stETH/Lido contract contains an deployer-accessible function stETH.simulateBeaconRewards
which allows to rebase stETH token balances (in mainnet, this happens when Lido oracles report the updated beacon validators number and total balance).
Calling stETH.simulateBeaconRewards()
without arguments increases balances of all stETH holders by 1%. One can also pass a different multiplier to the single argument of the overloaded version of simulateBeaconRewards
, 10**18
corresponding to 1.0
. For example:
- To rebase stETH by 3%, call
stETH.simulateBeaconRewards(1030000000000000000)
. - To simulate penalties and decrease all stETH holders' balances by 1%, call
stETH.simulateBeaconRewards(990000000000000000)
.
- Lido: 0xF4242f9d78DB7218Ad72Ee3aE14469DBDE8731eD
- WstETH: 0xb770Ea0F1762D73c8719B52eF981f7F1D824d9a7
- DepositContractMock: 0xd1aC373a6fCAB20476957B14a18178615594Debe
- NodeOperatorsRegistry: 0x776dFe7Ec5D74526Aa65898B7d77FCfdf15ffBe6
- Lido: 0x2DD6530F136D2B56330792D46aF959D9EA62E276
- WstETH: 0x4942BBAf745f235e525BAff49D31450810EDed5b
- DepositContractMock: 0x924B2BB40AfEf29e908bbCaAaE0DBe957d076b4F
- NodeOperatorsRegistry: 0x993a1A1745ea09fAbf8dA7EFCD57CD46c889f8B9
- Lido: 0x4b7FCBC11BB45075b9A1F953128C09bC97D6a0D7
- WstETH: 0xa88751C0a08623E11ff38c6B70F2BbEe7865C17c
- DepositContractMock: 0x83D592bfd9FEF834ab2C49bDCfD60D2DB48b1CF7
- NodeOperatorsRegistry: 0x292E6CF3861fBf010054ae3Bf43959105BE90000