šŸ“–Margin Term Reference

Definitions

Position Notional (USD) :

Theoretical worth of a position in a derivative asset in USD terms :

PositionĀ Notional=PositionĀ Sizeāˆ—MarkĀ Price\text{Position Notional}=\text{Position Size}*\text{Mark Price}

Collateral Value (USD)

This is the value of all tokens on account in USD terms.

TotalĀ CollateralĀ Value=USDCĀ Balanceāˆ—USDCĀ OracleĀ Price\text{Total Collateral Value}=\text{USDC Balance}*\text{USDC Oracle Price}

Position Cost (USDC)

Only applies to synthetic balances. Represents the position entry cost - amount of USDC that account paid/received from entering the position. Updated on every trade that account executes in this position. The cost is constant in USDC terms between trades.

PositionĀ Cost=PositionĀ Sizeāˆ—AverageĀ EntryĀ Price\text{Position Cost}=\text{Position Size}*\text{Average Entry Price}

where PositionĀ Cost\text{Position Cost} is a signed number and AverageĀ EntryĀ Price\text{Average Entry Price} is expressed in USDC

  • Example 1 : long position of 1 ETH-USD-PERP bought at $2,000 with USDC/USD=1 has average entry price of 2,000 USDC and position cost of 2,000 USDC.

  • Example 2 : short position of 1 ETH-USD-PERP sold at $2,000 with USDC/USD=0.8 has average entry price of 2,500 USDC and position cost of -2,500 USDC.

Accrued Funding (USD)

This refers to the unrealized Funding accrued on open perpetual positions since accountā€™s last trade in those positions. When the account executes a trade in an existing open perpetual position, any accrued funding on this position is realized (i.e. accountā€™s USDC balance is updated) and Funding PnL of this position is reset to 0. For more details on funding mechanism, please refer to the Funding Mechanism page

Unrealized PnL (USD)

Unrealized PnL on a derivative asset position determines how much money an account will receive if the corresponding position is closed at mark price :

UnrealizedĀ PnL=āˆ‘j=1m(PositionĀ Notional(Dj)āˆ’PositionĀ Cost(Dj)āˆ—USDCĀ OracleĀ Price+AccruedĀ Funding(Dj))\small\text{Unrealized PnL}=\sum\limits_{j=1}^{m} \bigg(\text{Position Notional}(D_j)-\text{Position Cost}(D_j)*\text{USDC Oracle Price}\\+\text{Accrued Funding}(D_j)\bigg)

where Dj,Ā jāˆˆ[1..m]D_j,~j\in[1..m] are derivative assets where the account has an open position

Account Value (USD)

Also called margin balance. This value is a key component in margin checks and represents the accountā€™s token assets value in USD if we close all open positions at their mark (fair) price.

AccountĀ Value=CollateralĀ Value+UnrealizedĀ PnL\text{Account Value}=\text{Collateral Value}+\text{Unrealized PnL}

Margin Requirement

  • Account Initial Margin Requirement (USD) - When submitting a new order, the account is subject to a minimum value defined by the initial margin requirement. Note that the cloud and the chain calculate different initial margin requirements for an account :

    • Account IMR (including open orders) - This is calculated off-chain (on cloud) and incorporates both open positions and open/pending orders.

    • Position IMR (only including open positions) - This is calculated on-chain for validation of incoming trades.

    Note that the Account IMR calculated off-chain is more conservative than the Position IMR. Therefore, orders submitted from the cloud to the chain are very unlikely to be rejected.

  • Account Maintenance Margin Requirement (USD) - The MMR is the minimum account value required for the account not to be available for liquidation

Note : Calculation of IMR and MMR in a cross-margin account can be found in the Cross Margin Requirement page

Free Collateral Balance (USD)

The USD value of the collateral that can be immediately withdrawn

FreeĀ CollateralĀ Balance=AccountĀ Valueāˆ’AccountĀ InitialĀ MarginĀ Requirement\text{Free Collateral Balance}=\text{Account Value}-\text{Account Initial Margin Requirement}

Margin Ratio (%)

This ratio compares the account value to the maintenance margin requirement. If the factor is above 1, the user account is under liquidation mode.

MarginĀ Ratio=MaintenanceĀ MarginĀ RequirementAccountĀ Value\text{Margin Ratio}=\frac{\text{Maintenance Margin Requirement}}{\text{Account Value}}

Last updated