Skip to main content

WithdrawalVault

What is WithdrawalVault

A simple contract that accumulates partial and full withdrawals that come from the Beacon Chain. Its address corresponds to the type-0x01 Lido withdrawal credentials. During the accounting oracle report, the vault is emptied by Lido into the internal buffer; see Lido contract docs for details.

The vault is recoverable, so the DAO can transfer any ERC-20 and ERC-721 tokens to the treasury.

WithdrawalVault supports EIP-7002 - execution-layer triggered partial and full withdrawals.

The currently deployed version is upgradable because of anticipated Ethereum withdrawal mechanics changes.

View methods

getContractVersion()

Returns the current contract version.

function getContractVersion() returns (uint256)

Methods

withdrawWithdrawals()

Transfers the _amount of accumulated withdrawals to the Lido contract.

note

It can be called only by the Lido contract.

function withdrawWithdrawals(uint256 _amount)

recoverERC20()

Transfers the given amount of the ERC20-token (defined by the provided token contract address) currently belonging to the vault contract address to the Lido treasury address.

Emits a ERC20Recovered event.

function recoverERC20(address _token, uint256 _amount) external

Parameters:

NameTypeDescription
_tokenaddressERC20-compatible token
_amountuint256token amount to recover

recoverERC721()

Transfers the given tokenId of the ERC721-compatible NFT (defined by the provided token contract address) currently belonging to the vault contract address to the Lido treasury address.

Emits an ERC721Recovered event.

function recoverERC721(address _token, uint256 _tokenId) external

Parameters:

NameTypeDescription
_tokenaddressERC721-compatible token
_tokenIduint256minted token id

getWithdrawalRequestFee

Returns fee amount required per withdrawal request.

function getWithdrawalRequestFee() public view returns (uint256);

Returns:

NameTypeDescription
withdrawalRequestFeeuint256Current withdrawal request fee.