Skip to main content

On-chain Architecture

The on-chain program lives in programs/multi_strategy_vault/. Its job is not to optimize yield by itself. Its job is to enforce vault state and record trusted execution.

Main instruction groups

Vault initialization and administration

  • initialize_vault
  • register_strategy
  • update_strategy_status
  • pause_strategy
  • pause_vault

User actions

  • deposit_usdc
  • request_withdrawal
  • finalize_withdrawal

Rebalance lifecycle

  • submit_rebalance_plan
  • execute_rebalance
  • record_execution_proof

Main accounts

VaultState

Holds the primary vault state:
  • authority
  • deposit mint
  • share mint
  • vault treasury
  • risk policy reference
  • manager config reference
  • totals for deposits, shares, liquid balance, pending withdrawals, and portfolio value

RiskPolicy

Holds static policy limits:
  • minimum liquid reserve
  • per-protocol cap
  • per-strategy cap
  • exotic cap
  • MarginFi cap
  • rebalance cooldown and minimum delta

ManagerConfig

Holds manager and execution settings:
  • COBO MPC pubkey
  • Ranger executor pubkey
  • auto-execute flag
  • maximum notional per rebalance
  • allowed strategy count and hash

StrategyState

Defines a strategy inside the vault:
  • protocol and adapter type
  • input/output assets
  • fee and risk data
  • allocation caps
  • liquidity profile
  • exotic/canary flags
  • valuation source
  • emergency exit note

AllocationState

Tracks target and current allocation values for a registered strategy.

WithdrawalRequest

Tracks asynchronous withdrawal state:
  • shares burned
  • requested amount
  • liquid amount already earmarked
  • queued amount
  • paid amount
  • status timestamps

RebalancePlanProof

Stores the approved rebalance and its execution data:
  • plan hash
  • target weights hash
  • tx bundle hash
  • execution proof hash
  • authorized executor
  • reserve / APY / risk metadata

On-chain guarantees

The program guarantees:
  • policy limits are enforced during strategy registration and rebalance execution
  • withdrawals respect reserve constraints
  • rebalance execution matches a submitted plan
  • the plan hash and execution proof become part of the on-chain record

What the program does not do

The program does not:
  • fetch APYs itself
  • query external protocol states for optimization
  • compute target allocations
  • build complex protocol-specific routes by itself
That work remains off-chain by design.