> For the complete documentation index, see [llms.txt](https://leverup.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://leverup.gitbook.io/docs/trading/liquidation.md).

# Liquidation

### When is liquidation triggered?

A position will be liquidated under either of the following conditions:

* The **market price** reaches the **liquidation price**.
* The **collateral becomes insufficient** to cover outstanding fees.

***

### How is the Liquidation Price calculated?

#### Long Position

Liquidation Price = Entry Price - (Collateral × Liquidation Loss Rate - Fees) ÷ Position Size (in Quantity)

#### Short Position

Liquidation Price = Entry Price + (Collateral × Liquidation Loss Rate - Fees) ÷ Position Size (in Quantity)

{% hint style="info" %}
Fees include: Close Fee, Holding Fee, and Funding Fee.

Liquidation Loss Rate = 85%

Position Size (in Quantity) = Initial Collateral × Leverage ÷ Entry Price
{% endhint %}

{% hint style="info" %}
A position will be liquidated once it has lost **85% or more of its value**.
{% endhint %}

#### Minimum Position Leverage

Positions with leverage below **1x** will be automatically closed.

This is a minimum leverage requirement and is separate from standard liquidation. Users should monitor their position leverage to avoid unexpected auto-closure.

### Collateral Value in Liquidation

When a user opens a position, the collateral they provide becomes the position margin after trading fees are deducted. This margin is held in the position’s margin asset, such as LVUSD, LVMON, USDC, MON, or another supported collateral token.

The USD value of the margin is calculated as:

```
Margin Value in USD = Margin Amount × Margin Asset Price
```

For example, if a position has 100 USDC as margin and USDC is priced at $1, the margin value is $100.

During liquidation, LeverUp also considers the position’s unrealized profit or loss, funding fees, holding fees, and closing fees. These values are converted into the same asset as the position margin, so they can be compared consistently.

A simplified liquidation condition is:

```
Total Loss and Fees ≥ Liquidation Threshold × Position Margin
```

Where:

```
Total Loss and Fees = Closing Fee + Holding Fee - Funding Fee - PnL
```

If the position has a loss, `PnL` is negative, so it increases the total loss. If the position has a profit, `PnL` is positive, so it reduces the total loss.

The liquidation threshold depends on the market configuration. For example, if a market has an 85% liquidation threshold, the position can be liquidated once the total loss and fees reach 85% of the margin.

#### Example: MON as Margin

Assume MON is priced at `$0.025`, and a user opens the minimum `$200` position at `10x` leverage.

```
Required Margin Value = $200 / 10 = $20
Margin Amount = $20 / $0.025 = 800 MON
```

If the market liquidation threshold is `85%`, the position becomes liquidatable when loss and fees consume:

```
Liquidation Threshold = 800 MON × 85% = 680 MON
```

So if the position’s loss and fees are converted into MON and reach at least `680 MON`, the Keeper can liquidate the position.

In USD terms:

```
680 MON × $0.025 = $17
```

So this `$200` position with `800 MON` margin can be liquidated once losses and fees consume roughly `$17` worth of MON margin.
