# Liquidation

## Isolated Risk Between Pair

All asset pairs experience different volatility by nature. To support a permissionless margin trading market, isolated pools are needed with risk parameters associated with the pair. **Each pair has its collateral ratio**, according to the pair's volatility and the block time and throughput of the chain. The protocol can support from 1.5X to 10X leverage trading.

## Risk Calculation AMM Prices

**Real-time pricing from the on-chain AMM model is taken as a reference and used in risk calculation and liquidation**. This is important for widening and speeding up the leverage trading market in a decentralized environment, compared to waiting for a Chainlink oracle to create or update market data. As [Vitalik suggested](https://gov.uniswap.org/t/uni-should-become-an-oracle-token/11988), prices from a DEX provide native data are maintained onchain, secured by technical and economical design, and are the defacto oracle for more DeFi use cases, such as margin trading.

## Restrictions

To avoid flash loan attacks, there are restrictions implemented in the protocol design:

* No open, close, or liquidation operations can be in the same transaction
* **Liquidation refers to** [**OnDemand Oracle**](/main/protocol-overview/ondemand-oracle.md) to make sure the liquidation price is valid to avoid attackers manipulating prices, triggering liquidations to gain benefits, or creating cascading liquidation events.

## Insurance

**20% of the transaction fees of the pair are set aside as insurance to compensate lenders** if the loan fails to maintain the solvency of the pool.

Furthermore, **each lending pool will have 20% of generated interests set aside as a reserve.**

#### <br>


---

# 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.openleverage.finance/main/protocol-overview/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.
