Largest Ethereum liquid staking protocol. Stake ETH, receive rebasing stETH (or non-rebasing wrapped wstETH), use as collateral across DeFi while earning consensus + execution rewards.
- 01ETH liquid staking
- 02stETH / wstETH integrations
- 03DeFi-composable staking yield
- 04withdrawals via unstETH NFT
- pnpm add @lidofinance/lido-ethereum-sdk viem
| Variable | Scope | Description |
|---|---|---|
| NEXT_PUBLIC_STETH_ADDRESS | Client | stETH token address on the chain you target (Ethereum mainnet: 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84). |
| NEXT_PUBLIC_WSTETH_ADDRESS | Client | wstETH token address (Ethereum mainnet: 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0). |
Integrate Lido staking. Use `@lidofinance/lido-ethereum-sdk`: instantiate `LidoSDK({ chainId, rpcProvider, web3Provider })`. Stake with `sdk.stake.stakeEth({ value, referralAddress })` — this calls `Lido.submit(referral)` and mints rebasing stETH 1:1. Wrap with `sdk.wrap.wrapEth({ value })` (ETH→wstETH directly) or `sdk.wrap.wrapStethToWsteth({ value })` to convert rebasing balance into a static-supply token. Unstake by requesting via `sdk.withdraw.request.requestWithdrawalsWithPermit({ amount, token: 'stETH' | 'wstETH' })` which mints an `unstETH` NFT; once finalized claim with `sdk.withdraw.claim.claimRequests({ requestsIds })`. Read APR from `sdk.statistics.getLastApr()`. Always quote balances in wstETH for accounting (rebases break naive ERC20 ledgers).
- ⚑stETH is REBASING — balances change every ~24h on `oracleReport`; integrating into AMMs, lending markets, or accounting systems that assume static balances will break. Use wstETH instead.
- ⚑wstETH is NOT 1:1 with ETH; its exchange rate (`stEthPerToken()`) only goes up. Convert with `wstETH.getStETHByWstETH(amount)` for display.
- ⚑Withdrawals are queued: requesting `unstETH` is fast, but finalization can take days depending on validator exit queue and buffer; the request is an NFT — don't lose it.
- ⚑Lido has a 10% protocol fee on staking rewards (split node operators / treasury); APR shown to users is post-fee.
- ⚑Validator slashing is socialized across all stakers via the daily oracle report — a mass slashing event lowers stETH/ETH ratio.
- ⚑stETH/ETH peg can deviate on secondary markets (Curve, Uniswap) during stress — do not trust DEX price as oracle for liquidations; use Chainlink stETH/USD or wstETH exchange-rate feed.
- ⚑When integrating with Aave/Morpho/etc., these protocols accept wstETH (not stETH) as collateral specifically to avoid rebasing math.