The Core Vault contract adheres to the ERC-4626 and ERC-20 standards, implementing the essential functionalities required by the vault. However, it's important to note that the Core Vault contract cannot be used independently; it needs to be inherited and have other internal functions implemented before it can be utilized. This contract is capable of receiving and managing user deposits, and it mints LazyOtter Vault tokens as withdrawal vouchers. LazyOtter Vault tokens also represent the share held in the vault, which is used to calculate the funds that users can withdraw.
Returns the decimals of the underlying asset.
Copy function decimals () public view override returns ( uint8 ) Returns the total amount of underlying assets managed by the Vault.
Copy function totalAssets () public view virtual returns ( uint256 ) Returns the maximum amount of underlying assets that can be deposited into the Vault.
Copy function maxDeposit ( address ) public view virtual returns ( uint256 ) Returns the maximum amount of Vault Tokens that can be minted.
Copy function maxMint ( address receiver ) public view returns ( uint256 ) Returns the maximum amount of underlying assets that can be withdrawn from the Vault.
Returns the maximum amount of Vault Tokens that can be redeemed.
convertToShares
Returns the amount of Vault Tokens that can be exchanged for the underlying assets.
convertToAssets
Returns the amount of underlying assets that can be exchanged for Vault Tokens.
Returns the amount of Vault Tokens that can be obtained when depositing a specified amount of underlying assets.
Returns the amount of underlying assets needed to mint a specified amount of Vault Tokens.
previewWithdraw
Returns the amount of Vault Tokens needed to withdraw a specified amount of underlying assets.
Returns the amount of underlying assets needed to redeem a specified amount of Vault Tokens.
Deposits the specified amount of underlying assets and mints Vault Tokens for the receiver based on the deposit amount.
Mints the specified amount of Vault Tokens for the receiver and collects the required underlying assets from the caller.
Withdraws the specified amount of underlying assets and burn the required Vault Tokens.
Redeems the specified amount of Vault Tokens and sends the corresponding amount of underlying assets to the receiver.
Harvests the currently earned rewards.
Implements the EIP-2612 permit function.
Pauses accepting deposits into the Vault.
Unpauses accepting deposits into the Vault.
emergencyWithdraw
Withdraws the underlying assets from the external protocol in case of an emergency.