Architecture Overview
The system is split into two layers:on-chain enforcementoff-chain intelligence and execution
End-to-end shape
- Users deposit
USDCinto the vault - The solver computes target allocations off-chain
- Ranger builds protocol-specific transaction bundles
- The program stores the approved rebalance proof
- Protocol transactions are executed
- The program records the execution proof and updates allocation state
Why this split exists
On-chain should enforce
The program is responsible for:- vault state
- shares and treasury accounting
- policy boundaries
- strategy registry
- withdrawal lifecycle
- rebalance proof storage
Off-chain should decide
The off-chain stack is responsible for:- data gathering
- scoring strategies
- computing target weights
- building protocol instructions
- bundling transactions
- orchestrating retries and operator workflows
Design principles
Policy before optimization
No strategy can be selected beyond the configured policy envelopes.Deterministic before adaptive
The first version uses deterministic math and explicit haircuts, not ML or opaque heuristics.Proofs on-chain, heavy compute off-chain
Only the approved plan and execution proof are committed on-chain.Main modules
| Module | Role |
|---|---|
programs/multi_strategy_vault/ | On-chain program and account model |
services/adapters/ | Protocol-specific execution builders |
services/solver/ | Strategy scoring and rebalance plan generation |
services/ranger/ | Execution runtime, vault clients, operator CLIs |
services/shared/ | Shared types, configs, hashes, math, env loading |