โš–๏ธCross Margin Requirement

Setup

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 nBโ‰ฅ0\small n_B\ge0

  • A set of open sell orders with total size of nSโ‰ฅ0\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โก(nSโˆ’nP,ย 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ย Factorโˆ—maxโก(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ย Factorโˆ—Positionย 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ย Rateโˆ—โˆฃnPโˆฃโˆ—Markย 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ย Priceโˆ’Markย Price,ย 0)ย forย aย Buyย Ordermaxโก(Markย Priceโˆ’Limitย 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)โˆ—โˆฃnPโˆฃโˆ—Markย 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)โˆ—โˆฃnPโˆฃโˆ—Markย 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