What it offers
- submit: Stake ETH and receive stETH (rebasing)
- wrap: Wrap stETH into wstETH (non-rebasing, DeFi-compatible)
- unwrap: Unwrap wstETH back to stETH
Notes
- stETH rebases daily (balance increases). wstETH does not rebase (exchange rate increases instead)
- Always use wstETH for DeFi integrations (Aave, Uniswap, etc.) since rebasing tokens cause issues
- submit() requires ETH sent as msg.value. The referral parameter can be zero address
- Approve stETH to wstETH contract before calling wrap()
- On Arbitrum, wstETH is the bridged token,
Lido.WstETHBridged(WstETHBridgedABI): an ERC-20 (balanceOf,transfer,approve) with nowrap,unwrap,getStETHByWstETHorgetWstETHByStETH, each of which reverts there. Wrap, unwrap and read the stETH rate on Ethereum, throughLido.WstETH
Its names in a program
On Ethereum,Lido is a namespace: its contracts need no import.
Deployments
ABI
LidoABI
import LidoABI from "./protocols/lido/LidoABI.json"; Speaks for: stETH.
submit(address _referral) payable returns (uint256)balanceOf(address account) view returns (uint256)approve(address spender, uint256 amount) returns (bool)
WstETHABI
import WstETHABI from "./protocols/lido/WstETHABI.json"; Speaks for: wstETH.
wrap(uint256 _stETHAmount) returns (uint256)unwrap(uint256 _wstETHAmount) returns (uint256)getStETHByWstETH(uint256 _wstETHAmount) view returns (uint256)getWstETHByStETH(uint256 _stETHAmount) view returns (uint256)
WstETHBridgedABI
import WstETHBridgedABI from "./protocols/lido/WstETHBridgedABI.json"; Speaks for: wstETH.
name() view returns (string)symbol() view returns (string)decimals() view returns (uint8)totalSupply() view returns (uint256)balanceOf(address account) view returns (uint256)allowance(address owner, address spender) view returns (uint256)approve(address spender, uint256 amount) returns (bool)transfer(address to, uint256 amount) returns (bool)transferFrom(address from, address to, uint256 amount) returns (bool)increaseAllowance(address spender, uint256 addedValue) returns (bool)decreaseAllowance(address spender, uint256 subtractedValue) returns (bool)bridge() view returns (address)
Next steps
- Protocols: the other protocols, by what they do.
- Protocols and tokens: calling a contract by its namespace, or through its ABI.
- Glossary: the words these pages use, in plain terms.
