ILidoWithdrawalQueue
Title: ILidoWithdrawalQueue
Author: Vendored minimal subset of Lido WithdrawalQueueERC721
(https://github.com/lidofinance/lido-dao/blob/master/contracts/0.8.9/WithdrawalQueueERC721.sol). Upstream license: GPL-3.0.
Minimal vendored subset of the Lido withdrawal queue. Lido withdrawals are an async
queue: requesting burns stETH and mints an NFT request id that becomes claimable only
after the protocol finalizes it (oracle report + buffer), at which point claiming pays
out native ETH. This async leg is why the Lido adapter uses a buffer model — the
synchronous IStrategy.withdraw is served from an idle WETH buffer, and the slow queue
leg runs out-of-band via the adapter's keeper functions.
Only the selectors the adapter calls are declared. requestWithdrawals /
claimWithdrawal move funds (non-view); getWithdrawalStatus is a view reader for the
pending/finalized/claimed flags. The adapter requests with owner == address(this) and
claims to itself, re-wrapping the received ETH into its WETH buffer.
Functions
requestWithdrawals
Locks amounts of stETH (pulled from the caller; the adapter approves first) and mints
one withdrawal-request NFT per entry to owner.
function requestWithdrawals(uint256[] calldata amounts, address owner)
external
returns (uint256[] memory requestIds);Parameters
| Name | Type | Description |
|---|---|---|
| amounts | uint256[] | Per-request stETH amounts to withdraw. |
| owner | address | The owner of the minted request NFTs (the claimer; the adapter passes itself). |
Returns
| Name | Type | Description |
|---|---|---|
| requestIds | uint256[] | The ids of the created withdrawal requests, index-aligned with amounts. |
claimWithdrawal
Claims a finalized withdrawal request, sending the owed native ETH to the request owner.
function claimWithdrawal(uint256 requestId) external;Parameters
| Name | Type | Description |
|---|---|---|
| requestId | uint256 | The id of the finalized request to claim. |
getWithdrawalStatus
Returns the status of each requested withdrawal id.
function getWithdrawalStatus(uint256[] calldata requestIds)
external
view
returns (WithdrawalRequestStatus[] memory statuses);Parameters
| Name | Type | Description |
|---|---|---|
| requestIds | uint256[] | The request ids to query. |
Returns
| Name | Type | Description |
|---|---|---|
| statuses | WithdrawalRequestStatus[] | The status struct for each id, index-aligned with requestIds. |
Structs
WithdrawalRequestStatus
Per-request status returned by getWithdrawalStatus.
struct WithdrawalRequestStatus {
uint256 amountOfStETH;
uint256 amountOfShares;
address owner;
uint256 timestamp;
bool isFinalized;
bool isClaimed;
}Properties
| Name | Type | Description |
|---|---|---|
| amountOfStETH | uint256 | stETH that was locked for this request. |
| amountOfShares | uint256 | Lido shares locked for this request. |
| owner | address | The address that owns the request (the claimer). |
| timestamp | uint256 | Block timestamp the request was created. |
| isFinalized | bool | True once the request is finalized and claimable. |
| isClaimed | bool | True once the request's ETH has been claimed. |