> For the complete documentation index, see [llms.txt](https://help.rails.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.rails.xyz/trading/perpetuals/margin-leverage-and-liquidation.md).

# Margin, Leverage & Liquidation

Learn how leverage and margin modes work, what triggers liquidation, and how Rails protects your capital through a robust risk engine.

{% hint style="info" icon="lightbulb-exclamation" %}
Try our [Risk Engine Simulator](https://rails.xyz/demos) to see how margin and liquidation work on Rails.
{% endhint %}

## Margin Modes

A margin mode is a setting that determines how your collateral supports your open trades and how liquidation occurs. Rails offers two margin modes, [cross-margin](#cross-margin-mode-default) and [isolated margin](#isolated-margin-mode), each with different risk management mechanisms.

The positions table in the main UI displays the margin mode per position as shown below:

<figure><img src="https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2FgiqY9P41yhjW1RKJVr72%2FCleanShot%202026-10-15%20at%2012.20.55%20PM.jpg?alt=media&amp;token=c1a6295f-448f-4a3b-b526-c772f38a4664" alt=""><figcaption></figcaption></figure>

#### Key Differences: Cross Margin Mode and Isolated Margin Mode

<table data-search="false"><thead><tr><th width="146.609375">Feature</th><th>Cross Margin Mode (Default)</th><th>Isolated Margin Mode</th></tr></thead><tbody><tr><td>Collateral Scope</td><td>Shared across all open cross-margin positions</td><td>Dedicated to a single, isolated position</td></tr><tr><td>Liquidation Trigger</td><td>Cross-Margin Ratio (CMR) = 100% <em>(Total Cross Maintenance Margin / Cross-Margin Equity)</em></td><td>Position Equity falls below the position's Maintenance Margin</td></tr><tr><td>Loss Containment</td><td>Account-level; losing positions draw down the shared cross-margin pool</td><td>Position-level; losses and risk are strictly contained to that position</td></tr><tr><td>PnL Offsetting</td><td>Yes; unrealized gains on one position support other cross-margin positions</td><td>No; unrealized PnL is completely independent per position</td></tr><tr><td>Capital Efficiency</td><td>Higher; shared collateral maximizes capital usage across multiple trades</td><td>Lower; collateral is segmented into separate position pools</td></tr><tr><td>Risk Management</td><td>Proactive order cancellation (at or above 90% Simulated CMR) &#x26; staged/partial liquidation</td><td>Immediate full liquidation of the affected position</td></tr><tr><td>Manual Margin Adjustments</td><td>Not available</td><td>Yes; add or remove margin manually via the order panel/position tab</td></tr><tr><td>Liquidation Impact</td><td>Liquidation cascade: all cross-margin positions are assessed and at risk together</td><td>Isolated impact: only the affected position is closed; other positions are unaffected</td></tr><tr><td>Commonly Used For</td><td>Multi-position portfolios, hedging, and capital-efficient strategies</td><td>High-leverage directional trades, volatile assets, and strict loss-capping</td></tr></tbody></table>

### Cross Margin Mode (Default)

{% columns %}
{% column %}
In cross-margin mode, your cross-margin equity is shared collateral for all of your cross-margin positions.

Unrealized profit on one position can support another. A losing position, however, affects the health of your whole cross-margin pool.
{% endcolumn %}

{% column %}

<figure><img src="https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2FZu1o6TH1OXieX8Qcgmh7%2FCleanShot%202026-06-12%20at%2009.49.14%402x.png?alt=media&amp;token=a7c5a4df-e6c6-45a9-903e-22a64a0ea3bf" alt="" width="375"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

Cross margin can help delay or avoid liquidation on an underperforming trade by drawing on your shared cross-margin pool. The tradeoff is that all funds in the pool are at risk: if your Cross-Margin Ratio reaches 100%, all of your cross-margin positions enter liquidation together. Isolated positions are not affected.

{% hint style="info" %}
Your cross-margin equity changes continuously as the mark price moves. Isolated positions are not part of the cross-margin pool.
{% endhint %}

### Cross-Margin Ratio

Cross-Margin Ratio, or CMR for short, measures the health of your current account by determining what percentage of your cross-margin equity is consumed by maintenance margin requirements across all cross-margin positions.

$$
\text{Cross-Margin Ratio} = \frac{\text{Total Cross Maintenance Margin}}{\text{Cross-Margin Equity}}
$$

Where:

$$
\text {Total Cross Maintenance Margin = SUM(Mark Price × |Position Qty|) × Maintenance Margin Rate}
$$

$$
\text{Cross Margin Equity = Cross Margin Balance + Unrealized PnL}
$$

The CMR determines when liquidation is triggered for all cross-margin positions.

<table><thead><tr><th width="207.37359619140625">Cross Margin Ratio</th><th>Account Health</th></tr></thead><tbody><tr><td>&#x3C; 100%</td><td>Healthy: positions are safe</td></tr><tr><td>≥ 100%</td><td>Staged liquidation is triggered</td></tr></tbody></table>

Your CMR is always displayed in the account summary panel to the right of your open positions.

<figure><img src="https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2FBDvsmjdN5S0ZtP3CjT7o%2FCleanShot%202026-10-15%20at%204.39.18%20PM.jpg?alt=media&amp;token=4c595b2e-fd53-4a19-bd54-bd808d55bd45" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

#### Example Cross-Margin Ratio Calculation

To calculate the cross-margin ratio example above:

1. Calculate Cross Margin Equity, and subtract isolated margin:\
   \
   $$\text{Cross Margin Equity} = 3,975.54 - 966.87 = 3,008.67$$
2. Calculate Total Cross Maintenance Margin by multiplying the total cross-position value by its maintenance margin rate of 5%:\
   \
   $$\text{Total Cross Maintenance Margin} = 858.07 \times 5% = 42.90$$
3. Calculate Cross-Margin Ratio by dividing the required cross maintenance margin by cross margin equity:\
   \
   $$\text{Cross-Margin Ratio} = \frac{858.07 \times 5%}{3,975.54 - 966.87} = \frac{42.9035}{3,008.67} \approx 1.4%$$
   {% endhint %}

### Isolated Margin Mode

{% columns %}
{% column width="50%" %}
In isolated margin mode, each position has its own separate margin pool. That margin pool only supports that position and does not affect your cross-margin positions or other isolated positions.
{% endcolumn %}

{% column width="50%" %}

<figure><img src="https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2FHqGHxRzqQvHXPZuJ7qRW%2FCleanShot%202026-06-12%20at%2009.51.35%402x.png?alt=media&amp;token=2ab0292b-287a-440f-bd3f-5ee64e2dd442" alt="" width="375"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Changing Margin Modes

{% columns %}
{% column width="50%" %}
Margin mode is set **per market**, and you can only change it when that market has no open position and no open orders. Switching modes changes how your collateral backs a position, so Rails doesn't allow it while a position or order already depends on the current setting.

To change the margin mode, use the drop-down from the order panel, as shown to the right.

{% hint style="info" %}
Your margin mode only applies to the selected market. Positions and orders in other markets are unaffected, so you can trade one market in cross margin and another in isolated margin at the same time.
{% endhint %}
{% endcolumn %}

{% column width="50%" valign="middle" %}

<figure><img src="https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2FnZI7gmvxyHP239ItComZ%2FCleanShot%202026-10-19%20at%202.44.42%20PM.gif?alt=media&amp;token=db601479-1509-4525-92c6-8648c6230f27" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Margin Modes Working Together

Starting with a $10,000 Cross Margin Balance, the below example demonstrates how your cross-margin ratio is impacted when trading across markets using both isolated and cross-margin modes.

*This example assumes 1x leverage on the isolated BTC position, 2x leverage on cross positions, no trading fees or funding payments, a 5% maintenance margin rate (MMR) on all positions, and that prices don't move unless a step says so.*

<table data-search="false"><thead><tr><th width="145.74609375">Step / Action</th><th width="95.099609375">Isolated BTC Margin Equity</th><th width="86.7421875">Cross-Margin Balance</th><th width="90.880859375">Cross-Margin Equity</th><th width="84.4375">Total Cross Maint. Margin</th><th width="74.912109375">CMR</th><th>What changed</th></tr></thead><tbody><tr><td>Start</td><td>$0</td><td>$10,000</td><td>$10,000</td><td>$0</td><td>0.00%</td><td>No open positions</td></tr><tr><td><ol><li>Open XLM long <em>(Cross, $2,500 position)</em></li></ol></td><td>$0</td><td>$10,000</td><td>$10,000</td><td>$125</td><td>1.25%</td><td><p>$125 = 5% x $2,500</p><p>No funds move; your shared balance backs the requirement.</p></td></tr><tr><td><ol start="2"><li>Open BTC long <em>(Isolated, $5,000 position)</em></li></ol></td><td>$5,000</td><td>$5,000</td><td>$5,000</td><td>$125</td><td>2.50%</td><td>$5,000 moves from cross to the isolated position. The balance is halved so CMR doubles</td></tr><tr><td><ol start="3"><li>Open ETH long <em>(Cross, $4,000 position)</em></li></ol></td><td>$5,000</td><td>$5,000</td><td>$5,000</td><td>$325</td><td>6.50%</td><td>$325 = $125 (XLM) + $200 (5% × $4,000 ETH)Both cross positions share the $5,000 balance.</td></tr><tr><td><ol start="4"><li>XLM price falls 20% ($500)</li></ol></td><td>$5,000</td><td>$5,000</td><td>$4,500</td><td>$300</td><td>~6.7%</td><td>XLM’s –$500 unrealized loss reduces cross equity, but your balance is unchanged until the loss is realized. XLM’s requirement drops to $100 (5% × $2,000), but equity falls faster, so CMR rises.</td></tr><tr><td><ol start="5"><li>BTC price falls 8% (~$400)</li></ol></td><td>$4,600</td><td>$5,000</td><td>$4,500</td><td>$300</td><td>~6.7%</td><td>BTC’s –$400 unrealized loss ($5,000 × 8%) is absorbed by its isolated margin. Your cross balance, cross equity, and CMR are unaffected.</td></tr><tr><td><ol start="6"><li>Close BTC <em>(-$400 Realized PnL)</em></li></ol></td><td>$0</td><td>$9,600</td><td>$9,100</td><td>$300</td><td>~3.3%</td><td>The remaining $4,600 ($5,000 margin – $400 loss) returns to your cross balance. Cross equity is $9,600 minus XLM’s $500 unrealized loss. Higher equity lowers your CMR.</td></tr></tbody></table>

**Key Takeaways:**

1. **Moving funds to an isolated position raises your CMR (step 2).** Margin assigned to an isolated position leaves your Cross Margin Balance and Cross Margin Equity, so the same cross requirements are backed by less capital.
2. **Unrealized losses on cross positions raise your CMR before anything is realized (step 4).** Your Cross Margin Balance doesn’t change until you close, but your Cross Margin Equity does, and equity is what CMR uses. Watch equity, not balance, when judging liquidation risk.
3. **Isolated losses stay isolated (steps 5–6)**. While an isolated position is open, its losses come only from its own margin, and the most you can lose is the margin you assigned to it. When you close it, whatever remains returns to your Cross Margin Balance.
4. **Cross liquidations can’t draw on isolated margin.** If your CMR reaches 100% and triggers a cross liquidation, funds held in isolated positions aren’t used to cover the cross shortfall.

### Manually Adjusting Isolated Margin

Once an isolated position is open, you can add or remove margin to change its risk. Select the pen icon ![](https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2FqdffAx2EyUfv2uXkDkE2%2FCleanShot%202026-06-08%20at%2014.05.34.png?alt=media\&token=f4e3b607-65d5-4022-a1bb-5470b288ad51) next to the position's margin to open the adjustment modal:

<figure><img src="https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2FRiMiZex5MMiI2KmJ9qCo%2FCleanShot%202026-06-08%20at%2014.01.57.png?alt=media&amp;token=b858e5b2-f784-4276-b03a-a9078e43fb8b" alt=""><figcaption></figcaption></figure>

#### Increase Margin

{% columns %}
{% column width="50%" %}
The Increase Margin slider is selected by default.

1. Enter an amount. The window shows how your position margin, account margin, and liquidation price will change.
2. Select Increase Margin to confirm.
   {% endcolumn %}

{% column width="50%" valign="middle" %}

<figure><img src="https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2FRxRSMGicZubQ0ZpdsI66%2FCleanShot%202026-06-08%20at%2014.07.53.png?alt=media&amp;token=e95fda03-6371-4ea2-af54-8f63c2bfa6f4" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

Adding margin lowers the isolated position’s liquidation risk. Added margin comes from your Cross-Margin Balance and cannot exceed your Available Balance. This can leave your cross-margin positions more exposed to liquidation.

#### Decrease Margin

{% columns %}
{% column width="50%" %}

1. Switch to the Decrease Margin tab. It shows the most margin you can remove.
2. Enter an amount and select Decrease Margin to confirm.

The modal shows your excess margin, which is the most you can remove. You can't remove margin below the minimum the position needs to stay open at its current [leverage](#leverage).

Removing margin moves your liquidation price closer to the mark price, increasing the risk of liquidation.
{% endcolumn %}

{% column width="50%" valign="middle" %}

<figure><img src="https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2F184ipOhEC3hhHMMyrBaV%2Fimage.png?alt=media&amp;token=8a8b31f6-29df-4031-9af5-e7d8b00306aa" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}
The margin available to move changes as the market moves. Unrealized losses reduce how much you can remove. Unrealized profits do not increase it. If you select 100% and the market moves against you, lower the amount or select 100% again.
{% endhint %}

## Leverage

Leverage lets you control a larger position with less upfront capital. Higher leverage lowers the initial margin you need in both [margin modes](#margin-modes), but it also amplifies your risk of potential losses. It also brings your liquidation price closer to the current price, increasing the risk of being liquidated.

For example, see how leverage changes the maximum position size you can open with $10,000:

<table><thead><tr><th width="95.83203125" align="center">Starting Collateral</th><th width="110.890625" align="center">1x Leverage</th><th width="111.44921875" align="center">2x Leverage</th><th width="110.68359375" align="center">3x Leverage</th><th width="111.3515625" align="center">4x Leverage</th><th width="111.421875" align="center">5x Leverage</th></tr></thead><tbody><tr><td align="center">$10,000</td><td align="center">$10,000</td><td align="center">$20,000</td><td align="center">$30,000</td><td align="center">$40,000</td><td align="center">$50,000</td></tr></tbody></table>

{% columns %}
{% column width="50%" %}
Choose your leverage for each market (1x–5x) directly from the order panel, as shown to the right:

{% hint style="info" %}
Adjusting the leverage multiplier is only available through the order panel, and changing it applies immediately to all positions for that specific market.
{% endhint %}
{% endcolumn %}

{% column width="50%" %}

<figure><img src="https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2FKcFy9M36TG1YncVqkYj2%2FCleanShot%202026-06-03%20at%2013.51.33.png?alt=media&amp;token=5db45287-82aa-4f31-a221-a900f8715c21" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

For an isolated position, increasing leverage lowers its required margin and increases excess margin and therefore your withdrawable balance. The released margin is not returned to your cross-margin balance, however, and remains in the isolated position unless you explicitly remove it. Decreasing leverage raises the required margin, reducing the amount available to withdraw.

## Risk Management

The below mechanisms are in place to protect user capital and avoid negative balances. The margin mode you've selected determines which are applicable to each of your positions. The mechanisms and their triggers at a high level are:

<table><thead><tr><th width="212.10296630859375">Trigger Condition</th><th width="122.1171875">Margin Mode</th><th>Action</th></tr></thead><tbody><tr><td>Simulated CMR ≥ 90%</td><td>Cross</td><td><strong>Proactive order cancellation</strong>: risk-increasing orders are cancelled to avoid or delay liquidation</td></tr><tr><td>CMR = 100%</td><td>Cross</td><td><strong>Staged liquidation</strong>: partial or full liquidation occurs for all cross positions depending on position size</td></tr><tr><td>Isolated position equity ≤ position maintenance margin</td><td>Isolated</td><td><strong>Full liquidation</strong>: only the position affected is closed</td></tr></tbody></table>

### Proactive Order Cancellation

In [Cross-Margin mode](#cross-margin-mode-default), open orders can increase your liquidation risk if they fill during deteriorating market conditions. Rails' risk engine *<mark style="color:$info;">protects your account</mark> from the risk of immediate post-fill liquidation by canceling any orders that would increase your position size.*

Proactive order cancellation is triggered when the **Simulated Cross-Margin Ratio** reaches 90%. When this occurs, the risk engine cancels all orders that would *increase* your net position exposure, preventing you from being liquidated as soon as one of those orders fills. Orders that would fully offset, or decrease your position size (including Reduce Only orders) are never cancelled. Where an order partially offsets a position, only the excess quantity that would increase position size is cancelled.

<table><thead><tr><th width="255.3175048828125">Simulated Cross Margin Ratio</th><th>Action</th></tr></thead><tbody><tr><td>&#x3C; 90%</td><td>No action</td></tr><tr><td>≥ 90%</td><td>Risk-increasing open orders are cancelled</td></tr></tbody></table>

{% hint style="success" %}
Canceled Orders stay visible in the [canceled order tab](/manage-account/portfolio-and-reporting/portfolio-overview.md#canceled-orders-tab) for 7 days.
{% endhint %}

**Simulated Cross-Margin Ratio** is calculated by assuming all eligible open orders are fully filled:

<p align="center"><span class="math">\text{Simulated Cross-Margin Ratio} = \frac {\text{Simulated Maintenance Margin}}{\text{Simulated Cross Margin Equity}}</span></p>

where

$$
\begin{aligned}
\text{Simulated Maintenance Margin} &= \text{Total Cross Maintenance Margin} + (\text{Cross Selected Order Value} \times \text{MMR}) \\
\text{Simulated Cross Margin Equity} &= \text{Cross Margin Equity} - \text{Isolated Selected Order Margin} \\
\text{Cross Selected Order Value} &= \text{Notional value of cross margin orders that would increase net position exposure} \\
\text{Isolated Selected Order Margin} &= \text{Order margin required by isolated margin orders that would increase net position exposure}
\end{aligned}
$$

The following order types are considered when proactive order cancellation is triggered:

* Cross-margin orders that increase position size
* Isolated-margin orders that increase position size
* Excess quantity on orders that would partially increase net exposure

[Reduce only orders](/trading/perpetuals/orders-and-execution.md#reduce-only) and orders that would fully offset the existing position are excluded.

{% hint style="info" %}

## **Immediate Post-Fill Liquidation Risk Example**

<table><thead><tr><th width="55.5078125" align="center">Day</th><th width="279.724609375" align="center" valign="top">Scenario</th><th width="301.4921875" align="center" valign="top">Detail</th></tr></thead><tbody><tr><td align="center">T0</td><td align="center" valign="top">A user has a long position with a <a href="#cross-margin-ratio">Cross-Margin Ratio</a> (CMR) of 10% and places a new order that would increase their position size.</td><td align="center" valign="top">The user still has available balance and is able to create a new order.</td></tr><tr><td align="center">T1</td><td align="center" valign="top">The market price drops, and the Simulated CMR reaches 90%, triggering cancellation of an open order.</td><td align="center" valign="top">At this stage, CMR could be much lower (e.g. ~70%), since Simulated CMR treats all open orders as filled.</td></tr><tr><td align="center">T2</td><td align="center" valign="top">The market price continues to drop, pushing the user’s actual CMR to approximately 90%.</td><td align="center" valign="top"><p>If the previously cancelled order had filled at this point, liquidation would likely occur immediately. Account equity would remain unchanged, while the maintenance margin increases with the position size.</p><p><strong>This scenario is why we introduced proactive order cancellation.</strong></p></td></tr><tr><td align="center">T3</td><td align="center" valign="top">Overnight, the market price recovers, and the user’s CMR falls back to 20%.</td><td align="center" valign="top">The user’s position is not liquidated, thanks to proactive order cancellation.</td></tr></tbody></table>
{% endhint %}

### Liquidation

Liquidation happens when your account (in cross margin) or your position (in isolated margin) no longer meets its maintenance margin requirement. Rails checks liquidation against the [mark price](/trading/price-indices.md#mark-price).

Liquidation conditions differ by margin mode:

<table><thead><tr><th width="184.390625">Margin Mode</th><th>Liquidation Trigger</th></tr></thead><tbody><tr><td>Cross margin</td><td><a href="#cross-margin-ratio">Cross-Margin Ratio</a> reaches 100%</td></tr><tr><td>Isolated margin</td><td>The isolated position's <a href="/trading/price-indices.md#mark-price">mark price</a> reaches its <a href="#liquidation-price">liquidation price</a>.</td></tr></tbody></table>

{% hint style="info" %}
Liquidation fees apply. See [Pricing & Fees](/trading/perpetuals/pricing-and-fees.md) for details.
{% endhint %}

#### Cross-Margin Liquidation Process <a href="#cross-margin-liquidation" id="cross-margin-liquidation"></a>

Cross-margin liquidation triggers when your [cross-margin ratio](#cross-margin-ratio) hits 100%. Large positions undergo staged partial liquidation to reduce [slippage](/support/troubleshooting-guide.md#what-is-slippage-and-why-does-it-happen).

1. **Cancel Orders**: All open orders on cross-margin positions are immediately canceled.
2. **Close Positions**:
   * Small Positions (below the [partial liquidation threshold](#large-position-thresholds)): Closed in full.
   * Large Positions (at or above threshold): Closed via partial liquidation in stages. Each stage closes 20% of the current position size.
     * After each 20% closure, your cross-margin ratio is recalculated.
       * If it drops below 100%, liquidation stops.
       * If the ratio remains at 100% or higher, the system waits 30 seconds for the order book to replenish before closing the next 20%.
       * If the ratio drops below 100% but returns to 100% within the same 30-second window, Rails closes the entire remaining position immediately.
3. **Return Balance:** Any remaining margin after covering losses is credited back to your balance.

Note: Partial liquidation reduces total required maintenance margin, but your maintenance margin rate remains 5%.

#### Large Position Thresholds

Cross-margin positions at or above these values qualify for partial liquidation:

{% columns %}
{% column width="58.333333333333336%" %}

<table><thead><tr><th width="142.15625" align="center">Market</th><th width="184.26171875" align="center">Threshold</th></tr></thead><tbody><tr><td align="center">Default</td><td align="center">25,000 USDT</td></tr><tr><td align="center">BTC</td><td align="center">37,500 USDT</td></tr></tbody></table>
{% endcolumn %}

{% column width="41.666666666666664%" %}
All markets use the default large-position threshold unless individually stated, and these may change from time to time.
{% endcolumn %}
{% endcolumns %}

#### Isolated Margin Liquidation <a href="#isolated-margin-liquidation" id="isolated-margin-liquidation"></a>

Isolated margin positions are always closed in full because isolated position margin is not shared across positions. Liquidation is triggered when your [isolated position equity](/trading/perpetuals/perps-metrics-guide.md#isolated-position-equity) drops below the [minimum maintenance margin](/trading/perpetuals/perps-metrics-guide.md#maintenance-margin) required to support your position, identified by the liquidation price shown in the position summary tab.

Because isolated margin is self-contained, the [liquidation price](#liquidation-price) is more predictable. It changes only when you change that position (e.g. adjusting margin or leverage, or increasing/decreasing size), not when other positions move.

When that happens:

1. All open orders on the position are immediately cancelled.
2. The affected isolated position is immediately closed at the best available market price.
3. Any remaining margin after covering losses is returned to your cross-margin balance.

{% hint style="success" %}
**All other positions are unaffected**, including other cross-margin and isolated margin positions.
{% endhint %}

#### Liquidation Price

The **Liquidation Price** is the mark price at which liquidation may occur:

$$
\text{Liquidation Price} = \text{Mark Price} - \frac{\text{Side} \times \text{Available Margin}}{\left|\text{Quantity}\right| \times \left(1 - \text{Maintanence Margin Rate} \times \text{Side}\right)}
$$

Where $$\text{Available Margin}$$ is dependent on Margin Mode Used:

* In Isolated Margin: $$\text{Available Margin} = \text{Isolated Position Equity} - \text{Maintenance Margin}\_{position}$$
* In Cross-Margin, $$\text{Available Margin} = \text{Cross Margin Equity} - \text{Total Cross Maintenance Margin}$$

In **cross-margin** mode, the liquidation price shown for any individual position is an **estimate** and will change dynamically because:

* Opening, closing, or modifying any cross-margin position affects [Total Cross Maintenance Margin](/trading/perpetuals/perps-metrics-guide.md#total-cross-maintenance-margin).
* Mark-price movements of any held asset affect unrealized P\&L and therefore [Cross-Margin Equity](/trading/perpetuals/perps-metrics-guide.md#cross-margin-equity).
* [Funding rate payments](/trading/perpetuals/funding.md) accrue to or from your balance over time.
* Changes to isolated positions (e.g. adding margin or partial closes) affect your [Cross-Margin Balance](/trading/perpetuals/perps-metrics-guide.md#cross-margin-balance).

If the liquidation price of your position is less than or equal to zero, no liquidation price is displayed, otherwise the liquidation price for your open positions can be found directly in your positions tab:

<figure><img src="https://1893902947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvoJ4s2ha99AB453yyXn5%2Fuploads%2F93FgRfXf53Lzwvv6o4Yq%2Fimage.png?alt=media&amp;token=4caf9d59-3bd4-411e-9e17-6ab5b3cc9f5b" alt=""><figcaption></figcaption></figure>

#### Avoiding Liquidation

Use the guidance below to help reduce liquidation risk in each margin mode:

| Isolated Margin Mode                                                                                                                                                                                | Cross-Margin Mode                                                                                                                                                                                                                          |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <ul><li>Add margin to increase the position's equity.</li><li>Reduce position size to lower its maintenance margin.</li><li>Set a stop-loss to close the position before it's liquidated.</li></ul> | <ul><li>Deposit funds to increase your cross-margin equity.</li><li>Reduce position size to lower your total cross maintenance margin.</li><li>Set a stop-loss to close positions automatically if the market moves against you.</li></ul> |

#### How Leverage Alters Your Liquidation Risk

Adjusting your [leverage](/trading/perpetuals/margin-leverage-and-liquidation.md#leverage) (1x–5x) changes how much of your collateral is available to absorb losses, and how close your [liquidation price](#liquidation-price) sits to the current mark price. Higher leverage means a larger position from the same collateral, so each price move has a bigger impact on your equity.

{% hint style="info" %}

## Example

To see how leverage changes your risk profile, consider a long position using $10,000 in starting collateral when BTC is trading at $100,000, with a 5% Maintenance Margin Rate:

| Parameter                     | 1x Leverage (No Leverage) | 2x Leverage  | 5x Leverage  |
| ----------------------------- | ------------------------- | ------------ | ------------ |
| Position Size                 | 0.1 BTC                   | 0.2 BTC      | 0.5 BTC      |
| Position Value                | $10,000                   | $20,000      | $50,000      |
| Maintenance Margin (5%)       | $500                      | $1,000       | $2,500       |
| Available Margin              | $9,500                    | $9,000       | $7,500       |
| Liquidation Price             | None ($$\le$$ $0)         | \~$52,632    | \~$84,211    |
| Drop Required for Liquidation | N/A                       | \~47.4% drop | \~15.8% drop |

**How these figures are calculated:**

* Each liquidation price uses the [Liquidation Price](#liquidation-price) formula above, where Available Margin is your collateral minus the position's maintenance margin.
* For example, at 2x: $100,000 − ($9,000 ÷ (0.2 × 0.95)) ≈ $52,632.
* This example assumes an isolated position (or a single cross position), no fees, and no funding payments. Your actual liquidation price may differ. Always check the estimate in your positions tab.
  {% endhint %}

**Key Takeaways:**

* **Without leverage (1x):** Your 0.1 BTC position is fully backed by your own collateral. BTC would have to fall to $0 before liquidation, so no liquidation price is shown.
* **With 2x leverage:** Doubling your exposure to 0.2 BTC means price moves hit your equity twice as fast. A drop of about 47.4%, to roughly $52,632, triggers liquidation.
* **With 5x leverage:** Controlling 0.5 BTC with the same collateral leaves much less room for volatility. A drop of just 15.8%, to roughly $84,211, triggers liquidation.

For this reason, we recommend confirming your estimated liquidation price in the positions tab, regularly monitoring your margin levels, and placing stop-loss orders to prevent unexpected liquidations during periods of high volatility.
