Margin, Liquidation and Leverage
This section explains all risk management mechanisms on Rails in detail.
Efficient risk management is vital to maintaining portfolio health on Rails. This guide covers everything you need to know about navigating our core margin framework: selecting the right margin mode for your strategy, understanding dynamic liquidation calculations, utilizing leverage effectively, and managing the automated safeguards engineered to protect your account capital.
You can find all calculations detailed in our Trading Metrics guide here.
Explore each section below:
Margin Modes
Rails supports two margin modes: Cross-Margin (default) and Isolated Margin, each with it's own collateral pool and liquidation mechanics:
In cross margin mode, your entire cross-margin equity acts as shared collateral across all cross margin positions. Unrealized profits from one position can help support another, but deterioration in any position affects the entire account’s health.
Because unrealized P&L fluctuates in real-time with the market, your cross-margin equity is continuously updated. Additionally, any positions in isolated margin mode are excluded from the cross-margin pool.

In isolated margin mode, each position has its own dedicated margin pool. The collateral allocated to an isolated position is used exclusively for that position and has no effect on cross margin positions or other isolated positions.
When creating or increasing an isolated position, the order margin is added to the Isolated Position Margin and is therefore excluded from your Cross-Margin balance.
When partially closing an isolated position, the same proportion of margin is released back to your Cross-Margin Balance, and the realized P&L from the closed portion is also added to Cross-Margin Balance.

Increasing leverage increases risk by scaling down your Initial margin requirement (freeing up order margin in cross-margin and reducing upfront capital allocation in isolated margin) but directly compresses your risk buffer by amplifying both your potential returns and your sensitivity to adverse price movements.
Adjusting Isolated Position Margin:
Once a position is open in isolated margin mode, you can manually add or remove margin to tune the position’s risk profile.
Adding Margin
To add additional margin to your open isolated position, first find the pen icon
as shown below.

You'll be defaulted to the Increase margin modal. Entering an amount will display summary information about how your position margin, account margin, and more importantly your liquidation price, will change.
Select the Increase Margin button when you're ready to proceed.

Once completed, your position will update accordingly:

Available margin changes as the market moves. If you select 100%, you may need to adjust the amount or select 100% again if the market moves against you.
Increasing margin on an isolated-margin position decreases it's risk of liquidation, but may increase the risk of liquidation on any cross-margin positions. This is because the margin is taken from your cross-margin equity which impacts your cross-margin ratio.
Removing Margin
When decreasing additional margin from a position, the modal will show you any margin amount that is available to remove from your isolated position.
Select the Decrease Margin button when you're ready to proceed, and your position will be updated accordingly.
The required margin floor ensures the position retains enough collateral to remain open at its current leverage.

Removing margin decreases isolated position equity and moves the liquidation price closer to the current market price. Always verify the updated liquidation price before confirming changes, and use with caution.
Adjusting Leverage
Increasing the leverage on an isolated position lowers your required margin, which increases excess margin. The released margin is not automatically returned to cross-margin balance; it remains in isolated position margin until you explicitly remove it. Decreasing leverage has the opposite effect — it raises your required margin.
Increasing leverage brings the liquidation price closer to the current market price. Always verify the updated liquidation price before confirming changes, and use with caution.
Liquidation
Liquidation is triggered when an account (in cross-margin mode) or position (in isolated margin mode) can no longer meet the minimum margin requirement:
Cross margin
Cross-Margin Equity falls below Total Maintenance Margin (i.e., your cross-margin ratio reaches 100%).
Isolated margin
Isolated Position Equity falls below the Position’s Maintenance Margin.
Liquidation Price
Rails displays an estimated liquidation price, which is the estimated price at which liquidation may be triggered if all other variables remains constant.
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 Maintenance Margin.
Changes in the index price of any held asset affect unrealized P&L and therefore Cross-Margin Equity.
Funding rate payments accrue to or from your balance over time.
Changes to isolated positions (e.g. adding margin, partial closes) affect your Cross-Margin Balance.
In isolated margin mode, the liquidation price for a position is more predictable since its equity is self-contained, but will shift if you add or remove margin from the position.
Liquidation price is calculated as shown below:
Where Available Margin is dependent on Margin Mode Used:
In Cross-Margin: Available Margin=Cross Margin Balance−Total Cross Maintenance Margin
In Isolated Margin: Available Margin=Isolated Position Equity−Maintenence Marginposition
Note: If the liquidation price of your position is less than or equal to zero, no liquidation price is displayed.
You can view the estimated liquidation price for each open position as shown below:

Liquidation Process & Avoiding Liquidation
A different liquidation process applies depending on the margin mode used:
Cross-margin liquidation is triggered when your cross-margin ratio reaches 100%, at which point:
All open orders on cross margin positions are immediately cancelled.
All cross margin positions are closed simultaneously by the liquidation engine at the best available market price.
Any remaining funds after covering losses are returned to your balance
< 100%
Healthy
≥ 100%
Liquidation triggered - all positions closed
When your simulated cross-margin ratio reaches 90%, any open orders will be proactively cancelled and you will be notified via email.
To avoid liquidation in cross-margin mode, we recommend:
depositing additional funds to raise your Total Balance and your cross-margin equity.
reducing your position size to lower your Total Maintenance Margin.
switching a position to isolated margin to uncouple it, and free up cross-margin collateral.
setting a stop-loss trigger order on open positions to automatically close them if the market moves against you.
Isolated Margin Liquidation occurs when your isolated position equity falls below the minimum maintenance margin required to support your position, at which point:
The affected isolated position is immediately closed.
Any remaining margin after covering losses is returned to your cross margin balance.
All other positions are unaffected. This includes all cross-margin and other isolated margin positions.
To avoid liquidation in isolated margin mode, we recommend:
adding additional margin to the isolated position to increase the isolated position equity.
reducing position size to lower the position’s maintenance margin requirement.
setting a stop-loss trigger order to close the position before liquidation is reached.
In both cases, a liquidation fee may apply. See our current pricing & fees for more information.
Proactive Order Cancellation
Note: Proactive Order Cancellation applies in cross-margin mode only.
To mitigate the risk of immediate post-fill liquidations caused by market volatility, Rails utilizes a preventative risk safety mechanism called the Proactive Order Cancellation system. Instead of evaluating account health strictly after an execution, the system dynamically models risk asynchronously upon order book updates.
The system calculates a Simulated Cross-Margin ratio for your account by assuming all eligible open orders are executed:
and
Where:
Position Maintenance Margin = the maintenance margin required for your current open positions.
Selected Order Value = the notional value of open orders that would increase your net position exposure.
MMR = Maintenance Margin Rate = 0.05
Order Cancellation Trigger
The Simulated Cross-Margin Ratio assesses the risk of pending orders and cancels those considered too risky before execution. When the 90% threshold is met, the system cancels qualifying orders to reduce the projected maintenance margin requirement, thereby lowering the account's risk profile.
< 90%
No action. Orders remain active.
≥ 90%
All orders that would increase position exposure are cancelled.
If filling a resting order would simulate a cross-margin ratio of ≥ 90%, that order is cancelled proactively, protecting your account from the risk of an immediate post-fill liquidation.
Note:
Orders that reduce position size, including reduce-only orders, are not canceled by this mechanism.
Open orders on isolated margin positions that increase position size are included, as that margin is moved from the cross-margin balance into isolation position margin and may trigger liquidation. Proactive cancellation guards against this by treating position-increasing isolated orders as a simulated draw on cross margin equity.
You will be able to see cancelled orders for 7 days after cancellation.
Example:
Suppose you hold a 1 BTC Long position with two sell orders a 0.6 BTC Sell placed first, and a 0.8 BTC Sell placed second (1.4 BTC total).
The system exempts closing orders oldest-first up to the position size (1 BTC):
0.6 BTC Sell (oldest) → fully exempted.
0.8 BTC Sell (newer) → 0.4 BTC exempted to reach the 1 BTC position size; the remaining 0.4 BTC would open a net short and is included in Selected Order Value.
What is Leverage?
Leverage allows you to control larger notional positions with less upfront capital. Increasing leverage scales down your initial margin requirements across both margin modes, amplifying both your potential returns and your sensitivity to adverse price movements.
On Rails, leverage is selectable up to 5x and is configured independently per market:

Changing Leverage
To adjust your leverage multiplier for a specific market, use the leverage selector located within the order panel:

Selecting a new leverage multiplier only updates the parameter for that specific market.
Updating your leverage selection dynamically recalculates within the order panel prior to submitting your trade.
Last updated
Was this helpful?

