Vault Contract Interface

Core User-Callable Functions

These functions are expected to be directly called by users or custodians during normal deposit, redemption, and interaction workflows.

1. deposit(uint256 assets, address receiver)

  • Purpose: Deposit underlying assets into the vault in exchange for vault shares.

  • Returns: Number of shares minted.

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

2. requestRedeem(uint256 shares, address receiverAddr, address holderAddr)

  • Purpose: Initiates a redemption flow. Shares are burned, and the claim becomes redeemable at a later epoch.

  • Returns: Assets to be redeemed, claimable epoch timestamp.

function requestRedeem(uint256 shares, address receiverAddr, address holderAddr) external returns (uint256 assets, uint256 claimableEpoch);

3. claim(uint256 year, uint256 month, uint256 day, address receiverAddr)

  • Purpose: Completes a redemption request and transfers assets to receiver.

  • Returns: assetsClaimed, sharesBurned

function claim(uint256 year, uint256 month, uint256 day, address receiverAddr) external returns (uint256, uint256);

4. instantRedeem(uint256 shares, address receiverAddr, address holderAddr)

  • Purpose: Allows users to bypass the epoch process and redeem shares immediately with a fee.


5. convertToAssets(uint256 shares)

  • Purpose: Preview function. Returns estimated asset amount for the given shares.


6. convertToShares(uint256 assets)

  • Purpose: Preview function. Returns estimated share amount for the given asset amount.


7. previewDeposit(uint256 assets)

  • Purpose: Simulates a deposit and returns the number of shares to be issued.


8. previewRedeem(uint256 shares)

  • Purpose: Simulates a redeem request to return estimated assets.


9. previewInstantRedemption(uint256 shares)

  • Purpose: Simulates an instant redeem and returns the estimated asset payout.


10. balanceOf(address owner)

  • Purpose: Standard ERC-20 method to check current vault share balance.


11. approve(address spender, uint256 amount)

  • Purpose: Standard ERC-20 approval for share transfers.


Here’s an expanded and formatted section covering Administrative & Operational Functions in the same style as the core user-callable functions — intended for internal use or advanced integrations (e.g., protocol operators, whitelisted admin roles):


Administrative & Operational Functions

These functions are not meant for direct user access, but may be used by protocol administrators, integrations, or automated agents for vault configuration, fee collection, limits, and subaccount interaction.


1. depositToSubaccount(uint256 amount, address subAccountAddr)

  • Purpose: Transfers vault assets to a whitelisted subaccount.


2. withdrawFromSubaccount(uint256 amount, address subAccountAddr)

  • Purpose: Withdraws assets from a subaccount back to the vault.


3. emergencyWithdraw(IERC20 token, address destinationAddr)

  • Purpose: Admin emergency function to sweep tokens to a safe destination.



4. updateFeeCollector(address newFeeCollectorAddr)

  • Purpose: Update the address that collects fees from the vault.


5. updateManagementFee(uint256 newManagementFeePercent)

  • Purpose: Update the management fee charged by the vault.


6. updateWithdrawalFee(uint256 newWithdrawalFee)

  • Purpose: Update the standard withdrawal fee percentage.


7. updateInstantRedemptionFee(uint256 newFee)

  • Purpose: Update the fee charged for using instantRedeem().


8. pauseDepositsAndWithdrawals(bool bPauseDeposits, bool bPauseWithdrawals)

  • Purpose: Pause or resume deposits and/or withdrawals globally.


9. chargeManagementFee()

  • Purpose: Manually trigger the fee accrual mechanism, charging users based on TVL.


10. collectFees()

  • Purpose: Sweep collected fees to the fee collector address.


11. processAllClaimsByDate(uint256 year, uint256 month, uint256 day, uint256 maxLimit)

  • Purpose: Batch settlement of all scheduled redemptions for a given epoch.


12. updateIssuanceLimits(uint256 maxDeposit, uint256 maxWithdrawal, uint256 maxSupply)

  • Purpose: Adjust maximums for deposits, withdrawals, and vault token supply.


13. updateMaxChangePercent(uint256 newValue)

  • Purpose: Update the maximum allowed change in asset balance between rebalances or updates.


14. updateTimelockDuration(uint256 newDuration)

  • Purpose: Modify the timelock duration (lag) between redeem request and claim.


15. updateTotalAssets(uint256 externalAssetsAmount)

  • Purpose: Syncs the vault’s internal accounting with the latest off-chain or externally-sourced asset amount.


16. updateOperator(address addr)

  • Purpose: Assign a new operator address responsible for automated tasks like fee charging and redemption processing.


17. updateSettlementAccount(address addr)

  • Purpose: Set the address used for asset settlement in case of external funding or batch liquidity actions.


Events to Monitor

If tracking user activity via event logs:

  • Deposit(address sender, address owner, uint256 assets, uint256 shares)

  • Withdraw(address sender, address receiver, address owner, uint256 assets, uint256 shares)

  • WithdrawalRequested(...)

  • WithdrawalProcessed(...)

  • OnEmergencyWithdraw(...)

  • ManagementFeeCharged(uint256)

  • FeesCollected()

  • DepositWithdrawalStatusChanged(...)


Read-Only Data Surfaces

  • totalAssets()

  • totalSupply()

  • asset() → address of the underlying token

  • name() / symbol() / decimals()

  • withdrawalFee() / instantRedemptionFee()

  • getWithdrawalEpoch() → for current epoch boundaries

Last updated