General ERC-4626 Vault Interface
Generic interface for ERC-4626 vaults.
Contract Interface
Events
Deposit
Withdraw
Functions
asset
The address of the underlying token used by the Vault for valuing, depositing, and withdrawing.
totalAssets
Total amount of the underlying asset that is “managed” by vault.
convertToShares
The amount of shares that the Vault would exchange for the amount of assets provided, in an ideal scenario where all the conditions are met.
Parameters
Return Values
convertToAssets
The amount of assets that the Vault would exchange for the amount of shares provided, in an ideal scenario where all the conditions are met.
Parameters
Return Values
maxDeposit
The maximum number of underlying assets that caller can deposit.
Parameters
Return Values
previewDeposit
Allows an on-chain or off-chain user to simulate the effects of their deposit at the current transaction, given current on-chain conditions.
Parameters
Return Values
deposit
Mint vault shares to receiver by transferring exact amount of underlying asset tokens from the caller.
Parameters
Return Values
maxMint
The maximum number of vault shares that caller can mint.
Parameters
Return Values
previewMint
Allows an on-chain or off-chain user to simulate the effects of their mint at the current transaction, given current on-chain conditions.
Parameters
Return Values
mint
Mint exact amount of vault shares to the receiver by transferring enough underlying asset tokens from the caller.
Parameters
Return Values
maxWithdraw
The maximum number of underlying assets that owner can withdraw.
Parameters
Return Values
previewWithdraw
Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current transaction, given current on-chain conditions.
Parameters
Return Values
withdraw
Burns enough vault shares from owner and transfers the exact amount of underlying asset tokens to the receiver.
Parameters
Return Values
maxRedeem
The maximum number of shares an owner can redeem for underlying assets.
Parameters
Return Values
previewRedeem
Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current transaction, given current on-chain conditions.
Parameters
Return Values
redeem
Burns exact amount of vault shares from owner and transfers the underlying asset tokens to the receiver.
Parameters
Return Values
Last updated