> For the complete documentation index, see [llms.txt](https://satoshistreetbets.gitbook.io/satoshiswap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://satoshistreetbets.gitbook.io/satoshiswap/technicals/liquidations.md).

# Liquidations

### What are liquidations?

Trading positions in the SatoshiSwap protocol can be subjected to a **liquidation,** in much the same way positions in a traditional centralized leveraged trading system can be liquidated. A liquidation is a forceful closure of a leveraged long or short by the smart contract due the price has increasing or decreasing too much in the opposite direction to what the trader intended. Leveraged trades rely on borrowed funds and to ensure these funds aren't at risk, positions are automatically exited by the system if they veer too close to the trading position having insufficient funds to keep the position open.

### Liquidation Causes

More specifically, the 3 main causes of liquidations are:

1. Trading pair price rises above the calculated liquidation price for a short position
2. Trading pair price falls below the calculated liquidation price for a long position
3. The position is left open for so long that the accrued debt has become close to the total position value&#x20;

Just as in a traditional centralized system, traders should closely monitor their trading positions in order to avoid being forcefully liquidated.

### Liquidation Rewards

Liquidations are triggered by any external market participant who observes a position has gone past the liquidation price threshold. To provide an incentive for this costly monitoring and execution process a percentage of the liquidation fee is shared with liquidators to reward them for their part in maintaining the system.

### Liquidation Theshold

The current system configuration sets this to be when less than 10% of the maintenance margin is left.

### Liquidation Event

A liquidated trade gets all of it's proceeds sent to the treasury where they are distributed to SatoshiSwap holders.


---

# 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://satoshistreetbets.gitbook.io/satoshiswap/technicals/liquidations.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.
