VaultEthStaking
Inherits: Initializable ↗, VaultState →, VaultValidators →, VaultEnterExit →, VaultMev →, IVaultEthStaking
Defines the Ethereum staking functionality for the Vault.
Functions
deposit
Deposit ETH to the Vault
function deposit(address receiver, address referrer) public payable virtual override returns (uint256 shares);
Parameters
| Name | Type | Description |
|---|---|---|
receiver | address | The address that will receive Vault's shares |
referrer | address | The address of the referrer. Set to zero address if not used. |
Returns
| Name | Type | Description |
|---|---|---|
shares | uint256 | The number of shares minted |
updateStateAndDeposit
Updates Vault state and deposits ETH to the Vault
function updateStateAndDeposit(
address receiver,
address referrer,
IKeeperRewards.HarvestParams calldata harvestParams
) public payable virtual override returns (uint256 shares);
Parameters
| Name | Type | Description |
|---|---|---|
receiver | address | The address that will receive Vault's shares |
referrer | address | The address of the referrer. Set to zero address if not used. |
harvestParams | IKeeperRewards.HarvestParams | The parameters for harvesting Keeper rewards |
Returns
| Name | Type | Description |
|---|---|---|
shares | uint256 | The number of shares minted |
receive
Function for depositing using fallback function
receive() external payable virtual;
receiveFromMevEscrow
Used by MEV escrow to transfer ETH.
function receiveFromMevEscrow() external payable override;
donateAssets
Donate assets to the Vault. Must transfer ETH together with the call.
function donateAssets() external payable override;