> ## Documentation Index
> Fetch the complete documentation index at: https://docs.intention.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# My winning position was closed

> Auto-deleveraging: why a profitable position can be closed by the protocol, and how the queue is decided.

If a profitable position was closed without you closing it and without being liquidated, it was almost certainly **auto-deleveraging** — ADL.

This is the least intuitive mechanism on any perpetual exchange, so it is worth understanding why it exists rather than only that it happened.

## Why it exists

Every position has a counterparty. When a trader is liquidated and the market moves so fast that closing their position costs more than the margin backing it, the loss does not disappear — somebody absorbs it.

The order of absorption:

<div className="dg" data-dg="adl-absorption">
  <div className="dg-c" style={{aspectRatio:"720 / 344"}}>
    <svg className="dg-w" viewBox="0 0 720 344" aria-hidden="true">
      <path className="dg-wire dg--green dg-soft" d="M 435.00 54.00 L 460.00 54.00 L 460.00 136.00 L 508.60 136.00" />

      <path className="dg-head dg--green" d="M 515.00 136.00 L 508.60 140.40 L 508.60 131.60 Z" />

      <path className="dg-wire dg--green dg-soft" d="M 435.00 136.00 L 460.00 136.00 L 460.00 136.00 L 508.60 136.00" />

      <path className="dg-head dg--green" d="M 515.00 136.00 L 508.60 140.40 L 508.60 131.60 Z" />

      <path className="dg-wire dg--green dg-soft" d="M 435.00 218.00 L 460.00 218.00 L 460.00 136.00 L 508.60 136.00" />

      <path className="dg-head dg--green" d="M 515.00 136.00 L 508.60 140.40 L 508.60 131.60 Z" />

      <path className="dg-wire dg--orange" d="M 215.00 86.00 L 215.00 97.60" />

      <path className="dg-head dg--orange" d="M 215.00 104.00 L 210.60 97.60 L 219.40 97.60 Z" />

      <path className="dg-wire dg--orange" d="M 215.00 168.00 L 215.00 179.60" />

      <path className="dg-head dg--orange" d="M 215.00 186.00 L 210.60 179.60 L 219.40 179.60 Z" />
    </svg>

    <div className="dg-b dg--yellow" style={{left:"0.0000%",top:"7.5581%",width:"59.7222%",height:"16.2791%"}}><span className="dg-t">Liquidation closes into the book</span><span className="dg-s">bounded by the bankruptcy price</span></div>
    <div className="dg-b dg--orange" style={{left:"0.0000%",top:"31.3953%",width:"59.7222%",height:"16.2791%"}}><span className="dg-t">The insurance fund absorbs the shortfall</span><span className="dg-s">funded by liquidation penalties, precisely for this</span></div>
    <div className="dg-b dg--orange" style={{left:"0.0000%",top:"55.2326%",width:"59.7222%",height:"16.2791%"}}><span className="dg-t">ADL closes profitable positions</span><span className="dg-s">at the bankruptcy price, only if the fund cannot cover it</span></div>
    <div className="dg-b dg--green" style={{left:"72.2222%",top:"31.3953%",width:"27.7778%",height:"16.2791%"}}><span className="dg-t">Absorbed — nothing escalates further</span></div>
    <div className="dg-b dg--sky dg-left" style={{left:"0.0000%",top:"76.1628%",width:"100.0000%",height:"19.7674%"}}><span className="dg-t">The alternative</span><span className="dg-s">Socialized loss — every account on the venue taking a haircut — or the venue running an uncollateralized deficit. ADL concentrates the cost on the positions that gained from the same move, rather than spreading it across people who were not involved.</span></div>
    <div className="dg-lbl" style={{left:"45.3889%",top:"27.6163%"}}>not covered</div>
    <div className="dg-lbl" style={{left:"45.3889%",top:"51.4535%"}}>not covered</div>
  </div>
</div>

**First the book.** The position is closed against resting liquidity, bounded by the bankruptcy price.

**Then the [insurance fund](/trading/liquidations)**, which is funded by liquidation penalties precisely for this.

**Then ADL**, only if the insurance fund cannot cover it. Profitable traders on the opposite side are closed at the bankruptcy price to balance the books.

The alternative is socialized loss — every account on the venue taking a haircut — or the venue running an uncollateralized deficit. ADL concentrates the cost on the positions that gained from the same move, rather than spreading it across people who were not involved.

## Why you were selected

ADL works through a ranked queue. You are ranked by:

$$
\text{ADL score} = \text{unrealized P\&L \%} \times \text{effective leverage}
$$

Both terms are evaluated at the bankruptcy price. The highest scores are deleveraged first.

Read that formula as: **the most profitable, most leveraged positions go first.** Being deleveraged is a signal that you were on the right side of a violent move with a lot of leverage — which is exactly the position that gained from the shortfall being created.

Reducing leverage lowers your score and moves you down the queue. It is the only lever you control.

## What it means for your money

**You keep the profit up to the bankruptcy price.** ADL is not a penalty and carries no fee. You are closed at a defined price, not an arbitrary one.

**You lose the position, not the gains.** What you give up is the profit you would have made had it stayed open.

**You can re-open.** Nothing prevents you taking the position again — at the current price, with the current book.

## How to tell it was ADL

Order History shows the closure with its reason, distinct from an ordinary fill or a liquidation. Trade History shows the execution price, which should be the bankruptcy price of the account being closed against you.

If a position closed and you cannot find a matching order of your own, check there before assuming it was an error.

## Reducing your exposure to it

**Use less leverage.** It lowers your ADL score directly, and it is the whole of what you control.

**Take profit in pieces.** A partially closed position realizes gains that ADL cannot take back.

**Watch it in volatile markets.** ADL becomes likely exactly when a market has moved far and fast — the same conditions that made your position profitable.

<Note>
  ADL is rare and is a last resort, reached only after the book and the insurance fund have both been exhausted. It is not a routine cost of trading. But it is a real risk of holding a large, highly leveraged, highly profitable position through a violent move, and it cannot be opted out of.
</Note>

## Where to go next

<CardGroup cols={2}>
  <Card title="Auto-deleveraging" href="/trading/adl">
    The full mechanism and the queue.
  </Card>

  <Card title="Liquidations" href="/trading/liquidations">
    What happens before ADL is reached.
  </Card>

  <Card title="Leverage" href="/trading/leverage">
    The one input to your ADL score you control.
  </Card>

  <Card title="Risk disclosures" href="/protocol/security/risks">
    What remains exposed, stated plainly.
  </Card>
</CardGroup>
