Setup
A portfolio using Cross Margin mode with positions in m m m derivative assets { D 1 , . . . , D m } \small\{D_1,...,D_m\} { D 1 , ... , D m }
For each synthetic asset { D 1 , . . . , D m } \small\{D_1,...,D_m\} { D 1 , ... , D m } :
Open position of size n P n_P n P (positive if long, negative if short position)
A set of open buy orders with total size of n B ≥ 0 \small n_B\ge0 n B ≥ 0
A set of open sell orders with total size of n S ≥ 0 \small n_S\ge0 n S ≥ 0
Open sizes
Position Size long = max ( n P , 0 ) \small\text{Position Size}_\text{long}=\max(n_P,~0) Position Size long = max ( n P , 0 ) : absolute size of Long position.
Position Size short = max ( − n P , 0 ) \small\text{Position Size}_\text{short}=\max(-n_P, ~0) Position Size short = max ( − n P , 0 ) : absolute size of Short position.
Buy open size : Open Size buy = max ( n B + n P , 0 ) \small\text{Open Size}_\text{buy}=\max(n_B+n_P,~0) Open Size buy = max ( n B + n P , 0 ) : potential absolute long position size if all buy orders are filled immediately
Sell open size : Open Size sell = max ( n S − n P , 0 ) \small\text{Open Size}_\text{sell}=\max(n_S-n_P,~0) Open Size 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 IMF buy \text{IMF}_\text{buy} IMF buy and IMF sell \text{IMF}_\text{sell} IMF sell are calculated as :
IMF buy/sell ( D j ) = max ( Base IMF , IMF Factor ∗ max ( Open Size buy/sell ( D j ) ∗ Mark Price ( D j ) − IMF Shift , 0 ) ) \begin{aligned}
& \text{IMF}_\text{buy/sell}(D_j)= \\
& \\
& \small\max\Biggl(~\small\text{Base IMF}~,~\small\text{IMF Factor}~*~\sqrt{\max\bigl(\small\text{Open Size}_\text{buy/sell}(D_j)*\small\text{Mark Price}(D_j)-\small\text{IMF~Shift},0\bigr)}~\Biggr)
\end{aligned} IMF buy/sell ( D j ) = max ( Base IMF , IMF Factor ∗ max ( Open Size buy/sell ( D j ) ∗ Mark Price ( D j ) − IMF Shift , 0 ) )
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 ( D j ) = max ( Base IMF , IMF Factor ∗ max ( Position Size ( D j ) ∗ Mark Price ( D j ) − IMF Shift , 0 ) ) \begin{aligned}
& \text{Position IMF}(D_j)= \\
& \max\Biggl(~\small\text{Base IMF}~,~\small\text{IMF Factor}*\sqrt{\max\bigl(\small\text{Position Size}(D_j)*\small\text{Mark Price}(D_j)-\small\text{IMF~Shift},0\bigr)}~\Biggr)
\end{aligned} Position IMF ( D j ) = max ( Base IMF , IMF Factor ∗ max ( Position Size ( D j ) ∗ Mark Price ( D j ) − IMF Shift , 0 ) )
The Maintenance Margin Fraction MMF \text{MMF} MMF is proportional to position initial margin fraction:
MMF ( D j ) = MMF Factor ∗ Position IMF ( D j ) \small\text{MMF}(D_j)=\text{MMF Factor}*\text{Position IMF}(D_j) MMF ( D j ) = MMF Factor ∗ Position IMF ( D j )
The plots below show the example of margin fractions for ETH-USD-PERP :
ETH-USD-PERP Margin Fractions (%) as functions of USD Notional
ETH-USD-PERP Maximum Leverage as a function of USD Notional
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 :
ETH-USD-PERP Margin Requirements (USD) as a function of USD Notional
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) Fee Rate = max ( Account Maker Fee Rate , Account Taker Fee Rate )
For a given synthetic asset D j D_j D j :
Fee Provision ( D j ) = Fee Rate ( n B + n S + ∣ n P ∣ ) ∗ Mark Price ( D j ) \text{Fee Provision}(D_j)=\text{Fee Rate}\Big(n_B+n_S+|n_P|\Big)*\text{Mark Price}(D_j) Fee Provision ( D j ) = Fee Rate ( n B + n S + ∣ n P ∣ ) ∗ Mark Price ( D j )
For MMR and Position IMR , open orders are not included in fee provision calculation :
Position Fee Provision ( D j ) = Fee Rate ∗ ∣ n P ∣ ∗ Mark Price ( D j ) \text{Position Fee Provision}(D_j)=\text{Fee Rate}*|n_P|*\text{Mark Price}(D_j) Position Fee Provision ( D j ) = Fee Rate ∗ ∣ n P ∣ ∗ 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 Order max ( 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} Open Loss = { max ( Limit Price − Mark Price , 0 ) for a Buy Order max ( Mark Price − Limit Price , 0 ) for a Sell Order
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 IMR buy \text{IMR}_\text{buy} IMR buy and IMR sell \text{IMR}_\text{sell} IMR sell are calculated as :
IMR buy/sell ( D j ) = IMF buy/sell ( D j ) ∗ Open Size buy/sell ( D j ) ∗ Mark Price ( D j ) \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 buy/sell ( D j ) = IMF buy/sell ( D j ) ∗ Open Size buy/sell ( D j ) ∗ Mark Price ( D j )
IMR ( D j ) = IMR ( D j ) = max ( IMR buy ( D j ) , IMR sell ( D j ) ) + Fee Provision ( D j ) + Open Loss ( D j ) \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) IMR ( D j ) = IMR ( D j ) = max ( IMR buy ( D j ) , IMR sell ( D j ) ) + Fee Provision ( D j ) + Open Loss ( D j )
Position Initial margin requirement (Position IMR )
Position IMR ( D j ) = Position IMF ( D j ) ∗ ∣ n P ∣ ∗ Mark Price ( D j ) + Position Fee Provision ( D j ) \small\text{Position IMR}(D_j)=\text{Position IMF}(D_j)*|n_P|*\text{Mark Price}(D_j)+\text{Position Fee Provision}(D_j) Position IMR ( D j ) = Position IMF ( D j ) ∗ ∣ n P ∣ ∗ Mark Price ( D j ) + Position Fee Provision ( D j )
Maintenance margin requirement (MMR )
MMR ( D j ) = MMF ( D j ) ∗ ∣ n P ∣ ∗ Mark Price ( D j ) + Position Fee Provision ( D j ) + Open Loss ( D j ) \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) MMR ( D j ) = MMF ( D j ) ∗ ∣ n P ∣ ∗ Mark Price ( D j ) + Position Fee Provision ( D j ) + 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 = 1 m IMR ( D j ) \small\text{Account IMR}=\sum\limits_{j=1}^m \text{IMR}(D_j) Account IMR = j = 1 ∑ m IMR ( D j )
Account MMR = ∑ j = 1 m MMR ( D j ) \small\text{Account MMR}=\sum\limits_{j=1}^m \text{MMR}(D_j) Account MMR = j = 1 ∑ m MMR ( D j )
Leverage
Account Leverage
Account Leverage = ∑ j = 1 m [ Open Size buy/sell ( D j ) ∗ Mark Price ( D j ) ] Account Value \text{Account Leverage}=\frac{\sum\limits_{j=1}^m [\text{Open Size}_\text{buy/sell}(D_j)*\text{Mark Price}(D_j)]}{\text{Account Value}} Account Leverage = Account Value j = 1 ∑ m [ Open Size buy/sell ( D j ) ∗ Mark Price ( D j )]
Max Leverage
Max Leverage = ∑ j = 1 m [ Open Size buy/sell ( D j ) ∗ Mark Price ( D j ) ] Account IMR \text{Max Leverage}=\frac{\sum\limits_{j=1}^m [\text{Open Size}_\text{buy/sell}(D_j)*\text{Mark Price}(D_j)]}{\text{Account IMR}} Max Leverage = Account IMR j = 1 ∑ m [ Open Size buy/sell ( D j ) ∗ Mark Price ( D j )]