> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agi3.ae/llms.txt
> Use this file to discover all available pages before exploring further.

# How liquidation works

> What triggers a liquidation, how the liquidation price is calculated, what it costs you, and how to avoid one.

A borrow position is liquidatable once its LTV reaches the market's **liquidation threshold** (equivalently, once its [health factor](/risk/health-factor) reaches 0.00). At that point part of your collateral can be sold to repay part of your debt, without your involvement. You will have been warned before this point (see [AGI3 does not liquidate you](#agi3-does-not-liquidate-you)), but the liquidation itself is automatic and happens without further notice.

## What actually triggers it

Liquidation is triggered by the position's state at the market's oracle price, not by any decision AGI3 makes. Three things move a position toward that state:

1. Your collateral falls in value relative to your debt asset.
2. Your debt asset rises in value relative to your collateral.
3. Interest accrues on your debt, which happens continuously.

The third is the one clients most often overlook. A position opened at a comfortable LTV and then left untouched will drift toward liquidation on its own, because the debt side grows while the collateral side does not.

## The liquidation price

Each position shows a liquidation price: the collateral price at which the position reaches its liquidation threshold.

```
liquidation price = debt value / (collateral quantity × liquidation threshold)
```

Read it as a distance. If your collateral trades at 3,000 and the liquidation price is 2,100, the position absorbs a 30% fall before becoming liquidatable.

Two limits on how far to trust that number:

* It assumes your debt asset holds its value. If you borrowed a volatile asset, its own price move shifts the liquidation price, so the figure is only stable when the debt is a stablecoin.
* It assumes debt stays constant. Accruing interest raises the liquidation price over time. The number is a snapshot, not a fixed floor.

## What it costs

Liquidation is not a neutral unwind. A liquidator repays part of your debt and takes collateral in return, at a discount to the market price: that discount is their incentive, and it is a direct loss to you on top of whatever price move caused the liquidation.

You keep whatever collateral is not sold, and your remaining debt is reduced correspondingly. But you realize the loss at the worst available moment, which is the point of avoiding it.

## How to avoid one

**Borrow below the maximum.** The platform will let you borrow up to the max LTV, at which point your health factor is 1.00 and your entire buffer is unused but available. Borrowing at, say, 60% of the maximum leaves materially more room.

**Watch the health factor, not the LTV.** LTV percentages look reassuringly far apart; health factor is scaled to the buffer that actually exists. See the worked example in [Health factor](/risk/health-factor).

**Prefer stable debt against volatile collateral.** Borrowing a volatile asset against volatile collateral means both legs can move against you simultaneously.

**Add collateral or repay early.** Both raise the health factor immediately. Doing either while your position is merely in the Monitor band is far cheaper than being liquidated out of the Critical one.

**Account for correlation.** In a broad market fall, the assets you hold as collateral tend to fall together, and liquidity thins at the same moment. The [portfolio health score](/risk/portfolio-health-score) models this explicitly with a crash-day scenario.

## AGI3 does not liquidate you

Liquidation is executed by third-party liquidators acting directly against the underlying protocol. AGI3 does not perform liquidations, cannot pause one, and cannot reverse one.

What AGI3 does is warn you before it happens. As a position deteriorates you receive two escalating warnings, each delivered as both an in-platform notification and an email:

* **Margin call warning** — your position has deteriorated to the point where it needs attention. Adding collateral or repaying debt now restores your buffer at low cost.
* **Imminent liquidation warning** — your position is approaching the liquidation threshold and could be liquidated at any moment.

Act on these promptly. The warnings do not pause or delay anything: the protocol's rules still apply the moment the threshold is crossed, and a liquidator will not wait for you to read your email. The margin call warning is deliberately set well before the threshold, because the point at which you can still fix a position cheaply is strictly earlier than the point of liquidation. Responding to the first warning is what keeps the second one from arriving.
