# Liquidation

Liquidation occurs when a trader's position is automatically closed to prevent further losses. It happens if the position's value falls to or below a specified liquidation price, ensuring the trader maintains sufficient collateral in their account.

#### **How is the liquidation price calculated?** <a href="#how-is-the-liquidation-price-calculated" id="how-is-the-liquidation-price-calculated"></a>

The liquidation price is calculated by incorporating the liquidation premium, Keeper fees, and the liquidation buffer into the base formula.

#### **Liquidation Premium** <a href="#liquidation-premium" id="liquidation-premium"></a>

The liquidation premium is expressed as a percentage and is disbursed to the HZN liquidity provider during a liquidation event.

This incentivizes HZN liquidity providers to participate in the liquidation process. It serves as a reward for being the counterparty to the trade when a user's position faces liquidation. Additionally, centralized exchanges (CEXs) may impose a separate liquidation fee.

#### **Keeper Fees** <a href="#keeper-fees" id="keeper-fees"></a>

Keeper is the one that triggers the liquidation event, and a % of the fee from liquidation goes to the keeper.

#### **Liquidation Buffer** <a href="#liquidation-buffer" id="liquidation-buffer"></a>

The liquidation buffer plays a crucial role in preventing negative margins during periods of market volatility. It accounts for the time delay involved in the liquidation process carried out by a Keeper. A negative margin would imply that no premium is potentially paid to stakers and keeper for acting as the counterparty in the user's trade.

In the oracle based system the liquidation price is highly competitive due to its low liquidation buffer. With approximately a 60 basis points (bp) buffer, a maximum leverage position of 50x has a liquidation price only 1.4% away, compared to the standard 0.95% away. This advantage enhances risk management by providing a more favorable liquidation price, even in volatile market conditions.


---

# 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://docs.xpanse.trade/oracle-based-system/trading-on-oracle-based-system/liquidation.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.
