# Liquidation

## Overview

Opening a leveraged position is equivalent to borrowing assets from liquidity providers of the same pool to buy/sell an asset.

If the value of that asset/position (of which trading symbol you're trading) decreases, the losses approach the value of your margin.  Keep in mind that should you have positions in several symbols of the same trading pool, a total margin requirement would be calculated for all of your positions.\
\
&#x20;Please note accordingly, forced liquidations are executed on the account level too. In the case of forced liquidation, you would lose all of your margin balance, i.e. your margin balance would become 0.&#x20;

Any price movement causing the dynamic effective balance of your account to drop below the Maintenance Margin Requirement, account-level liquidation will take place.

{% hint style="warning" %}
Traders can prevent liquidation by depositing additional margin or by closing their position(s), to avoid your account of falling below the maintenance margin requirement
{% endhint %}

## Liquidator

Since Deri Protocol is completely on-chain, Liquidation is not carried out by Deri Protocol, but by calling the *liquidate()* function of the respective smart contract. It is a public function open to be called by anyone. That is, anybody can help the liquidation by paying the gas to invoke the function to liquidate a position with insufficient margin (below maintenance margin requirement). The successful liquidator is rewarded by part of the remaining value of the position being liquidated.

While everyone is encouraged to participate in liquidation, liquidators are required to stake DERI in the "privileger" pool with a staking amount no less than the average level. Please refer to FAQ "[How to become a qulified liquidator](/library/faqs.md)" for details.&#x20;


---

# 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.deri.io/how-it-works/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.
