Liquidation process will be performed immediately once your margin level equals to or is more than 100% or when your free margin equals to or is less than 0%.
On certain occasions, because of slippage in the market, the free margin might temporarily less than zero.
For example, assuming a user has a total fund of 1700 USDT with a leverage of 10 and that the buy price of BTC/USDT is 8000 and the sell price is 7980. In this scenario, if the user buys 1000 contracts (1 contract = 1mBTC(0.001BTC)), the free margin would be:
Free Margin =
Balance + Unrealized P&L - Used Margin
= 1700 - (8000 - 7980) - (0.001 x 1000 x 8000) / 10
= 800
If the short/sell price drops to 7000, and the long/buy price drops to 7020:
Free Margin =
Balance + Unrealized P&L - Used Margin
= 1700 - (8000-7000) - (0.001 x 1000 x 7020) / 10
= -2
The system detects free margin <0 and will be liquidated.
After the liquidation, the users fund will be:
Balance - P&L =
1700 - (0.001 x 1000) x (8000 - 7000)
= 700