> For the complete documentation index, see [llms.txt](https://docs.mantissa.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mantissa.finance/mantis-scroll/risk-mitigation/inventory-risk.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
