Turn risk concepts into something I could stress.

I built RiskForge after reading through DeFi risk work and wanting to understand the underlying mechanics hands-on. The goal was not to clone a production risk platform. It was to make assumptions explicit, run controlled shocks, and see how protocol-level outcomes moved.

Start with a deterministic stress path.

The app applies a ladder of market shocks to a synthetic portfolio and measures the share of debt that becomes liquidatable. Breaking exposure down by collateral asset makes concentration effects visible instead of hiding them in one aggregate number.

Debt liquidatable83.99%at −50% shock
ETH liq. @ −20%97positions
BTC liq. @ −20%37positions
SOL liq. @ −20%45positions

Then make the stress stochastic.

I ran 1,000 correlated simulations and tracked the distribution of liquidatable debt share rather than relying on one deterministic scenario. That makes tail outcomes and threshold exceedance probabilities visible.

Monte Carlo result

Across 1,000 simulations, mean liquidatable debt share was about 0.1503. The app also exposes the probability of crossing a 25% liquidation threshold.

Ground the scenario generator in observed behavior.

Using market data from 2022 onward, I calibrated annualized volatility and cross-asset correlation inputs.

ETH vol0.6914annualized
BTC vol0.5098annualized
SOL vol0.9427annualized
ETH–BTC corr0.8473

Separate the engine from the exploration layer.

  • Deterministic shock ladders and Monte Carlo scenarios answer different questions, so I kept both.
  • Threshold sensitivity shows how policy assumptions alter liquidation outcomes.
  • The simulation engine lives as a Python package with tests; Streamlit is the interactive analysis layer.