> For the complete documentation index, see [llms.txt](https://d8x.gitbook.io/d8x/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://d8x.gitbook.io/d8x/contribute-and-earn/liquidators.md).

# Liquidators

<figure><picture><source srcset="/files/UBxAzKPEKtaqXUBTxWb8" media="(prefers-color-scheme: dark)"><img src="/files/l6fqBnynrw49jEQcJjGS" alt=""></picture><figcaption></figcaption></figure>

## What are Liquidators?

Anyone can be a liquidator and [request the AMM to liquidate a given trader](/d8x/perpetual-contracts-guide/liquidations.md). The AMM then either rejects the request if the trader margin is above the initial margin, or proceeds.

The [liquidator earns a fee](/d8x/perpetual-contracts-guide/fee-structure.md#liquidation-fees) that is subtracted from the trader margin. The liquidation fee is shared between the protocol and the liquidator.

## How can you liquidate positions?

There are different ways to liquidate traders on D8X:

* The [D8X Futures Node SDK provides functions to liquidate positions](/d8x/node-sdk/modules.md)
* The [D8X open-source liquidator bots](https://github.com/D8-X/d8x-liquidator) allow to liquidate positions
