Architecture
Contract boundaries and runtime flow.
Design Principle
Keep pricing, risk, hook interception, and collateral accounting modular so each unit can be audited and upgraded independently.
Runtime Flow
Mode behavior:
- No signed quote: pure AMM pass-through; the hook returns zero delta and skips vault settlement.
- Valid signed quote: signed quote settlement with signed quote policy checks applied in
CollateralManagerbefore state mutation. - Invalid supplied signed quote: revert (no same-transaction fallback to unsigned settlement).
Module Boundaries
Failure-Mode Routing
Operational Controls
- Admin roles tune collateral parameters and ceilings in RiskConfig.
- Guardian-style controls can force restrictive modes.
- Explicit events provide operational visibility on safety transitions.
Explore By Module
Open Module Deep Dives for page-by-page technical and commercial breakdowns.