# Insurance fund

## What is the insurance fund?

The insurance fund is designed to compensate for losses caused by the liquidation in extreme market conditions, in order to reduce the possibility of users' Auto-Deleveraging (ADL).

## How are insurance funds generated?

The profits from the positions processed after the liquidation engine takes over the positions will be injected into the insurance fund.

When a liquidation occurs, the liquidation engine will take over the user's position and remaining margin at the bankruptcy price. If the liquidation engine closes the position at a price better than the bankruptcy price, it will generate profits, which will all be injected into the insurance fund.

## How to use insurance funds?

When a liquidation occurs, the liquidation engine will take over the user's position and remaining margin at the bankruptcy price. After the insurance fund compensates a certain amount, it will calculate the closing price of the taken-over position and submit a liquidation order to the market at that price. If the order cannot be executed, ADL will be triggered. It will be easier to close the position after using insurance fund compensation to reduce the possibility of automatic position reduction (ADL) for users.

All perpetual contracts of the same margin currency share the same insurance fund.


---

# 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://futuresdoc.gitbook.io/help-center/perpetual/overview/insurance-fund-and-allocation.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.
