# Force Close

Passive liquidation is a crucial mechanism in futures trading aimed at maintaining market stability and safeguarding traders from significant losses. In SubstanceX, there are two mechanisms that trigger passive liquidation of a user's position:<br>

### Liquidation&#x20;

When a user's net position value falls below the minimum maintenance margin, liquidation is triggered.

1. Net value = Collateral + PNL after fees.
2. Minimum maintenance margin = Size \* Mark Price \* MaintenanceMarginRatio + Est. Liq. fees.
3. For Long: Est. Liq. price = (Collateral + Fees - Entry price \* Size) / (Size \* (MaintenanceMarginRatio + Est.LiquidateFeeRatio - 1)\
   For Short: Est. Liq. price = (Collateral + Fees + Entry price \* Size) / (Size \* (MaintenanceMarginRatio + Est.LiquidateFeeRatio + 1)

* Typically, the Est.LiquidateFeeRatio for each pair is equal to its TradingFee.
* Liquidation will only result in the user losing all the collateral associated with that position. The balance in the user's Exchange Wallet will not be affected.

\
**Case Study:**

<table><thead><tr><th width="396">Pairs</th><th align="right">BTC/USD</th></tr></thead><tbody><tr><td>Long / Short</td><td align="right">Long</td></tr><tr><td>Collateral （$）</td><td align="right">10,000.00</td></tr><tr><td>Entry Price（$）</td><td align="right">30,000.00</td></tr><tr><td>Leverage</td><td align="right">30.00 x</td></tr><tr><td>Size</td><td align="right">10.00</td></tr><tr><td>Mark Price（$）</td><td align="right">31,000.00</td></tr><tr><td>Fees（$）</td><td align="right">-200.00</td></tr><tr><td>MaintenanceMarginRatio</td><td align="right">0.5%</td></tr><tr><td>TradingFeeRate</td><td align="right">0.08%</td></tr><tr><td>Est. Liq. Price（$）</td><td align="right">29,165.95</td></tr></tbody></table>

### MaxProfit Liquidation

When a user's PNL on a position reaches ten times the collateral, a maxprofit liquidation is triggered, and the system will close the perpetual position at market price.

1. Max Profit = Collateral \* MaxProfitRatio
2. For Long : Max Profit Price = Entry Price + Max Profit / Size
3. For Short : Max Profit Price = Entry Price - Max Profit / Size

* Please note that max profit does not represent actual earnings. Actual earnings need to account for pending fees.
* The MaxProfitRatio may vary for different trading pairs. You can find specific details in [perpetual-specifications](https://docs.substancex.io/perpetual/perpetual-specifications "mention").

**Case Study：**

| Perps               |    BTC/USD |
| ------------------- | ---------: |
| Collateral （$）      |  10,000.00 |
| Entry Price（$）      |  30,000.00 |
| Leverage            |    30.00 x |
| Size                |      10.00 |
| MaxProfitRatio      |         10 |
| Max Profit（$）       | 100,000.00 |
| Max Profit Price（$） |  40,000.00 |
| Close Price（$）      |  40,000.00 |
| Fees（$）             |    -100.00 |
| PnL（$）              |  99,900.00 |

<br>
