Architecture
Overview
Each OctoVault deployment combines several layers that correspond directly to the Solidity contracts in the code base. These layers work together to separate core accounting, execution, and strategy logic, giving curators flexibility while maintaining institutional safety.
| Layer | Function | Explanation |
|---|---|---|
| BasedVault | Core ERC-4626 vault | Handles deposits, withdrawals, timelocks, fee staging, and role management. Optionally delegates to a Hook for extended logic. |
| Hook | Optional logic layer | Intercepts deposits, withdrawals, and transfers to implement custom portfolio management or fee logic. |
| Modules | Plug-ins controlled by Hook | Specialised add-ons for valuation (NAV tracking), withdrawals (batch processing), or deposits (queued entry). |
| MetaVault (Vault) | Multi-strategy allocator | Allocates assets across multiple Market vaults, enabling portfolio-style diversification and automated rebalancing. |
| Market | Strategy vault with Adapters | A single-strategy vault that interacts with specific DeFi protocols through approved Adapters such as GMX, Silo, or Euler. |
Each layer follows the same governance and role model, allowing curators to manage operations safely and transparently.
All configuration changes, including caps, allocations, or fees, are subject to a timelock. This delay ensures changes are reviewable and auditable before activation. A Guardian role provides veto power to stop any unsafe or non-compliant update.
BasedVault
The BasedVault is the foundation of the OctoVault architecture. It is a standard ERC-4626 vault with a small modification that enables it to connect to a Hook. Both Vaults and Markets extend BasedVault, creating a shared accounting framework that allows them to interact seamlessly without requiring custom integrations.
ERC-4626 foundation
Each vault is fully compatible with ERC-4626, which standardises deposits, withdrawals, and share accounting.
For a Vault:
- Depositors provide an underlying asset, such as USDC, and receive Vault shares in return.
- These shares represent a proportional claim on all assets and the yield generated across the Vault’s Markets.
- The Vault’s share price automatically adjusts as value accrues over time.
For a Market:
- Liquidity Providers, often Vaults, deposit ERC-20 assets and receive Market shares.
- Market shares track ownership of the Market’s underlying strategy and reflect both realised and unrealised profit and loss.
- The Market’s share price includes exposure to all long and short positions, including any borrowed liabilities or hedges.
BasedVault inheritance
Every Vault or Market inherits the core functionality and safeguards of BasedVault:
- Timelocked governance: all configuration changes, including cap, timelock, and fees, must be staged before they can take effect.
- Role separation: distinct admin, curator, and guardian roles with clearly defined permissions.
- Optional Hook integration: supports extensions for valuation, asynchronous withdrawal, and performance fee logic.
- Curator control: only the designated Curator can execute operational actions such as allocate, supply, withdraw, or harvest.
This inheritance model ensures that all Vaults and Markets share the same transparent governance structure, predictable behaviour, and composable interfaces.
Risk Isolation and Liquidity Sharing
For a Vault Each Vault operates under isolated risk managed by its designated Curator.
- The Vault only allocates to approved Market vaults, each containing its own risk profile.
- If one Market experiences losses or protocol risk, other Markets remain unaffected.
- Curators can independently remove or veto Markets through timelocked governance, maintaining robust control over strategy exposure.
This isolation model enables portfolio segregation while keeping execution fully on-chain.
For a Market Each Market is risk-isolated by design.
- Market-specific losses cannot propagate to other Markets or Vaults.
- If a looped position or hedge fails, its impact is contained within that Market’s balance sheet.
Common Liquidity Layer
- A single Vault can allocate funds across multiple Markets.
- Conversely, multiple Vaults can allocate to the same Market.
This shared-liquidity model allows efficient capital deployment without compromising isolation.
Treasury and Custody
Each Vault references a Treasury address inherited from BasedVault. By default, the treasury is the vault contract itself.
Optionally, the treasury can be an external wallet such as a Safe or Fireblocks MPC. When an external treasury is used, the vault executes accounting logic but fund movement is solely governed by the external wallet’s signers. This ensures institutions can retain custody control while still using on-chain accounting and automation.
Automation and Optimisation
The OctoVault architecture is designed to be automation-friendly.
Curators can integrate off-chain optimisation engines or AI agents that monitor and optimise performance.
For a Vault Agents can monitor:
- Yield differentials across Markets
- Market risk scores
They can then propose or execute rebalances — subject to the Vault’s timelock rules — to maintain the optimal combination of Markets at any given time.
For a Market Agents can:
- Monitor yields, funding rates, borrow spreads, and risk metrics
- Optimise allocations across venues or Markets
- Trigger rebalances when yield differentials justify execution costs
Because all operations such as supply, withdraw, and harvest are permissioned under onlyCurator, these AI or algorithmic agents operate transparently under human-governed safeties and timelocks.
Hooks and Modules
Hooks are entry points for custom modules to interact with BasedVault.
Currently, OctoVault supports the following modules.
WithdrawModule
Implements batched withdrawals via epochs:
request(): queue a withdrawalsettle(): close an epoch with a settlement rateclaim(): mark shares as claimed after settlementclaimable(): view claimable shares and assets
All state changes are restricted to the Hook, which orchestrates user requests and settlements.
ValuationModule
Tracks vault performance and accrues fees:
- Maintains a high-water mark for performance fee logic
- Accrues fees when portfolio value exceeds this mark
- Returns the claimable amount to be paid by the vault
- Called only by the Hook for consistent accounting