> For the complete documentation index, see [llms.txt](https://docs.zaros.fi/overview/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaros.fi/overview/products/perpetuals-dex/liquidation.md).

# Liquidation

### Liquidation Criteria

A user's position is subject to liquidation if their **Account Value** drops below the **RequiredMaintenanceMargin**. This process is vigilant, with Keepers tasked to continuously monitor positions against maintenance margin requirements. They utilize an **eventTrigger** mechanism to initiate liquidations, enhancing market stability.

$$
isLiquidatable =
\begin{cases}
\text{requiredMM} + \text{liquidationFeeUsd} \geq \text{marginBalanceUsd} \\
\end{cases}
$$

**Note:** `requiredMM` stands for the `requiredMaintenanceMargin`

#### Liquidation Mechanics

The liquidation process leverages Chainlink oracle data feeds for accurate price referencing, ensuring liquidations are executed at the oracle's quoted price. This task is facilitated by `LiquidationBranch.sol`, which adheres to predetermined upper and lower price boundaries during the liquidation phase.
