Leverage & Risk Management

Leverage and liquidation are two trading concepts that go hand-in-hand. Read below to learn more about how leverage works on Rails.

What is Leverage?

Traders can use leverage to control larger positions with less capital. When using leverage, you effectively "borrow" capital to open a larger position to increase the potential profit of your trade. For example, 2x leverage allows a $2,000 position with just $1,000.

triangle-exclamation

Changing Leverage

Rails offers up to 5× leverage, set individually per market in cross-margin mode. This means that you can set a different leverage you want in each market, and your margin is updated accordingly.

To change your leverage in any market, simply click the Cross button to the left of the Buy/Sell buttons in the order panel and select your preferred leverage:

circle-info

Important Note

Selecting a new leverage multiplier in the order panel will only update the leverage for that market.

Risk Management

Rails protects accounts by employing two core risk management mechanisms:

  1. Liquidation

  2. Proactive Order Cancellation

circle-info

Cross-Margin Mode

In the Rails platform, all perpetual futures positions are in cross-margin mode. This means unrealized profits from one position can offset others, but any decline affects the overall account health. Account health is assessed by the Cross-Margin Ratio, which reflects the percentage of your account equity used by minimum margin requirements.

Both core risk management mechanisms operate in this cross-margin model.

Liquidation

Liquidation is triggered when your cross-margin ratio reaches 100% — meaning your account equity has fallen to exactly the minimum required to hold all open positions. At this stage:

  • Any open orders will be immediately canceled.

  • All positions will be liquidated simultaneously.

  • Any remaining funds, after deducting fees and losses, will be returned to your balance.

Estimated Liquidation Price

Rails displays a per-position liquidation price estimate. In cross-margin mode this is an estimate that changes dynamically as other positions are opened or closed, index prices move, or funding payments accrue.

Your liquidation price is calculated as shown below:

Liquidation Price=PindexS×Available MarginQ×(1MMR×S)\text{Liquidation Price} = P_{index} - \frac{{S} \times \text{Available Margin}}{\left|\text{Q}\right| \times \left(1 - \text{MMR} \times S\right)}

Where:

  • SS = Side (Long = 1, Short = -1)

  • QQ = Position Quantity

  • MMRMMR = Maintenance Margin Rate = 0.05

You can view the estimated liquidation price for each open position as shown below:

circle-info

To help protect your balance, consider setting trigger orders.

Proactive Order Cancellation

In cross-margin, users can use unrealized profits as collateral for new orders. However, market changes may increase position sizes and maintenance margin requirements, risking immediate liquidation. To mitigate this, Rails features a Proactive Order Cancellation system.

This system calculates a Simulated Cross-Margin ratio for your account by assuming all eligible open orders are executed:

Simulated Cross-Margin Ratio=Simulated Maintenance MarginAccount Equity\text{Simulated Cross-Margin Ratio} = \frac {\text{Simulated Maintenance Margin}}{\text{Account Equity}}

and

Simulated Maintenance Margin=Position Maintenance Margin +(Selected Order Value×MMR)\text{Simulated Maintenance Margin} = \text{Position Maintenance Margin } + (\text{Selected Order Value} \times MMR)

Where:

  • Position Maintenance Margin\text{Position Maintenance Margin} = the maintenance margin required for your current open positions.

  • Selected Order Value\text{Selected Order Value} = the notional value of open orders that would increase your net position exposure.

  • MMRMMR = 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.

Simulated Cross-Margin Ratio
Action

< 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.

circle-info

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\text{Selected Order Value}.

Frequently Asked Questions

chevron-rightWhy did my liquidation price change? hashtag

In cross-margin, the liquidation price for individual positions is only an estimate and changes dynamically due to several factors:

  • Position Adjustments: Opening, closing, or adjusting any position affects the total maintenance margin.

  • Index Price Changes: Fluctuations in the index price of held assets impact unrealized profit and loss (PnL) and thus the account's equity.

  • Funding Rate Payments: Funding rate payments periodically adjust your balance.

The estimated liquidation price assumes all other positions and their unrealized PnL are constant, which is seldom the reality. Therefore, it's crucial to directly monitor your Cross Margin Ratio rather than depend solely on the liquidation price of any single position.

chevron-rightHow are liquidations handled when I have multiple open positions on Rails?hashtag

Each position has its own liquidation price, but in cross margin all positions share the same collateral pool (your account equity). This means liquidation is assessed at the account level, not per individual position, and each liquidation price is recalculated as your maintenance margin changes.

When your cross margin ratio reaches 100%, the liquidation process is triggered.

chevron-rightHow do I avoid liquidation?hashtag

Liquidation happens when your account equity falls to the minimum maintenance margin required to keep it open.

To reduce the risk of liquidation:

  1. Set up a stop loss trigger order, which will close your position before the market reaches your liquidation price.

  2. Add more collateral by depositing more funds into your account. This increases your margin available, which can move your liquidation price further away from the current index price.

  3. Reduce your position size or leverage. Smaller positions require less margin and are generally less likely to reach liquidation from market changes.

  4. Monitor your Cross Margin Ratio closely. Changes such as opening new positions, withdrawing funds, or losses on other positions can impact your margin calculations and may increase liquidation risk.

chevron-rightWhat is slippage and why does it happen?hashtag

What is slippage?

Slippage happens when the price at which your order is executed is different from the price you expected when you placed the order.

Slippage usually occurs with market orders because they are filled instantly at the best available prices in the order book. If there isn’t enough liquidity at your expected price level, the system continues filling your order at the next best available price until the full order is matched.

Why does slippage happen?

  • Low Liquidity: If the order book doesn’t have enough buy/sell orders close to your requested price.

  • Large Orders: Bigger trades may move through multiple price levels in the book.

  • Fast Markets: During volatile price swings, prices can change between the moment you place your order and when it is filled.

circle-check

Last updated

Was this helpful?