Skip to main content

EthGenesisVault

Git Source ↗

Inherits: Initializable ↗, EthVault →, IEthGenesisVault

Defines the Genesis Vault for Ethereum staking migrated from StakeWise Legacy.

Events

Migrated

Event emitted on migration from StakeWise Legacy

event Migrated(address receiver, uint256 assets, uint256 shares);

Parameters

NameTypeDescription
receiveraddressThe address of the shares receiver
assetsuint256The amount of assets migrated
sharesuint256The amount of shares migrated

GenesisVaultCreated

Event emitted on EthGenesisVault creation (deprecated)

event GenesisVaultCreated(address admin, uint256 capacity, uint16 feePercent, string metadataIpfsHash);

Parameters

NameTypeDescription
adminaddressThe address of the Vault admin
capacityuint256The capacity of the Vault
feePercentuint16The fee percent of the Vault
metadataIpfsHashstringThe IPFS hash of the Vault metadata

Functions

vaultId

Vault Unique Identifier

function vaultId() public pure virtual override(IVaultVersion, EthVault) returns (bytes32);

Returns

NameTypeDescription
<none>bytes32The unique identifier of the Vault

version

Version

function version() public pure virtual override(IVaultVersion, EthVault) returns (uint8);

Returns

NameTypeDescription
<none>uint8The version of the Vault implementation contract

migrate

Function for migrating from StakeWise Legacy. Can be called only by RewardEthToken contract.

function migrate(address receiver, uint256 assets) external override returns (uint256 shares);

Parameters

NameTypeDescription
receiveraddressThe address of the receiver
assetsuint256The amount of assets migrated

Returns

NameTypeDescription
sharesuint256The amount of shares minted

receive

Function for depositing using fallback function

receive() external payable virtual override;