Leverage & Liquidation

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.

Cross Leverage

Rails offers up to 5× effective leverage in cross margin, provided you have sufficient balance. In cross margin, leverage is applied at the account level rather than the individual trade level, because all open positions share the same collateral pool.

Changing Leverage

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

How Does Liquidation Work?

When you trade with leverage, your position can be liquidated if the market moves against you. Your liquidation price (the index price at which your position will be liquidated) is the maximum absolute index price permitted to maintain a non-negative account balance. Liquidation is executed via market order when the index price crosses your liquidation price.

The liquidation price for any open position can be viewed in the Position tab on the main Trade page as shown below.

How is the Liquidation Price Calculated?

The liquidation price is calculated slightly differently for Long and Short positions as shown here:

Liquidation Pricelong=Average Price×(1(1Account Leverage)+Safety Margin)\text{Liquidation Price}_{\text{long}} = \text{Average Price} \times \left( 1 - \left( \frac{1}{\text{Account Leverage}} \right) + \text{Safety Margin} \right)
Liquidation Priceshort=Average Price×(1+(1Account Leverage)Safety Margin)\text{Liquidation Price}_{\text{short}} = \text{Average Price} \times \left( 1 + \left( \frac{1}{\text{Account Leverage}} \right) - \text{Safety Margin} \right)

Where:

  • Average Price\text{Average Price} is the average entry price of the orders used to fill your position.

  • Account Leverage\text{Account Leverage} is the actual leverage used when you opened your positions, not the leverage you selected when placing your trade. It is determined using the sum of all open position balances and the account balance from the Account Summary.

Account Leverage=max(Total PositionsTotal Account Balance,1)\text{Account Leverage}=\max\left( \frac{\text{Total Positions}}{\text{Total Account Balance}}, 1 \right)
  • Safety Margin\text{Safety Margin} is a standard 3% buffer which is added to account for market volatility and slippage. It is the minimum margin requirement which helps prevent negative account balances.

Safety Margin=Transaction Fee+Liquidation Fee+Slippage Buffer=0.1%+1%+1.9%=3%\begin{align*} \text{Safety Margin} &= \text{Transaction Fee} + \text{Liquidation Fee} + \text{Slippage Buffer} \\ &= 0.1\% + 1\% + 1.9\% \\ &= 3\% \end{align*}

Frequently Asked Questions

Why does my order have a liquidation price if I am not using leverage?

Since there is a safety net (3% safety margin), even if you open a position with 1x cross-leverage (i.e. no leverage) you will still see a liquidation price. This is in place to ensure your account balance does not go into the negative if the market moves very quickly causing slippage (the difference between the expected price of a trade and the actual price it is executed at).

Why did my liquidation price change?

The liquidation price is based off of your available balance which changes as you open and close trades. If you open a new position, the liquidation price will move closer to the entry price as the available balance decreases, increasing the risk of liquidation if the market moves unfavourably. Conversely, if you close a different position with a positive P&L, your liquidation price for any remaining positions will move further away from the entry price as the risk of liquidation decreases.

Deposits and withdrawals to your account affect your collateral and impact your margin therefore changes to the funds available in your account have a direct impact on your liquidation price. A deposit into your account will increase your available balance and push your liquidation price further away. Reduced collateral will have the adverse affect and bring your liquidation price even closer to your entry price.

How are liquidations handled when I have multiple open positions on Rails?

Each position has its own liquidation price completely independent of your other positions. Because Rails uses cross-leverage, we only recalculate each position’s liquidation price when something affects your available balance (e.g. opening or closing a trade, deposits or withdrawals); between those events, each positions' liquidation price is fixed.

Whenever you initiate a change to your available balance (e.g.make a deposit, withdraw from your account, or open or close a position) our system recalculates and shows the updated liquidation price for each of your remaining open positions.

  1. Price Recalculation

    • Any time the available balance changes, Rails recalculates the maintenance requirements for all your positions.

    • After that recalculation, each position’s liquidation price is fixed until your next trigger event.

  2. Individual Liquidation Triggers

    • Each position has its own specific liquidation price.

    • If the index price for that asset ever crosses your position’s liquidation price, only that position is immediately liquidated.

Liquidation of one position will trigger a recalculation of any open positions.

How do I avoid liquidation?

Liquidation occurs when your available balance falls below the maintenance margin required to keep your open positions. At Rails, we use cross-margin and leverage, meaning your liquidation price is directly affected by both your total your account equity and size of all positions.

To protect yourself and avoid forced liquidation, there are two key strategies:

  1. Set up a stop loss trigger order, which will close your position at a predefined price if the market moves against you. This helps limit your losses before reaching the liquidation threshold.

  2. Increase your collateral by depositing more funds into your account. This lowers your effective leverage and moves the liquidation price further away.

Why is the leverage used to determine the liquidation price different from what I selected when I placed my order?

The leverage you select when using the order panel determines your buying power (leverage x available balance). However, the effective leverage (the actual leverage used when opening a position) is calculated as follows:

Effective Leverage=Total Position ValueTotal Available Balance\text{Effective Leverage} = \frac{\text{Total Position Value}}{\text{Total Available Balance}}

The effective leverage may vary from your selected leverage due to several factors:

  1. Price Changes: The entry price may differ slightly between placing the order and its execution due to market movements.

  2. Fees: Trading fees are deducted from your available balance, reducing the amount that can be leveraged.

  3. Margin Requirements: A portion of your balance is reserved as margin to cover potential slippage or adverse price movements, impacting the effective leverage applied.

Since leverage is calculated as a function of position size and available balance, these adjustments to your balance and the actual position size can result in the effective leverage being slightly different from the leverage you initially selected.

How do I avoid liquidation

Liquidation occurs when your available balance falls below the maintenance margin required to keep your open positions. At Rails, we use cross-margin and leverage, meaning your liquidation price is directly affected by both your total your account equity and size of all positions.

To protect yourself and avoid forced liquidation, there are two key strategies:

  1. Set up a stop loss trigger order, which will close your position at a predefined price if the market moves against you. This helps limit your losses before reaching the liquidation threshold.

  2. Increase your collateral by depositing more funds into your account. This lowers your effective leverage and moves the liquidation price further away.

What is the safety margin, and why is it 3%?

The safety margin is a key component of determining the liquidation price. It accounts for all fees that would be charged in the event of the position closing as well as a buffer to account for slippage. This is standard to avoid customer account balances going into the negative.

The safety margin is static for all users and is calculated as follows:

  • Safety Margin=3%=Liquidation Fee+Transaction Fee+Slippage Buffer\text{Safety Margin} = 3\% = \text{Liquidation Fee} + \text{Transaction Fee} + \text{Slippage Buffer}

Where:

  • Liquidation Fee\text{Liquidation Fee} is a 1% standard fee charged to compensate for taking on the risk of managing high risk transactions and to incentivize responsible trading.

  • Transaction Fee\text{Transaction Fee} is a 0.1% standard fee charged for all open and closed positions on the platform.

  • Slippage Buffer\text{Slippage Buffer} is an additional allowance to account for rapidly shifting index prices which may negatively impact trade completion. It is set at 1.9%.

What is slippage and why does it happen?

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.

Last updated

Was this helpful?