⚖️Cross Margin Requirement


A portfolio using Cross Margin mode with positions in mm derivative assets {D1,...,Dm}\small\{D_1,...,D_m\}

For each synthetic asset {D1,...,Dm}\small\{D_1,...,D_m\} :

  • Open position of size nPn_P (positive if long, negative if short position)

  • A set of open buy orders with total size of nB0\small n_B\ge0

  • A set of open sell orders with total size of nS0\small n_S\ge0

Open sizes

  • Position Sizelong=max(nP, 0)\small\text{Position Size}_\text{long}=\max(n_P,~0) : absolute size of Long position.

  • Position Sizeshort=max(nP, 0)\small\text{Position Size}_\text{short}=\max(-n_P, ~0) : absolute size of Short position.

  • Buy open size : Open Sizebuy=max(nB+nP, 0)\small\text{Open Size}_\text{buy}=\max(n_B+n_P,~0) : potential absolute long position size if all buy orders are filled immediately

  • Sell open size : Open Sizesell=max(nSnP, 0)\small\text{Open Size}_\text{sell}=\max(n_S-n_P,~0) : potential absolute short position size if all sell orders are filled immediately

Margin Fractions

The initial margin fractions (IMF) are increasing functions of the notional (i.e. the maximum allowed leverage decreases with higher notional).

For perpetual positions, the initial margin fractions IMFbuy\text{IMF}_\text{buy} and IMFsell\text{IMF}_\text{sell} are calculated as :

IMFbuy/sell(Dj)=max(Base IMF , IMF Factor  max(Open Sizebuy/sell(Dj)Mark Price(Dj)IMF Shift,0))\small\text{IMF}_\text{buy/sell}(D_j)=\max\bigg(\text{Base IMF}\\~,~\text{IMF Factor}~*~\sqrt{\max\Big(\text{Open Size}_\text{buy/sell}(D_j)*\text{Mark Price}(D_j)-\text{IMF~Shift},0\Big)} \bigg)

i.e. the Initial Margin Fraction (which is the inverse if the Maximum Allowed Initial Leverage) increases as a square root of USD Notional for large notionals.

Position IMF is similar to the IMF but excludes open orders :

Position IMF(Dj)=max(Base IMF , IMF Factormax(Position Size(Dj)Mark Price(Dj)IMF Shift,0))\small\text{Position IMF}(D_j)=\max\bigg(\text{Base IMF}\\~,~\text{IMF Factor}*\sqrt{\max\Big(\text{Position Size}(D_j)*\text{Mark Price}(D_j)-\text{IMF~Shift},0\Big)} \bigg)

The Maintenance Margin Fraction MMF\text{MMF} is proportional to position initial margin fraction:

MMF(Dj)=MMF FactorPosition IMF(Dj)\small\text{MMF}(D_j)=\text{MMF Factor}*\text{Position IMF}(D_j)

The plots below show the example of margin fractions for ETH-USD-PERP :

The margin fractions can be translated into the margin requirements below. Since the margin fractions increase for large notionals, the margin requirements increase non-linearly for those notionals :

Fee Provision

Given the conservative fee rate :

Fee Rate=max(Account Maker Fee Rate, Account Taker Fee Rate)\small\text{Fee Rate}=\max\Big(\text{Account Maker Fee Rate},~\text{Account Taker Fee Rate}\Big)

For a given synthetic asset DjD_j :

Fee Provision(Dj)=Fee Rate(nB+nS+nP)Mark Price(Dj)\text{Fee Provision}(D_j)=\text{Fee Rate}\Big(n_B+n_S+|n_P|\Big)*\text{Mark Price}(D_j)

For MMR and Position IMR, open orders are not included in fee provision calculation :

Position Fee Provision(Dj)=Fee RatenPMark Price(Dj)\text{Position Fee Provision}(D_j)=\text{Fee Rate}*|n_P|*\text{Mark Price}(D_j)

Open Loss

The Open Loss is an additional margin requirement for orders which are more aggressive than the Mark Price. It offsets the difference between the order limit price and the Mark Price.

Open Loss={max(Limit PriceMark Price, 0) for a Buy Ordermax(Mark PriceLimit Price, 0) for a Sell Order\text{Open Loss} = \begin{cases} \max\big( \text{Limit Price}-\text{Mark Price} ,~0\big) \text{ for a Buy Order}\\ \max\big( \text{Mark Price}-\text{Limit Price} ,~0\big) \text{ for a Sell Order} \end{cases}

Note that the "limit" price of a Market Order is defined by the instrument's Price Band.

Margin Requirements

Position Margin Requirement

Initial margin requirement (IMR)

For all derivatives positions, the initial margin requirements IMRbuy\text{IMR}_\text{buy} and IMRsell\text{IMR}_\text{sell} are calculated as :

IMRbuy/sell(Dj)=IMFbuy/sell(Dj)Open Sizebuy/sell(Dj)Mark Price(Dj)\small\text{IMR}_\text{buy/sell}(D_j)=\text{IMF}_\text{buy/sell}(D_j)*\text{Open Size}_\text{buy/sell}(D_j)*\text{Mark Price}(D_j)
IMR(Dj)=IMR(Dj)=max(IMRbuy(Dj), IMRsell(Dj))+Fee Provision(Dj)+Open Loss(Dj)\small\text{IMR}(D_j)=\text{IMR}(D_j)=\max\Big(\text{IMR}_\text{buy}(D_j),~\text{IMR}_\text{sell}(D_j)\Big)+\text{Fee Provision}(D_j)+\text{Open Loss}(D_j)

Position Initial margin requirement (Position IMR)

Position IMR(Dj)=Position IMF(Dj)nPMark Price(Dj)+Position Fee Provision(Dj)\small\text{Position IMR}(D_j)=\text{Position IMF}(D_j)*|n_P|*\text{Mark Price}(D_j)+\text{Position Fee Provision}(D_j)

Maintenance margin requirement (MMR)

MMR(Dj)=MMF(Dj)nPMark Price(Dj)+Position Fee Provision(Dj)+Open Loss(Dj)\small\text{MMR}(D_j)=\text{MMF}(D_j)*|n_P|*\text{Mark Price}(D_j)+\text{Position Fee Provision}(D_j)+\text{Open Loss}(D_j)

Account Margin Requirement

The account requirements are then calculated as the simple sum of individual synthetic asset balance requirements:

  • Account IMR=j=1mIMR(Dj)\small\text{Account IMR}=\sum\limits_{j=1}^m \text{IMR}(D_j)

  • Account MMR=j=1mMMR(Dj)\small\text{Account MMR}=\sum\limits_{j=1}^m \text{MMR}(D_j)

Last updated