> For the complete documentation index, see [llms.txt](https://docs.strikefinance.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.strikefinance.org/perpetuals/liquidations/auto-deleveraging-adl.md).

# Auto-Deleveraging (ADL)

Auto-Deleveraging is the last resort mechanism when the Insurance Fund cannot absorb a bankrupt position. Instead of the Insurance Fund taking the loss, profitable opposing traders are forced to close part of their positions to offset the bankrupt trader's loss.

ADL is rare by design — it only occurs when the Insurance Fund is depleted or at its risk limits. The graduated liquidation system (margin call -> reduce-only -> liquidation) is designed to close positions before they reach bankruptcy in the vast majority of cases.

### Type 1 ADL — Bankrupt Position Rejected by Insurance Fund

This is the standard ADL flow, triggered automatically when the Insurance Fund cannot accept a bankrupt position due to its risk limits being reached.

#### Process

1. **Bankrupt position is closed** — The bankrupt trader's position is closed at the bankruptcy price with zero fees, identical to the normal bankruptcy closure process.
2. **Counterparty selection** — The protocol identifies all traders holding profitable positions on the **opposite side** of the bankrupt position. For example, if a long position went bankrupt, profitable short holders are selected as candidates (and vice versa). Only positions with positive unrealized PnL qualify — traders who are currently at a loss or breakeven are never selected.
3. **Ranking** — Candidates are ranked by a score that factors in both profitability and leverage:

   **Score = PnL Percentage x Effective Leverage**

   Where:

   * **PnL Percentage** = UPnL / Notional — how profitable the position is relative to its size
   * **Effective Leverage** = Notional / Margin Balance — how leveraged the position is
   * **Margin Balance** = Initial Margin + UPnL

   Notional is calculated at the current mark price. Traders who are both highly profitable and highly leveraged rank highest. This is by design — these traders have extracted the most profit from the market while using the least margin, making them the most natural counterparties to absorb the loss.
4. **Sequential deleveraging at bankruptcy price** — Starting with the highest-scored candidate, positions are partially or fully closed at the **bankruptcy price** of the bankrupt trader. The protocol works through the ranked list until the entire bankrupt position size is fully offset:
   * If a candidate's position is larger than the remaining size, only a partial close is executed — the candidate keeps the rest of their position.
   * If a candidate's position is smaller than the remaining size, their full position is closed and the protocol moves to the next candidate.
   * If a candidate fails to process for any reason, they are skipped and the next candidate is used.

#### Settlement

* All ADL settlements execute at the **bankruptcy price** of the bankrupt position — not the mark price, oracle price, or any other reference.
* All ADL settlements have **zero fees**.
* The realized PnL for each counterparty is determined by the difference between their entry price and the bankruptcy price. Since ADL only targets profitable traders, counterparties will still realize a profit — but potentially less than if they had closed at the current mark price.
* Each affected trader receives a fill record in their trade history showing the ADL settlement.

#### Example

A trader is long 10 BTC with a bankruptcy price of $50,000. The current mark price is $48,000. The Insurance Fund cannot accept the position.

The protocol selects profitable short holders ranked by score:

1. Trader A: short 4 BTC, score 0.85 — 4 BTC is closed at $50,000
2. Trader B: short 8 BTC, score 0.72 — 6 BTC is closed at $50,000 (only the remaining amount needed)

Trader A and Trader B both entered their shorts at a higher price, so settling at $50,000 still results in profit for them — but less than they would have made closing at the $48,000 mark price.

### Type 2 ADL — Emergency Deleveraging

This is an emergency ADL mechanism used when the Insurance Fund itself needs to offload positions due to internal risk concerns. Unlike Type 1, this settles at mark price rather than bankruptcy price.

#### Process

1. **Emergency ADL is triggered** — The protocol determines that the Insurance Fund needs to reduce its exposure in a specific market, specifying the symbol and target size to offload.
2. **Insurance Fund position is reduced** — The Insurance Fund's position in the specified market is partially or fully closed at the current **mark price**.
3. **Counterparty selection and ranking** — Same process as Type 1: profitable traders on the opposite side of the Insurance Fund's position are identified and ranked by `PnL% x Effective Leverage`. Only positions with positive UPnL qualify.
4. **Sequential deleveraging at mark price** — Counterparty positions are partially or fully closed at the **mark price** until the target size is fully offset. The same sequential logic applies — largest-scored candidates first, partial fills if a candidate is larger than needed, skip to next if smaller.

#### Settlement

* All Emergency ADL settlements execute at the current **mark price** — a fairer settlement than Type 1 since the Insurance Fund is not bankrupt, just managing risk.
* All settlements have **zero fees**.
* The Insurance Fund realizes PnL on its closed portion based on the difference between its entry price (the original bankruptcy price from the transfer) and the mark price.
* Counterparties realize PnL based on the difference between their entry price and the mark price.
* The target size to offload cannot exceed the Insurance Fund's current position size in that market, and must be in the same direction.

#### Key Differences from Type 1

|                         | Type 1                                                                                                 | Type 2 (Emergency)                                               |
| ----------------------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
| **Trigger**             | Automatic — IF risk limits exceeded on incoming bankrupt position                                      | Emergency — IF needs to reduce its own exposure                  |
| **Settlement price**    | Bankruptcy price                                                                                       | Mark price                                                       |
| **Insurance Fund role** | IF never holds the position                                                                            | IF is offloading an existing position it inherited               |
| **Source of position**  | Bankrupt trader's position                                                                             | Insurance Fund's own position                                    |
| **Completeness**        | Best-effort — if not enough counterparties, the bankrupt position is still closed but not fully offset | Must fully offset — fails if not enough counterparties available |

### ADL Indicators

Traders can monitor their ADL risk based on their position's ranking score. The score is determined by two factors:

* **Position profitability** — Higher unrealized profits relative to your position's notional value increase your score.
* **Effective leverage** — Higher notional exposure relative to your margin balance increases your score.

Only positions on the **opposite side** of a bankrupt position are at risk. If you are long, only a bankrupt short position could trigger ADL against you (and vice versa).

#### Reducing Your ADL Risk

* **Take partial profits** — Closing part of your position reduces your unrealized PnL and therefore your score.
* **Use lower leverage** — Lower leverage means more margin backing your position, reducing your effective leverage ratio.
* **Add margin** — Depositing additional margin increases your margin balance, which lowers your effective leverage.

ADL is an extremely rare event and only occurs when the Insurance Fund is unable to absorb losses. The multi-layered liquidation system is designed to prevent the vast majority of positions from ever reaching bankruptcy.


---

# 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.strikefinance.org/perpetuals/liquidations/auto-deleveraging-adl.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.
