July 24, 2020
CoinFLEX uses portfolio VaR to calculate risk. This means that instead of a concept of position margin, CoinFLEX looks at the portfolio margin of your account. This means the actual margin required is a function of all the positions and orders in your portfolio, compared to the collateral balance you have.
However, getting an estimated liquidation price is important for traders. Hence we have come up with an Estimated Liquidation Price calculation as a handy reference to help traders to know at what price their positions are at risk of liquidation:
Three important things to note about the estimated liquidation price:
Calculation of Estimated Liquidation Price – LINEAR account
marketPrice
is the current mark price
collateralBalance
is the haircutted collateral balance of the accountportfolioVarMargin
is calculated from the risk engine. liqMarginRatio = 50% = 0.5 position
is the contract position. negative for short positions
This can be calculated for each position. Only 'marketPrice' and 'position' are specific to the contract.