# How Does Equilibrium's Risk Model Work?

Navigating the market under smart algorithmic control, Equilibrium’s risk model determines multiple impactful parameters: cost of borrowing, bailsmen rewards, and how and when the bailout liquidity pool gets tapped. So how does it work? We’ll unpack this for you below.**Bailsmen cover most unexpected losses**

This chart shows the distribution of the credit losses. A credit event indicating that a loss has occurred is an important concept within risk modeling. With Equilibrium, that credit event is a default — the borrower’s collateral value becomes less than borrower’s debt value.

From the chart we can distinguish three categories of loss:

- Expected loss, which is covered by borrower overcollateralization
- Unexpected loss, which is covered by bailsmen liquidity.
- Stress loss (the tail of the distribution), which is covered by treasury reserves.

The expected loss corresponds to the mean value of the credit loss distribution, so it is only an average loss that can be easily exceeded. Therefore we define the unexpected loss as the difference between a high quantile (like 99.9 %) and the expected loss. Bailsmen should hold enough capital in order to fully cover the unexpected loss, but how much is enough? Equilibrium’s risk model answers this question.

**Stress testing to adjust interest rates **

Our risk model conducts a stress test of system liquidity daily to figure out the amount of bailsmen liquidity necessary to maintain system solvency. We stress-test collateral and bailsman pools on-chain, and incentivize borrowers to pay back loans or bailsmen to bring more funds in by scaling the interest rate, depending on the available liquidity. At a high level, we undertake a process that goes like this:

But insufficient collateral can be a deceptive measure. Consider the following hypothetical system configuration:

It makes no sense to include Borrower1's collateral and debt in aggregate values when stress testing the system. This position is virtually risk-free and would lead to improper calculation of insufficient collateral. Equilibrium sets a cap on portfolio collateralization levels and debt amounts — anything beyond that cap is considered riskless.

We use Value at Risk to perform stress tests. This is a good measure, but it still comes with some limitations — it assumes lognormal distribution of collateral returns, and with frequent extreme events (fat tails), we all know crypto returns are anything but lognormal.

**Why is Equilibrium’s risk model sustainable?**

Here are some questions for further consideration:

- Given the sample distribution of collateral returns available to us, what is the best distribution fit of the left tail, and how do we account for sample bias?
- A sample of discrete interval collateral returns is only one sample drawn from the actual law that governs collateral return, so how do we account for parameter uncertainty?

To answer these questions we have to use more complicated non-parametric methods for stress-testing portfolios. One of the possible approaches here is a decomposition of portfolio risk to model the dependence structure among the assets, and to see if the risk contributions of various portfolio components differ significantly. (Spoiler alert: this is not the case for crypto assets.)

Given all the above, we need to make the collateral and bailsman portfolios as diverse as possible. This means incentivizing the addition of stablecoins and other assets that aren’t crypto-correlated into the mix. This is where our recent Curve protocol implementation will come in very handy, as we may use Curve LP tokens both as collateral and bailsman liquidity. These tokens express rising price dynamics and are not correlated to other crypto assets.

Finally, if the bailsman liquidity fails to safeguard the system, the bailsmen themselves can become undercapitalized. Equilibrium has a treasury that holds a significant chunk of the EQ token allocation (35% of the entire supply) for this scenario. It simultaneously replenishes itself with a fraction of the borrower interest fees. This treasury will act as a liquidity of last resort covering all of the stress losses.

Risk is inevitable in the crypto market. It all comes down to managing that risk effectively, and our risk model will excel in a wide variety of market conditions.

The outline of our series:

- The Fundamentals Of Equilibrium
- Advantages of Equilibrium
- How Equilibrium’s Stablecoin Works
- Key Functionality of The EQ Token
- Bailouts: The New Normal For Managing Debt In DeFi
- Equilibrium’s Risk Model
- Liquidity Farming
- Governance
- Equilibrium’s DEX

**Follow us:**

Website | Twitter | Telegram |Facebook