Trading Perps
Perpetual Swaps Market
Margin, Leverage & PnL
Notional Value
The notional of a position corresponds to the total position size in USDC value
Account Margin Ratio
The margin ratio of an account is equal to the total collateral value (ie the USDC balance + any unrealized profit/loss) divided by the total open notional of the account (the sum of the absolute notional value of all positions)
For an account having positions on multiple contracts:
The margin ratio defines the risk level of your account: a higher margin ratio equates to a lower risk level (with a default margin ratio set to 1000% when there are no open positions).
Maintenance Margin Ratio
An account will be liquidated if the Margin Ratio of the account is lower than the Maintenance Margin Ratio required.
PnL (Profit and Loss)
The unrealized PnL of an open position refers to the profits or losses of that position based on the Mark Price:
The realized PnL refers to the profits or losses after closing a position:
PnL settlement
Settling PnL allow traders to move their profit or loss from all perpetual markets to their balance. PnL Settlement has no impact on the Account Margin Ratio or open positions.
It should be noted that settled/unsettled PnL and realized/unrealized PnL are different. PnL is realized when closing or reducing a position. The resulting realized PnL moves into the balance only when the trader triggers a PnL settlement.
Settled PnL into balance can be used for spot trading or withdrawn, but doing so will impact your margin ratio.
The process of PnL Settlement is as follows:
When account X makes a call to settle PnL, Orderly will choose the top accounts with the largest unsettled opposing PnL. Starting from the largest account, each account’s unsettled PnL will be offset with account X, until account X has no more remaining PnL to settle.
As an Example: Account X has +20,000 USDC unsettled PnL with a balance of 100 USDC. The top 2 facing Accounts A and B have -15,000 USDC and -5,000 USDC unsettled PnL respectively:
First, settling Account X vs Account A will increase Account X’s balance by 15,000 USDC and decrease Account A’s balance by 15,000 USDC. Account X has a remaining unsettled PnL of +5,000 USDC and a balance of 15,100 USDC.
Then, settling Account X vs Account B will increase Account X’s balance by 5,000 USDC and decrease Account B’s balance by 5,000 USDC. Account X has a remaining unsettled PnL of 0 and a balance of 20,100 USDC. The settlement process ends since Account X has no remaining unsettled PnL.
Settling PnL will NOT change the user’s balance as displayed user balance already includes unsettled PnL in the calculation.
Withdrawable balance will change after settling PnL as it doesn’t include unsettled profits in the calculation.
All settling PnL does is move profits into user’s account so user is able to withdraw.
Mark Price, Index Price and Last Price
Mark Price
The Mark Price represents the best estimate of a Perpetual Futures contract value and prevents unnecessary liquidations that would potentially be caused by market manipulation: it is less volatile than the Index Price or Last Price.
First we compute the Median Price of the three following components :
Then we apply a cap to the Mark Price relative to the Index Price defined by Factor (see table below) and Cap/Floor funding (cf Funding Rate section)
Index Price
For a given contract, the Index price is the volume-weighted average of the underlying asset prices listed on major spot exchanges.
In order to mitigate the risk of market manipulation on one specific venue or exchanges outages or connectivity issues, Orderly undertakes the following protection measures:
If, for any source, the price deviates by more than 5% from the median price of all sources, Orderly caps/floors the value at +/- 5%. Once the source price falls within the 5% range, its original value will be taken.
If multiple sources show a deviation of more than 5% from the median, Orderly will use the median instead of the volume-weighted average.
If a specific source is not sending any price for over 10 seconds, it will be disregarded from the Index Price calculation completely.
In the Index Price calculation, the weights are computed every 5 minutes and are based on the 4-hour trading volume over the spot trading pairs of the selected centralized exchanges.
Last Price
The Last Price refers to the last traded price of a Perpetual Futures contract.
Last updated