# Depegging Risk

Stablecoins and other pegged assets like wrapped versions of the same asset such as wBTC or liquid staking tokens such as stETH should ideally maintain a consistent 1:1 exchange rate with the currency to which they are pegged. However, a token may lose its peg or even collapse completely - periods of intense buy/sell activity can create larger deviations - incurring serious losses to LPs, as highlighted by the recent event of UST depegging and collapse.

NLR, which determines the health of our protocol, is affected in the event of depegging. Under normal conditions, the NLR of Mantis will remain close to 1 and any loss due to Inventory Risk (IR) will be negligible. The depegging of a token can result in a lower NLR value of the system, which may lead to significant losses for LPs.

Any value of NLR < 1 is undesirable for the protocol and needs to be mitigated. This becomes critical for depegged tokens which can reduce NLR significantly. Our slippage curve design protects NLR from going too low, thereby protecting the liquidity providers. However, we employ additional measures to ensure that an impending depeg incurs minimal loss to our LPs which can be successfully offset by trading fees and other incentives.

## Risk Tolerance Variable (RTV)

We introduce a new parameter, Risk Tolerance Variable (RTV) for each token in our pool. RTV determines the amount of risk the protocol is willing to take in case of a peg deviation for a token and prevents the liquidity ratio of a volatile token from going beyond a certain threshold. When a token surpasses the risk threshold, a circuit breaker is triggered that halts swaps from this token until the protocol returns to a more stable state. Even if the token fully depegs after this point, the system remains in the same state, unaffected by the depeg. For instance, the losses due to the recent UST collapse could have been prevented using this risk tolerance circuit breaker on top of our slippage curve.

To measure the impact of a token on protocol health if it fully depegs in the future, we calculate the NLR value after removing this token from the calculation. Mathematically

$$
\text{NLR}\_{i} = \frac{\sum\_j p\_j A\_j}{\sum\_j L\_j} \text{ } \forall j\neq i
$$

For a token i, when `RTVi > NLRi`, swaps from token i to any other token are stopped. Further depegging has no effect on the NLR of the system.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mantissa.finance/mantis-scroll/risk-mitigation/depegging-risk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
