The formula for calculating the liquidation price for a margin trade using currency "i" is as follows:
Here, "i" represents the currency "i", "Ai" represents the total amount of "i" assets, "Li" represents the borrowed amount of "x" asset, "Ri" represents the amount of interest payable on "x" asset, "Pi" represents the index price of the "x" asset/BTC (or USDT) pair, and finally "li" represents the liquidation price for "x" asset.
Liquidation is triggered when the risk ratio reaches the liquidation risk ratio .
Risk ratio = Total assets / (Total amount borrowed + Interest payable).
Using the "i" currency as an example:
Therefore, the liquidation reference price for "i" currency is:
Ratio of the index price to the liquidation reference price = (Liquidation price - Index price) / Index price.