Skip to main content

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:

  1. Computes a discount based on the current expected ETH APY and Lido withdrawal wait time.
  2. Transfers WETH to the swapper (net of discount and any protocol fee).
  3. Submits the received stETH to the Lido withdrawal queue.
  4. 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

ActorWhat they do
SwapperSends stETH/wstETH, receives WETH at a discount
LPDeposits WETH, earns the discount as yield
KeeperCalls claimPendingWithdrawalsAndServeRedeemRequests() to advance finalized Lido withdrawals; anyone can do this
OwnerSets 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:

  1. LP calls requestRedeem(shares, controller, owner) - shares are burned immediately.
  2. As Lido withdrawals finalize, the keeper calls the claim function, which allocates WETH to queued LP redemptions in order.
  3. 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.