← Risk Engine Validation & Stress Testing Report
Glossary
Definitions for all scoring terms, model parameters, and metrics used in this report.
Score Scale
All scores in this report are expressed on a 0.0-1.0 scale (internal representation). In the production UI, scores are displayed on a 1-10 scale (multiplied by 10). For example, a composite score of 0.996 in this document appears as 9.96 in the UI.
Scoring Components
| Term | Column | Definition | Range |
|---|---|---|---|
| Utilization | Util | Ratio of total borrowed to total supplied capital. Higher utilization means less exit liquidity for lenders. | 0.0-1.0 |
| LP Nakamoto Coefficient | LP Nak | Minimum number of liquidity providers (LPs) whose combined supply reaches 51% of total pool supply. Measures supply-side concentration. | 0.0-1.0 |
| LP Max Power Ratio | LP Max | 1 minus the share held by the single largest LP. Catches single-entity dominance even when Nakamoto k is moderate. | 0.0-1.0 |
| Borrower Nakamoto Coefficient | Bor Nak | Minimum number of borrowers whose combined debt reaches 51% of total pool debt. Measures demand-side concentration. | 0.0-1.0 |
| Borrower Max Power Ratio | Bor Max | 1 minus the share held by the single largest borrower. | 0.0-1.0 |
| Liquidation Buffer | Liq Buf | Weighted average distance between current collateral ratio and liquidation threshold across all borrower positions. | 0.0-1.0 |
| Extreme Event Resilience | Stress | Lender's Expected Shortfall under stressed Monte Carlo simulation. Measures tail-risk capital impairment, not just liquidation frequency. | 0.0-1.0 |
| Composite Score | Composite | Weighted sum of all 7 components. Extreme Event Resilience carries 50%, Utilization 18.75%, Liquidation Buffer 12.5%, concentration metrics 18.75%. | 0.0-1.0 |
Oracle Risk Tiers
| Tier | Score Range | What It Means |
|---|---|---|
| Reference-grade | 0.9-1.0 | Decentralized oracle network, multiple data sources, high volume, market-discovered prices |
| Moderate risk | 0.7-0.8 | Reliable feed with concentration risk, spread risk, or cross-rate derivation |
| Elevated risk | 0.5-0.6 | Multi-hop price derivation (wrappers, adapters) or thin liquidity |
| High risk | 0.3-0.4 | Accounting-derived prices (e.g., ERC-4626 totalAssets/totalSupply), no market price discovery |
| Very high risk | 0.1-0.2 | Upgradeable proxies, permissioned vaults, near-zero volume, hack/bridge-failure history |
Risk Engine Parameters
| Parameter | Definition |
|---|---|
| LTV (Loan-to-Value) | Ratio of loan value to collateral value. LTV = 1 / collateral_ratio. Higher LTV = less buffer. |
| Liquidation LTV | The LTV threshold at which liquidation triggers. When current LTV exceeds this, the position is liquidated. |
| MC iterations | Number of Monte Carlo simulation paths per scoring run. More iterations = tighter convergence. |
| Volatility shock | Multiplier applied to the historical volatility estimates. volatility_shock = 9.0 scales volatility by (1 + 9.0) = 10x. |
| Model lookback | Number of days of historical price data used for volatility estimation and simulation calibration. |
| Loan duration | Simulated term of the loan in the Monte Carlo simulation. |
| Quantile | Tail percentile used for Expected Shortfall computation. The 99.99th percentile means conditioning on the worst 0.01% of outcomes. |
Simulation Models
| Model | Definition |
|---|---|
| GBM (Geometric Brownian Motion) | Standard diffusion model generating price paths from historical mean and covariance. Can run with or without a volatility shock multiplier. Uses Cholesky decomposition for correlated multi-asset paths. |
| GBM (stressed) | GBM with volatility_shock = 9.0 applied — scales historical volatility by 10x to model extreme tail events beyond historical observation. |
| GBM (no shock) | GBM without volatility shock — uses historical volatility as-is. Comparable to GARCH for baseline behavior. |
| GARCH (Beta-GARCH) | Captures volatility clustering: periods where high volatility persists and produces fatter tails than constant-volatility GBM. Uses a market-factor model with BIC-selected lag structure. |
| Historical | Non-parametric sliding window replay of actual daily price history through the loan state machine. No distributional assumptions — output reflects what actually happened in the historical window. |
Output Metrics
| Metric | Definition |
|---|---|
| Pr(Liquidation) | Probability that the position triggers a liquidation event during the simulation. High Pr(Liquidation) does not necessarily mean lender loss — the liquidation mechanism may recover capital. |
| Lender ES (Expected Shortfall) | Average loss to the lender in the tail of the loss distribution, expressed as a percentage of loan principal. ES at the 99.99th percentile means the average loss in the worst 0.01% of simulations. |
| LossVaR (Value at Risk) | The loss threshold at a given quantile. The actual ES is the average of losses exceeding this threshold. |
| Worst CCR (Collateral Coverage Ratio) | The lowest ratio of collateral value to loan value observed across all simulation paths. CCR > 1.0 means the lender is always covered. |
| CV (Coefficient of Variation) | Standard deviation divided by mean, expressed as a percentage. Measures the stability of ES estimates across repeated simulation runs. Lower CV = more stable. |
| Score | Computed from ES: score decreases proportionally with Expected Shortfall from the lender's perspective. Score of 1.0 = negligible lender loss. Score of 0.30 = ~70% tail loss. |
Aggregation Methods
| Method | Where Applied | Why |
|---|---|---|
| Geometric mean | Oracle feeds in a price chain (Level 2), composite score across Market/Oracle/Protocol risk | Chained dependencies — a weak link drags the entire score. One catastrophic failure cannot be masked by strength elsewhere. |
| Weighted arithmetic average | Market risk components (7-component scoring), vault-level oracle score across allocated markets | Components or markets are not directly linked — each contributes proportionally to its weight or allocation. |
Stability Scoring Terms
| Term | Column | Definition | Range |
|---|---|---|---|
| Stability | Stability | Per-candle ratio of worst-case price alignment between asset and reference: ratio_low / ratio_high. 1.0 = perfect peg. | 0.0-1.0 |
| Deviation | Deviation | Percentage departure from peg: (1 - stability) * 100. | 0-100% |
| Stability Score | Score | Time-aggregated score combining EWMA of instability and 7-tier peak-decay penalty. 1.0 = perfect peg history. | 0.0-1.0 |
| Tier | Tier | Severity classification based on deviation magnitude. 7 tiers with geometrically doubling thresholds from 1% to 64%. Only the worst tier fires per candle. | 0-6 |
| Threshold | Threshold | Deviation percentage that activates a tier. Geometric doubling: 1%, 2%, 4%, 8%, 16%, 32%, 64%. | 1-64% |
| Half-Life | Half-Life | Days for peak-decay memory to halve per tier. Matches threshold doubling: 1, 2, 4, 8, 16, 32, 64 days. | 1-64 days |
| Lambda | Lambda | Penalty weight per tier. Geometric doubling: 0.05, 0.10, 0.20, 0.40, 0.80, 1.60, 3.20. Higher tiers penalize harder. | 0.05-3.20 |
| Peak-Decay | — | Memory mechanism that tracks the worst event per tier at full magnitude, then decays exponentially. Unlike EWMA, severe events are not averaged away. | — |
| Asset | Asset | CoinGecko slug of the token being measured for peg stability. | — |
| Reference | Reference | CoinGecko slug of the peg target (e.g., ethereum for LSTs, tether for stablecoins). | — |
Stale Data Terms
| Term | Column | Definition | Range |
|---|---|---|---|
| Cross-source validation | — | Invariant checks that cross-verify data from multiple sources during each ETL snapshot. Divergence is persisted as structured JSON in the snapshot record. | — |
| Pipeline freshness monitoring | — | Monitoring service that tracks data age for every materialized table and flags tables as STALE when they stop refreshing. | — |
| Oracle architectural scoring | — | Deductions applied to oracle scores when the on-chain contract lacks staleness validation in its implementation. | -0.05 to -0.10 |
| SYNCHRONIZED | Status | Materialized table data age is within configured threshold. | — |
| STALE | Status | Materialized table data age exceeds configured threshold. Reported with exact age in minutes. | — |
| MISSING_DATA | Status | Missing rows exceed configured percentage threshold. | — |
Precision Terms
| Term | Column | Definition | Range |
|---|---|---|---|
| STRING (uint256) | — | BigQuery STRING type used for lossless storage of Solidity uint256 values. No truncation regardless of token decimal count. | — |
| BIGNUMERIC | — | BigQuery fixed-precision numeric type with 38 digits of precision. Used for rates, ratios, and USD valuations. Exceeds the range of Solidity uint128. | — |
| Decimal | — | Python Decimal type used in the domain layer for all financial computations. No floating-point arithmetic touches financial values between ingestion and persistence. | — |
API Latency Terms
| Term | Column | Definition | Range |
|---|---|---|---|
| p50 / p90 / p99 | Latency | Percentile latency across all benchmark requests. p99 = 99th percentile (worst 1% of requests). | seconds |
| Acceptance criterion | — | p99 latency must remain below 12 seconds (average Ethereum block time). | < 12s |
Protocol-Specific Terms
| Term | Definition |
|---|---|
| AAVE V3 | Decentralized lending protocol. Reserves are individual asset markets within a larger pool contract. |
| Morpho Blue | Permissionless lending protocol with isolated markets. Each market has its own collateral/loan pair and oracle. |
| Morpho Vault (MetaMorpho) | Vaults that allocate capital across multiple Morpho Blue markets. Vault-level scores aggregate market-level scores. |
| ERC-4626 | Token standard for yield-bearing vaults. Share price = totalAssets / totalSupply. Accounting-derived, not market-discovered. |
| Chainlink V2 | Decentralized oracle network providing price feeds. Feeds are classified by Chainlink into Low/Medium/High/Very High risk categories. |
| Cholesky decomposition | Mathematical method to generate correlated random paths from a covariance matrix. Ensures that if one asset drops, correlated assets drop together in the simulation. |
| Nakamoto Coefficient | The minimum number of entities whose combined holdings control 51% of the total. Named after the concentration measure concept. k=1 means a single entity dominates. |