Accounts and Types
On-chain account types
VaultState
Primary vault state, including:
- authority
- deposit mint
- share mint
- treasury
- total shares
- total deposited USDC
- total portfolio value
- liquid USDC
- pending withdrawals
RiskPolicy
Static guardrails:
- reserve minimum
- strategy and protocol caps
- exotic cap
- MarginFi cap
- cooldown and min rebalance delta
ManagerConfig
Execution authority and rebalance permissions.
StrategyState
Registered strategy definition and policy envelope.
AllocationState
Target/current weights and notionals for a strategy.
WithdrawalRequest
Asynchronous withdrawal bookkeeping.
RebalancePlanProof
Submitted and executed rebalance metadata.
Shared TypeScript domain types
The central shared file isservices/shared/src/domain.ts.
Key types:
Important cross-layer contract
The repo works because both sides agree on:- strategy IDs
- plan hashes
- target weight hashes
- tx bundle hashes
- instruction semantics