Lido Withdrawal Queue & LP Redemptions
Lido withdrawal queue
When a swapper sends stETH to the vault, the stETH is forwarded to Lido's WithdrawalQueueERC721 contract as a withdrawal request. Lido mints an NFT representing the claim. Once Lido finalizes the request (typically days to weeks later), the vault can claim ETH back and wrap it to WETH.
Per-request limits (Lido):
- Minimum: 100 wei of stETH
- Maximum: 1,000 ETH per request
Swaps above 1,000 ETH are rejected. Accumulated stETH below the per-swap queue minimum is batched by the owner via queueAccumulatedStEth().
LP async redemption (EIP-7540)
LP exits use a FIFO async redemption queue implemented in StETHRedeemManager:
requestRedeem(shares, controller, owner)
└─ burns shares immediately
└─ records WETH owed for controller
[keeper calls claimPendingWithdrawalsAndServeRedeemRequests()]
└─ claims finalized Lido NFTs → WETH
└─ allocates WETH to queue FIFO
withdraw(assets, receiver, controller)
└─ transfers claimable WETH to receiver
Partial fulfillment
A redemption request can be partially filled: if the vault has some but not all of the WETH owed, it allocates what it can and fills the rest when future Lido claims arrive. The _redeemHead pointer advances only when a request is fully allocated.
Accounting buckets
| Bucket | Meaning |
|---|---|
_pendingRedeemAssets | WETH promised but not yet allocated; subtracted from totalAssets() so remaining LP share price is correct |
_reservedRedeemAssets | WETH allocated but not yet claimed; excluded from both totalAssets() and swap liquidity |
Operator model
A controller can approve an operator to act on their behalf (setOperator). This follows the EIP-7540 operator pattern, separate from ERC-20 allowances.
Keeper function
Anyone can call claimPendingWithdrawalsAndServeRedeemRequests() (or its (uint256 maxItems) overload) to:
- Claim up to
maxItemsfinalized Lido withdrawal NFTs. - Wrap received ETH → WETH.
- Serve pending LP redemption requests with available WETH (FIFO).
No off-chain data is needed - checkpoint hints are computed on-chain.