# Insurance Fund

For the AMM to be viable for LPs, the liquidity returned to the pool when a trader's position is liquidated at any time in the future must be at least as large as the original liquidity fronted by LPs.

Insurance balances are set aside in the form of passively held X and Y tokens, effectively an impermanent gain mechanism that kicks in as price drops on a long position, increasing the contribution to additional liquidity from the insurance amounts passively held internally in the pool.

Marginal is setup such that the insurance balances guarantee that LPs never experience a liquidity shortfall (ignoring potential funding payments from the pool).


---

# 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://marginal.gitbook.io/docs/protocol/insurance-fund.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.
