Definitions
Risk values are denominated in USD. USDC is the quote and settlement asset.
Position size
The signed number of contracts in a perpetual futures market. A long position has a positive position size, and a short position has a negative position size.
Fill size
The signed number of contracts exchanged when orders are matched. A buy has a positive fill size, and a sell has a negative fill size.
Iverson bracket
We sometimes use the Iverson bracket , where if is true, and otherwise. This simplifies notation in various places.
Tokens
Assets such as USDC and ETH held in an account. Positive token balances can contribute collateral; negative balances represent borrows.
Weight
A number in defining the contribution of this token to the overall account value. The weight accounts for factors such as volatility and liquidity.
For example, suppose BTC has weight 0.9 and USD price 1000 USD/BTC. If
a user deposits 1 BTC, then their account value increases by
0.9 * 1 BTC * 1000 USD/BTC = 900 USD.
Position notional (PN)
The position notional is the value of a user's position. For perpetual markets, it is defined as:
Because PN measures risk, it uses the upper-bound index price to conservatively maximize exposure.
Position open notional (PON)
The position open notional is the maximum position notional achievable by filling the user's open orders. It limits how much risk a user can take through open orders.
For perpetual markets, it is defined as:
Because PON measures risk, it uses the upper-bound index price to conservatively maximize exposure.
Token value (TV)
The USD value of an account's positive token balances after applying token weights and conservative index prices. TV represents the account's collateral value.
Account value (AV)
The account value is computed by summing the unrealized profit and loss (PnL) of the user's positions, token balances, and borrows. Unrealized PnL has not yet been reflected in the user's balances by closing the position. PnL is realized when a position is closed.
To compute this, let be the price at which the position was opened, corresponding to its purchase or sale price. In practice, a user's position may have been opened by purchasing or selling contracts at different prices. To simplify implementation, it is sufficient to reweight the open price accordingly. For example, suppose a user purchases 5 contracts at price 20 and 10 contracts at price 30. Then:
To value positions conservatively, Nord uses the upper-bound index price for shorts and the lower-bound index price for longs. The open price must be reweighted after each fill for both makers and takers. Because position size is negative for short positions, unrealized PnL is:
TV is the total value of the user's weighted positive token balances. Because TV represents positive collateral value, it uses the lower-bound index price.
Positive token balances are weighted, while negative balances are treated as borrows without a collateral weight. Account value also includes unsettled funding payments.
Equivalently:
AV is denominated in USD. TV corresponds to the user's collateral, whereas AV also discounts borrows and includes current PnL. This ensures that borrows are capped by collateral.
Profit and loss (PnL)
The change in a position's value. Unrealized PnL is the value change of an open position; realized PnL is reflected in the account balance when exposure is closed.
Margin fraction (MF)
Account value divided by current position notional. MF measures the health of current positions.
Open margin fraction (OMF)
The smaller of account value and token value, divided by position open notional. OMF measures account health after accounting for open orders.
Initial margin fraction (IMF)
The minimum open margin required to open a position, increase exposure, or borrow assets.
Cancel margin fraction (CMF)
The open-margin threshold at which risk-increasing open orders become eligible for cancellation.
Maintenance margin fraction (MMF)
The margin threshold below which positions and borrows become eligible for liquidation.
Index price
An index price provided by an oracle is not a single scalar value. The oracle
aggregates prices for an asset and expresses the result as a median price Pm
and confidence interval C, such that the actual index price falls within the
[Pm-C, Pm+C] interval with 95% probability.
For more details, see Confidence intervals.
Risk computations use a conservative index price: they reduce positive values and increase negative values so that account health is not overestimated.
Different kinds of index price are marked as follows:
- Median index price:
- Lower-bound index price:
- Upper-bound index price:
Freeze
If the price update condition below is true, the market is frozen.
Let:
- be the previous price
- be the new price
- be the elapsed duration
- be the threshold rate
- be the confidence relaxation factor
- be the absolute price change
- be the previous confidence
- be the new confidence
- be the required confidence narrowing factor
is set as:
Then freeze if:
Outage
An oracle outage begins when no updated price has been received for one minute.
An update with the same price but a different timestamp is considered a valid update.
Mark price
The market-derived price used to measure a perpetual market's premium or discount relative to its index price.
Funding index
A per-market accumulator used to calculate funding owed or received since a position's last funding settlement.
Liquidator
A permissionless actor that initiates eligible liquidation actions.
Backstop
The designated account that takes distressed positions during backstop liquidation.
System account
The protocol-controlled account that receives system fees and records deficits produced during backstop liquidation.