the risk engine.
The risk engine computes model-grade metrics on top of the MNEMON archive. METRON, a pure statistics library, provides the estimators. Orchestrators run the estimators every hour for each market. The results ship as a versioned static API. MNEMON records what happens. The risk engine estimates what can go wrong.
LIQUIDATION CAPACITY
LIF = min(1.15, 1 / (0.3·lltv + 0.7)) // Morpho liquidation bonus
maxSlippage = (1 − 1/LIF) − haircut // what a liquidator can absorb
capacity = max sellable within maxSlippage // DEX ladder + Core book depth
capacity_ratio divides the debt-clearing capacity (capacity / LIF) by the market's total borrow. It is the fraction of the whole book that liquidators can clear profitably in one sweep at current onchain liquidity. At 1.0 or above, the full book clears. Far below 1.0, a large liquidation event exceeds what the venues can absorb. Liquidations then stall, and lenders absorb the shortfall. capacity_ratio_grouped is the stress version: every market that shares the collateral sells into the same liquidity at the same time.
BUFFER BREACH
A market's cushion is 1 − LLTV. This is the price drop that liquidates a borrower at the reference LTV. buffer_breach_freq_{1h,6h,24h} is the share of the last 30 days in which the collateral price fell through the whole cushion within the horizon. It measures the fat tail that volatility alone does not show. The measure is one-sided: price increases never count.
METRIC FAMILIES
| FAMILY | METRICS | WHAT IT MEASURES |
|---|---|---|
| VOLATILITY | realized_vol_7d · realized_vol_30d · ewma_vol_30d | Annualized, from hourly collateral prices; the EWMA has a 7d half-life |
| DRAWDOWN | max_drawdown_30d · worst_window_7d_30d | Max peak-to-trough decline and worst cumulative 7d window, 30d lookback |
| BUFFER BREACH | buffer_breach_freq_1h · buffer_breach_freq_6h · buffer_breach_freq_24h | Share of the horizon's returns that fell through the whole cushion (1 − LLTV) |
| UTILIZATION | avg_util_7d · avg_util_30d · occupancy_below_kink_30d · time_at_utilization_95_30d · time_at_utilization_99_30d · util_spell_median_h · util_spell_p90_h · util_spell_survival_24h | Time-weighted mean utilization (7d/30d), time below the IRM kink, time above 95% and 99%, and u ≥ 0.95 spell statistics with Kaplan-Meier survival |
| CONCENTRATION | hhi · top1_supply_share · top3_supply_share · top1_borrow_share · top3_borrow_share | Herfindahl-Hirschman index of the lender book, and the share of each book held by its 1 and 3 largest addresses |
| RATES | rate_spread_30d | Time-weighted mean borrow-minus-supply APY over 30d |
| ORACLE | depeg_max_30d · depeg_spell_median_h · depeg_spell_p90_h · depeg_survival_24h | Max oracle-vs-reference deviation and depeg spell statistics (|deviation| ≥ 5%) |
| LIQ CAPACITY | capacity_ratio · capacity_ratio_grouped · lif · max_slippage_used | The liquidation-capacity row, also projected as standalone metrics |
Every name above is queryable directly: /v1/risk/metrics/{metric}.json serves the latest value across all markets, and /v1/risk/markets/{market_id}/history/{metric}.json serves one market's full series. See the API section below.
Every value carries an as_of timestamp, a status, and provenance. A metric status is ok, no_data, or insufficient_history. A capacity status is ok, no_route, no_price, or fee_exceeds_margin: the last one means the swap fee alone exceeds the liquidator's margin, so the modeled capacity is zero. A failed computation is always a row with a null value, never a missing key. The as_of grid is hourly since 2026-08-20. Earlier history is daily.
ORACLE IDENTITY
Every market payload carries an oracle block: the oracle contract's address, kind, family, owner status, its four MorphoChainlinkOracleV2 feed slots and vault hooks, and shared_feed_markets — the number of tracked markets that read at least one of the same upstream feeds. This is identity data, not a computed metric. Oracle configuration on Morpho is immutable, so MNEMON probes each address once on-chain and the answer never goes stale. The block carries no model version and no history.
| FIELD | VALUES | MEANING |
|---|---|---|
| kind | oracle-resolved · oracle-custom · feed · oracle-broken · opaque | What the contract is. oracle-broken cannot price; opaque could not be identified |
| family | meta-deviation-timelock · curve-stableswap · constant-peg · custom | Bespoke pricing mechanisms. A constant peg serves a hardcoded price with no live input |
| owner_status | none · ok | ok means the contract exposes an admin that can change what it serves — an upgradable feed is the real risk surface |
| modt | primary · backup · threshold · timelocks | Steakhouse dual-oracle wrappers: serves the primary, fails over to the backup when they deviate past the threshold for the timelock |
| shared_feed_markets | integer | Blast radius: a compromised or broken upstream feed hits this many markets at once |
The site names each feed's provider (Chainlink, RedStone, Pyth, Pendle, ...) from the feed's own on-chain description. The archive itself stays strict: a push feed that does not identify itself is served as unknown, never guessed. Oracles that compose a derived leg — an ERC4626 exchange rate, a Curve LP, a Pendle PT, a hardcoded peg — deviate from spot by construction. The site marks their deviation STRUCT and does not flag it as a depeg.
API
STABLE BY CONTRACT. The schema evolves by addition only (openapi.yaml, test-enforced). Every row carries a model_version. Pin the version you validated against.
The API is rebuilt each hour at :40 UTC. Markets are keyed on (chain_id, market_id) across all tracked chains. Click any endpoint to copy its full URL. The examples below are real responses, truncated.
DISCOVERY INDEX
Read this first. It lists the served market ids, the metric catalog (description, unit, and the latest params per metric), the endpoint templates, and a freshness block per metric (latest_as_of, expected_as_of, fresh).
curl -s https://api.myrmidons-strategies.com/v1/risk/index.json
{
"generated_at": "2026-08-20T13:40:01Z",
"markets": ["0x0a2e456ebd…", "…"],
"metrics": {
"hhi": {
"description": "Herfindahl index of the lender book.",
"unit": "index_0_1",
"params": { "window_days": 30, "weights": "supply_assets" }
},
"…": "…"
},
"freshness": {
"hhi": {
"latest_as_of": "2026-08-20T10:00:00Z",
"expected_as_of": "2026-08-20T12:00:00Z",
"fresh": false
},
"…": "…"
},
"endpoints": { "index": "/v1/risk/index.json", "…": "…" }
}ALL MARKETS
One document with every market. Each entry carries the latest value per metric plus the liq_capacity row. This is the endpoint to poll for a dashboard: one request per hourly cycle covers the whole universe.
curl -s https://api.myrmidons-strategies.com/v1/risk/markets.json
{
"generated_at": "2026-08-20T13:40:01Z",
"markets": {
"0x0a2e456ebd…": {
"chain_id": 999,
"liq_capacity": {
"as_of": "2026-08-20T09:00:00Z",
"capacity_ratio": 6.4235,
"capacity_ratio_grouped": 0.00427,
"lif": 1.0262,
"max_slippage_used": 0.0175,
"status": "ok"
},
"metrics": {
"buffer_breach_freq_1h": {
"as_of": "2026-08-20T10:00:00Z",
"value": 0.0,
"status": "ok"
},
"…": "…"
}
},
"…": "…"
}
}ONE MARKET
One market, latest values only. The same shape as one entry of markets.json, plus the provenance fields (model_versions, metron_version, schema_version).
curl -s https://api.myrmidons-strategies.com/v1/risk/markets/0x0a2e456ebd22ed68ae1d5c6b2de70bc514337ac588a7a4b0e28f546662144036.json
{
"market_id": "0x0a2e456ebd…",
"chain_id": 999,
"liq_capacity": {
"capacity_ratio": 6.4235,
"capacity_ratio_grouped": 0.00427,
"status": "ok"
},
"metrics": {
"hhi": {
"as_of": "2026-08-20T10:00:00Z",
"value": 0.99999,
"status": "ok"
},
"…": "…"
},
"model_versions": ["api-v0.2.0+metron-v1.3.0"],
"metron_version": "1.3.0"
}MARKET HISTORY
The full history for one market, grouped by metric. params and input_window describe the latest point; older points can differ across model_version bumps. Per-point provenance lives in the underlying tables.
curl -s https://api.myrmidons-strategies.com/v1/risk/markets/0x0a2e456ebd22ed68ae1d5c6b2de70bc514337ac588a7a4b0e28f546662144036/history.json
{
"market_id": "0x0a2e456ebd…",
"chain_id": 999,
"metrics": {
"buffer_breach_freq_1h": {
"params": {
"lltv": 0.915,
"buffer": 0.085,
"buffer_formula": "one_minus_lltv",
"lookback_d": 30,
"sampling": "hourly_last"
},
"input_window": {
"start": "2026-07-21T10:00:00Z",
"end": "2026-08-20T10:00:00Z"
},
"points": [{ "as_of": "…", "value": 0.0, "status": "ok" }, "…"]
},
"…": "…"
}
}METRIC HISTORY
One metric, one market, the full series. Points ascend by as_of. The grid is hourly since 2026-08-20 and daily before, so long series mix the two cadences.
curl -s https://api.myrmidons-strategies.com/v1/risk/markets/0x0a2e456ebd22ed68ae1d5c6b2de70bc514337ac588a7a4b0e28f546662144036/history/hhi.json
{
"market_id": "0x0a2e456ebd…",
"chain_id": 999,
"metric": "hhi",
"params": {
"weights": "supply_assets",
"snapshot": "latest_at_or_before_as_of_within_30d"
},
"points": [
{ "as_of": "2026-08-20T09:00:00Z", "value": 0.99999, "status": "ok" },
{ "as_of": "2026-08-20T10:00:00Z", "value": 0.99999, "status": "ok" }
]
}ONE METRIC, ALL MARKETS
One metric across every market. Use it to rank or screen the universe. The liq_capacity fields (capacity_ratio, capacity_ratio_grouped, lif, max_slippage_used) are projected here as metrics too.
curl -s https://api.myrmidons-strategies.com/v1/risk/metrics/capacity_ratio.json
{
"metric": "capacity_ratio",
"source": "liq_capacity",
"generated_at": "2026-08-20T13:40:01Z",
"markets": [
{
"market_id": "0x0309c02dab…",
"as_of": "2026-08-20T09:00:00Z",
"value": 0.0000664,
"status": "ok"
},
{
"market_id": "0x039503b630…",
"as_of": "2026-08-20T09:00:00Z",
"value": 0.0,
"status": "fee_exceeds_margin"
}
]
}