Skip to main content

EthFoxVault

Git Source ↗

Inherits: VaultImmutables →, Initializable ↗, VaultAdmin →, VaultVersion →, VaultFee →, VaultState →, VaultValidators →, VaultEnterExit →, VaultMev →, VaultEthStaking →, VaultBlocklist →, Multicall →, IEthFoxVault

Custom Ethereum non-ERC20 vault with blocklist, own MEV and without osToken minting.

Structs

EthFoxVaultConstructorArgs

Struct for deploying the EthFoxVault contract

struct EthFoxVaultConstructorArgs {
address keeper;
address vaultsRegistry;
address validatorsRegistry;
address validatorsWithdrawals;
address validatorsConsolidations;
address consolidationsChecker;
address sharedMevEscrow;
address depositDataRegistry;
uint64 exitingAssetsClaimDelay;
}

Properties

NameTypeDescription
keeperaddressThe address of the Keeper contract
vaultsRegistryaddressThe address of the VaultsRegistry contract
validatorsRegistryaddressThe contract address used for registering validators in beacon chain
validatorsWithdrawalsaddressThe contract address used for withdrawing validators in beacon chain
validatorsConsolidationsaddressThe contract address used for consolidating validators in beacon chain
consolidationsCheckeraddressThe contract address used for checking consolidations
sharedMevEscrowaddressThe address of the shared MEV escrow
depositDataRegistryaddressThe address of the DepositDataRegistry contract
exitingAssetsClaimDelayuint64The delay after which the assets can be claimed after exiting from staking

EthFoxVaultInitParams

Struct for initializing the EthFoxVault contract

struct EthFoxVaultInitParams {
address admin;
address ownMevEscrow;
uint256 capacity;
uint16 feePercent;
string metadataIpfsHash;
}

Properties

NameTypeDescription
adminaddressThe address of the Vault admin
ownMevEscrowaddressThe address of the MEV escrow contract
capacityuint256The Vault stops accepting deposits after exceeding the capacity
feePercentuint16The fee percent that is charged by the Vault
metadataIpfsHashstringThe IPFS hash of the Vault's metadata file

Events

UserEjected

Event emitted when a user is ejected from the Vault

event UserEjected(address user, uint256 shares);

Parameters

NameTypeDescription
useraddressThe address of the user
sharesuint256The amount of shares ejected

EthFoxVaultCreated

Event emitted on EthFoxVault creation

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

Parameters

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

Functions

deposit

Deposit ETH to the Vault

function deposit(address receiver, address referrer)
public
payable
virtual
override(IVaultEthStaking, VaultEthStaking)
returns (uint256 shares);

Parameters

NameTypeDescription
receiveraddressThe address that will receive Vault's shares
referreraddressThe address of the referrer. Set to zero address if not used.

Returns

NameTypeDescription
sharesuint256The number of shares minted

ejectUser

Ejects user from the Vault. Can only be called by the blocklist manager. The ejected user will be added to the blocklist and all his shares will be sent to the exit queue.

function ejectUser(address user) external override;

Parameters

NameTypeDescription
useraddressThe address of the user to eject

receive

Function for depositing using fallback function

receive() external payable virtual override;

vaultId

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

version

Version

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

Returns

NameTypeDescription
<none>uint8The version of the Vault implementation contract