How It Works
The vault
The core of stETH.exchange is an ERC-4626 vault with WETH as the underlying asset. LPs deposit WETH; the vault issues share tokens (seevWETH) representing their proportional claim on vault assets.
When a swapper exchanges stETH for WETH, the vault:
- Computes a discount based on the current expected ETH APY and Lido withdrawal wait time.
- Transfers WETH to the swapper (net of discount and any protocol fee).
- Submits the received stETH to the Lido withdrawal queue.
- When Lido finalizes the withdrawal, claims ETH back and wraps it to WETH - replenishing the vault.
The discount stays in the vault, accruing to LP share prices as yield.
Actors
| Actor | What they do |
|---|---|
| Swapper | Sends stETH/wstETH, receives WETH at a discount |
| LP | Deposits WETH, earns the discount as yield |
| Keeper | Calls claimPendingWithdrawalsAndServeRedeemRequests() to advance finalized Lido withdrawals; anyone can do this |
| Owner | Sets APY/wait parameters, fee rates, and can queue accumulated stETH |
LP exit (async redemption)
LPs cannot withdraw WETH synchronously - shares are redeemed via an EIP-7540 asynchronous FIFO queue:
- LP calls
requestRedeem(shares, controller, owner)- shares are burned immediately. - As Lido withdrawals finalize, the keeper calls the claim function, which allocates WETH to queued LP redemptions in order.
- LP calls
withdraw(assets, receiver, controller)to collect their WETH once it is allocated.
See Lido Withdrawal Queue for more detail.
Bunker mode
If Lido activates bunker mode (a safety mechanism during adverse events like mass slashings), all swaps are blocked. LPs can still claim finalized withdrawals; the restriction only affects new stETH intake.