When Kine goes live an asset, base on the financial nature of the asset, Kine will decide whether it supports cross margin mode, all assets support isolated margin mode automatically. Positions of cross margin assets are placed in "Cross margin account" after opened. The leverage of those positions will be calculated together as well as liquidated together once the predefined leverage limit were hit. User can switch to isolated mode for each asset, in which case the leverage and liquidation will be accounted and executed for this asset only.
To achieve cross asset margining and meantime simplifying the calculation, Kine therefore introduced "Asset" and "Debt" concept.
Asset is the sum of long position usd value.
Debt is the absolute sum of short position usd value.
Equity = Asset - Debt
Leverage = Asset / Equity
eg: John has 10000 kUSD transferred to cross margin account and then bought 2 BTC at 50000 USD, 2 ETH at 2000 USD. Now his account balances are as following: kUSD = 10000 - (50000 * 2 + 2000 * 2) = - 94000 BTC = 2 ETH = 2 So, statistics below: asset = 2 * 50000 + 2 * 2000 = 104000 debt = | - 94000 | = 94000 equity = 104000 - 94000 = 10000 (as price has not moved) leverage = 104000/10000 = 10.4
Kine reads the realtime price feed from Coinbase, Kraken, Bitstamp and Bitfinex, for each asset, there is a weight combination of the four sources ultimately generates the index price.
Leverage of each cross margin and isolated margin account is calculated in realtime, when it hits leverage limit , the kUSD balance as well as other asset(s) will be cleared.
eg: The market has moved against John's favor, now BTC at 45000 USD and ETH at 2475 USD . So, statistics below: asset = 2 * 45000 + 2 * 2475 = 94950 debt = | - 94000 | = 94000 equity = 94950 - 94000 = 950 leverage = 94950/950 = 99.95 Now as the liquidation leverage is set at 99x , John's cross margin account will be liquidated.
When a trader's position triggered liquidation, it will be taken over by Kine liquidity pool. Meantime, if after the take over, Platform Net Position Ratio hit limit, then the over exposed position will need to be cleared by reducing equivalent amount of opposite position from all other traders. The process of reducing equivalent amount of opposite position is called Auto Deleveraging(ADL).
Essentially, higher position PNL percentage and leverage contributes to higher ADL priority. Below is the calculation:
Ranking = PNL Percentage * Leverage (if PNL percentage ≥ 0) PNL Percentage / Leverage (if PNL percentage < 0)