WithdrawalVault
What is WithdrawalVault
A simple contract that accumulates partial and full withdrawals that comes 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 to the internal buffer; see Lido contract docs for details.
The vault is recoverable, so any ERC-20 and ERC-721 tokens can be transferred to the treasury by DAO.
The currently deployed version is upgradable because of anticipated Ethereum withdrawal mechanics changes.
The contract is meant to be ossified somewhere after withdrawal credentials triggerable exits are implemented.
View methods
getContractVersion()
Returns the current contract version.
function getContractVersion() returns (uint256)
Methods
withdrawWithdrawals()
Transfer the _amount
of accumulated withdrawals to the Lido contract.
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:
Name | Type | Description |
---|---|---|
_token | address | ERC20-compatible token |
_amount | uint256 | token 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 the ERC721Recovered
event.
function recoverERC721(address _token, uint256 _tokenId) external
Parameters:
Name | Type | Description |
---|---|---|
_token | address | ERC721-compatible token |
_tokenId | uint256 | minted token id |