How Liquidations Work on DXS

DXS: Just Trade
5 min readJun 2, 2022

A liquidation is when a trading platform automatically closes a trader’s position. Liquidations are a fail-safe, developed to protect both traders and trading platforms from incurring losses beyond a specified point.

Liquidations are typically associated with margin trading.

What is margin trading?

Margin trading allows traders to borrow funds against collateral (margin) in their trading account in order to open larger position sizes. A typical example looks like this:

  • A trader has $1,000 deposited in their trading account
  • This trader opens a $5,000 long position on AAPL @ $160

In the above example, the trader is able to open a position 5X larger than the margin in their trading account. They have opened a position on margin using 5X leverage.

The price of AAPL moves from $160 to $170:

  • $170 / $160–1 = 6.25% movement in AAPL
  • 6.25% * $5,000 = $312.50 profit (31.25%)
  • Equity value = $1,312.50

The price of AAPL moves from $160 to $150:

  • $150 / $160–1 = -6.25% movement in AAPL
  • -6.25% * $5,000 = -$312.50 loss (-31.25%)
  • Equity value = $687.50

In both cases, the use of leverage multiplies the % movement on the underlying asset. Instead of a gain or loss of 6.25%, the trader has been exposed to 5X the underlying volatility — or 31.25%.

What if the trader has multiple positions open simultaneously? Is the margin shared between these positions (cross margin) or dedicated to individual positions (isolated margin)?

Cross margin

Most trading platforms share a trader’s deposited margin balance across all the trader’s open positions. Some positions may be in profit, others in loss, cross margining simply shares the equity value in the account across all open positions.

To avoid liquidation, the trader must ensure that the equity value in their margin account is above the maintenance margin required by the trading platform. For example:

  • Trading platform requires 10% maintenance margin (margin fraction)
  • Trader deposits $2,000 in their trading account
  • Trader opens a $5,000 long position on AAPL @ $160
  • Trader opens a $5,000 short position on MSFT @ $300
  • Equity value = $2,000
  • Total position value = $10,000
  • Margin fraction = 2,000 / 10,000 = 20%

AAPL is now $144, MSFT is now $330:

  • AAPL loss
  • 144 / 160–1 = -10%
  • -10% * 5,000 = -500
  • MSFT loss
  • [330 / 300–1] * -1 = -10%
  • -10% * 5,000 = -500
  • Equity value
  • 2,000–500–500 = 1,000
  • Total position value
  • 10,000–500–500 = 9,000
  • Margin fraction
  • 1,000 / 9,000 = 11.11%

11.11% is very close to the 10% margin fraction liquidation level used by the trading platform in this particular example. If the trader’s open positions deteriorate further such that the margin fraction is less than 10%, the trader’s open positions will be closed (liquidated) by the trading platform.

DXS allows traders to trade directly from their crypto wallet. There are no deposits or ‘accounts’ on DXS. As a result, DXS uses the ‘isolated margin’ approach.

Isolated margin

Trading platforms that use isolated margin allow traders to dedicate an amount of margin to each position separately. This approach is perfect for DXS because it does not require a trader to have funded an account. An open position can be assessed as an independent interaction with the underlying liquidity provisioning protocol.

The isolated margin mechanism allows DXS to abstract away the complexity of funding accounts and allow individual positions to be margined directly. Additionally, isolated margining makes risk management more simple and intuitive.

Liquidation on DXS

DXS has only one rule for liquidating a position:

  • Liquidate the position if the position P/L reaches -80%

Until our implementation of Stablecoins on DXS, all positions will continue to be margined with BSV. The value of the margin posted on any open position therefore fluctuates in fiat terms. Please read this post to further understand fiat-denomination of trading positions.

DXS does not consider the fluctuating value of a trader’s isolated margin! When it comes to liquidations, DXS will only liquidate the position if the position P/L reaches -80%.

Trigger orders

There are three types of trigger order on DXS: take profit, stop loss and breakout trade order (long or short). We can also think of the liquidation price as a stop loss trigger order.

A trigger order is always executed at the best available market price at the moment when the market price intersects the trigger price. This does not always mean you get the price defined by your stop loss or liquidation price!

Our system executes trigger orders on the very next ticker received after the ticker that triggers your trigger order. Our system will fill your order at this price with no slippage.

Be aware that during periods of high volatility in underlying markets, and/or when markets re-open, prices can sometimes gap up or down. In these circumstances, the price your order gets filled at may be better or worse than your trigger price.

Examples

Consider the long MSFT trade scenarios below:

Liquidation (margin value remains the same)

Look at the scenario where 1 BSV is posted as margin and the MSFT price moves from $300 to $60 (BSV price remains steady at $100). The P/L is -80% and the position is liquidated:

  • 0.2 BSV of the margin balance is returned. 0.2 BSV represents the margin remaining after the 80% loss on an initial margin of $100 (1 BSV). In other words, losses totalled $80 and 1 BSV ($100) was posted as margin, hence 0.2 BSV ($20) of margin is returned

Liquidation (margin value deteriorates)

Now look at the scenario where 1 BSV is posted as margin and the MSFT price moves from $300 to $60 (BSV price drops to $50). The P/L is -80% and the position is liquidated:

  • 0 BSV of the margin balance is returned. 0 BSV represents the margin remaining after the 80% loss on an initial margin of $100 (1 BSV). In other words, losses totalled $80 and 1 BSV (now worth $50) was posted as margin, hence 0 BSV of margin is returned

As the above example shows, the loss in USD terms of $80 far exceeds the margin in USD terms of $50. Despite this, DXS allows the trade to remain open, only liquidating the position when the underlying position itself (BSV/USD in this case) has depreciated by 80%.

It is important to note that a trader cannot lose more than the margin posted on any given position!

--

--

DXS: Just Trade

Trade 100s of markets directly from your Web3 wallet. Try at DXS.app