# Inventory Risk

In the context of our design, enabling single-sided liquidity provision eliminates Impermanent Loss (IL) but is replaced by what we call as Inventory Risk (IR). IR occurs when the total liabilities of the protocol becomes greater than the total assets in the system. In our case, when the sum of total value of tokens across all the pools become less than the total amount deposited as liquidity, LPs are exposed to IR.

## Inventory Risk Factor (IRF)

We have introduced a parameter called Inventory Risk Factor (IRF) to measure IR and prevent a situation where Mantis is unable to pay its liabilities:

$$
\text{IRF} =
\begin{cases}
1 &  \text{if} \  \text{NLR} \geq 1\\
\text{NLR} & \text{if} \  \text{NLR} < 1
\end{cases}
$$

Since the loss due to IR is only realised by LPs upon withdrawal, the IRF comes into effect when the following two conditions are satisfied at the time of withdrawal:

* NLR < 1
* Liquidity ratio of the token being withdrawn is less than 1<br>

In such a case, the withdrawal amount is multiplied by IRF (after fees) and is represented mathematically as:

$$
\text{Withdrawal amount} = \text{IRF}(\text{Liabilities} - \text{Fees})
$$

Doing so ensures that the system remains sustainable. LPs are also incentivised to withdraw in other tokens with a liquidity ratio > 1 when NLR < 1, keeping the system in balance.


---

# 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/inventory-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.
