Cross Margin

Perpetual future health is calculated as follows

perpHealth=quantity(markPriceāˆ—riskWeightāˆ’avgEntryPrice)+fundingperpHealth = quantity(markPrice * riskWeight - avgEntryPrice) + funding

where quantity is a negative value for short positions.

For example, lets calculate the maintenance health on a 5 BTC-Perp short position that was entered at $38,000. The price of BTC is now $40,000 and the position has earned $500 in funding:

  • initialLongWeight = 0.9

  • maintenanceLongWeight = 0.95

  • initialShortWeight = 1.1

  • maintenanceShortWeight = 1.05

Max Leverage:

Because of these weights, there is a limit to the max leverage a subAccount can achieve on an asset:

maxLongLeverage=1/(1āˆ’riskWeight)maxLongLeverage = 1/(1- riskWeight)

maxShortLeverage=1/(riskWeightāˆ’1)maxShortLeverage = 1/(riskWeight -1)

So for BTC-Perps, the max initial leverage would be 1/(1āˆ’0.9)=10x1/(1-0.9) = 10x.

Last updated