Module Deep DivesRisk and Pricing Layer
SolvencyEngine
Collateral value, haircut, and mint-bound safety calculations.
What It Does
SolvencyEngine provides deterministic calculations that answer:
- current collateral value after risk haircut
- whether a state transition remains solvent
- how much additional stable can be minted safely
Core Math Concepts
- collateral value is haircut-adjusted, not gross
- debt must remain below MCR-constrained capacity
- minting is bounded by remaining safe headroom
Integration Points
- called by
CollateralManagerbefore and after transitions - aligned with mode-aware behavior where degraded states can tighten assumptions
Why This Is Critical
This module prevents policy bypass by making solvency checks reusable and centralized.