All docs
Risk engine
How a limit is derived, and the tiering behind the 97% ceiling.
Spec: README Sections 13-14, 48-49
The risk engine turns holdings into a number: collateral value, maximum borrow, liquidation threshold and health factor. It is intended to be deterministic and independently testable — given the same holdings and prices it must always produce the same limit.
LTV by risk tier
| Tier | Examples | Max LTV | Liquidation | To bad debt |
|---|---|---|---|---|
| Tier 1 — Very liquid | SPY, liquid ETFs | 97% | 98% | 2 pts |
| Tier 1 — Large cap | AAPL, MSFT, AMZN | 96% | 98% | 2 pts |
| Tier 2 — High volatility | NVDA | 94-95% | 97% | 3 pts |
| Tier 3 — Very high volatility | TSLA | 92-94% | 96-97% | 3-4 pts |
| Tier 4 — Lower liquidity | Small-cap, thinly traded | 85-90% | 92-95% | 5-8 pts |
$100 Collateral
│
├── $97 Maximum Borrow
│
├── 98% LTV → Liquidation Begins
│
└── 100% LTV → Insolvency / Bad DebtHealth factor
Health Factor = Liquidation Value / DebtAbove 1.00 the position is healthy; below 1.00 it can be liquidated. Liquidation value is the sum of each holding valued at its own liquidation threshold, so a portfolio of mixed tiers produces a blended figure rather than a single asset’s number.
Inputs to the collateral factor
- Realised and implied volatility
- Liquidity and liquidation depth
- Market capitalisation and trading volume
- Oracle quality and update latency
- Trading status — halts, market hours
- Historical drawdown and correlation