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.
function instantRedeem(uint256 shares, address receiverAddr, address holderAddr) external;
5. convertToAssets(uint256 shares)
Purpose: Preview function. Returns estimated asset amount for the given shares.
function convertToAssets(uint256 shares) external view returns (uint256);
6. convertToShares(uint256 assets)
Purpose: Preview function. Returns estimated share amount for the given asset amount.
function convertToShares(uint256 assets) external view returns (uint256);
7. previewDeposit(uint256 assets)
Purpose: Simulates a deposit and returns the number of shares to be issued.
function previewDeposit(uint256 assets) external view returns (uint256);
8. previewRedeem(uint256 shares)
Purpose: Simulates a redeem request to return estimated assets.
function previewRedeem(uint256 shares) external view returns (uint256);
9. previewInstantRedemption(uint256 shares)
Purpose: Simulates an instant redeem and returns the estimated asset payout.
function previewInstantRedemption(uint256 shares) external view returns (uint256);
10. balanceOf(address owner)
Purpose: Standard ERC-20 method to check current vault share balance.
function balanceOf(address owner) external view returns (uint256);
11. approve(address spender, uint256 amount)
Purpose: Standard ERC-20 approval for share transfers.
function approve(address spender, uint256 amount) external returns (bool);
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.
function depositToSubaccount(uint256 amount, address subAccountAddr) external;
2. withdrawFromSubaccount(uint256 amount, address subAccountAddr)
Purpose: Withdraws assets from a subaccount back to the vault.
function withdrawFromSubaccount(uint256 amount, address subAccountAddr) external;
3. emergencyWithdraw(IERC20 token, address destinationAddr)
Purpose: Admin emergency function to sweep tokens to a safe destination.
function emergencyWithdraw(IERC20 token, address destinationAddr) external;
4. updateFeeCollector(address newFeeCollectorAddr)
Purpose: Update the address that collects fees from the vault.
function updateFeeCollector(address newFeeCollectorAddr) external;
5. updateManagementFee(uint256 newManagementFeePercent)
Purpose: Update the management fee charged by the vault.
function updateManagementFee(uint256 newManagementFeePercent) external;
6. updateWithdrawalFee(uint256 newWithdrawalFee)
Purpose: Update the standard withdrawal fee percentage.
function updateWithdrawalFee(uint256 newWithdrawalFee) external;
7. updateInstantRedemptionFee(uint256 newFee)
Purpose: Update the fee charged for using instantRedeem().
function updateInstantRedemptionFee(uint256 newFee) external;
8. pauseDepositsAndWithdrawals(bool bPauseDeposits, bool bPauseWithdrawals)
Purpose: Pause or resume deposits and/or withdrawals globally.
function pauseDepositsAndWithdrawals(bool bPauseDeposits, bool bPauseWithdrawals) external;
9. chargeManagementFee()
Purpose: Manually trigger the fee accrual mechanism, charging users based on TVL.
function chargeManagementFee() external;
10. collectFees()
Purpose: Sweep collected fees to the fee collector address.
function collectFees() external;
11. processAllClaimsByDate(uint256 year, uint256 month, uint256 day, uint256 maxLimit)
Purpose: Batch settlement of all scheduled redemptions for a given epoch.
function processAllClaimsByDate(
uint256 year,
uint256 month,
uint256 day,
uint256 maxLimit
) external;
12. updateIssuanceLimits(uint256 maxDeposit, uint256 maxWithdrawal, uint256 maxSupply)
Purpose: Adjust maximums for deposits, withdrawals, and vault token supply.
function updateIssuanceLimits(
uint256 newMaxDepositAmount,
uint256 newMaxWithdrawalAmount,
uint256 newMaxTokenSupply
) external;
13. updateMaxChangePercent(uint256 newValue)
Purpose: Update the maximum allowed change in asset balance between rebalances or updates.
function updateMaxChangePercent(uint256 newValue) external;
14. updateTimelockDuration(uint256 newDuration)
Purpose: Modify the timelock duration (lag) between redeem request and claim.
function updateTimelockDuration(uint256 newDuration) external;
15. updateTotalAssets(uint256 externalAssetsAmount)
Purpose: Syncs the vault’s internal accounting with the latest off-chain or externally-sourced asset amount.
function updateTotalAssets(uint256 externalAssetsAmount) external;
16. updateOperator(address addr)
Purpose: Assign a new operator address responsible for automated tasks like fee charging and redemption processing.
function updateOperator(address addr) external;
17. updateSettlementAccount(address addr)
Purpose: Set the address used for asset settlement in case of external funding or batch liquidity actions.
function updateSettlementAccount(address addr) external;
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