1. Understanding Account Margins (Numerators & Dollar Values)
A critical technical detail of the Nord API is that the https://zo-mainnet.n1.xyz/account/{accountId} endpoint returns numerators for the account margins, representing actual USDC dollar values . In contrast to the official margining docs, this structure is used because all margin requirements for a user share a common denominator, the Position Open Notional (PON) which is omitted to show absolute risk values in dollar format.
API Margin Values
tv (Token Value)
-
Formula:
-
Description: The discounted dollar value of all positive asset balances (spot assets).
mf (Account Value / av)
-
Formula:
-
Description: Total net account equity, accounting for assets, liabilities, and unrealized PnL.
pon (Position Open Notional)
-
Formula:
-
Description: The total weighted risk of the account, including both open positions and pending orders.
pn (Position Notional)
-
Formula:
-
Description: A subset of
ponrepresenting the weighted dollar value of open positions only.
imf (Initial Margin Fraction)
-
Formula:
-
Description: The total dollar amount required to be maintained in order to open new positions.
omf (Open Margin Fraction)
-
Formula:
-
Description: The effective equity value used by the system to check against the initial margin requirement.
cmf (Cancel Margin Fraction)
-
Formula: where is (perp) or (spot).
-
Description: The dollar threshold below which the system will begin canceling open orders.
mmf (Maintenance Margin Fraction)
-
Formula: where is (perp) or (spot).
-
Description: The minimum dollar equity required to avoid liquidation of open positions.
2. Leverage & The Risk Engine
It is important to distinguish between the front-end user interface and the back-end risk engine regarding leverage.
-
Front-end Leverage Slider: This works solely as a risk-management tool for the user. It allows you to artificially limit your exposure, but it does not change the underlying margin requirements of the exchange.
-
Back-end Risk Engine: The engine always operates under the assumption of the Maximum Leverage allowed for a specific market.
- Example: If Bitcoin (BTC) allows 50x leverage (0.02 IMF), and you open a 100 of margin. However, the risk engine calculates you are only using $20 of margin ($1000 * 0.02$). The front-end will artificially limit the maximum order value you can open even if the risk engine allows for more.
-
Liquidation Prices: This logic explains why your liquidation price does not change when you adjust the leverage slider. The risk engine calculates your liquidation point based on the maximum possible leverage to ensure the safety of the protocol, regardless of the front-end leverage you have set.
3. Liquidation & Cancellation Rules
When an account becomes unhealthy, Nord triggers specific actions in a strict sequence to reduce risk.
-
Order Cancellation (
omf < cmf): If your account value (omf) drops below thecmfthreshold, the system cancels open orders that would increase your position size. This happens before position liquidation to restore health without closing active trades. -
Position Liquidation (
mf < mmf): If the account value (mf) drops below themmfthreshold, the exchange begins reducing your positions. -
Bankruptcy (
mf <= 0): If account value becomes negative, the account is cleared by the insurance fund. -
Execution: All liquidation orders are Fill-or-Kill (FoK), meaning they are executed immediately or cancelled.
4. Margin Definitions for Markets
The thresholds for imf, cmf, and mmf are derived from the risk profile of each market at https://zo-mainnet.n1.xyz/info (Note that in contrast to the account margin, the margin information here actually shows the decimal value for the market itself, not dollar value).
-
Initial Margin (IMF): The primary representative of maximum leverage. For example, a 0.02 IMF is equal to 50x leverage.
-
Maintenance Margin (MMF): Typically set at half of the IMF (e.g., if IMF is 0.02, MMF is 0.01).
-
Cancel Margin (CMF): For perpetuals, this is defined as 5/8 of the IMF.
5. Funding Accumulation
Funding at Nord follows an accumulation model for maximum efficiency.
-
Accumulation Frequency: Funding is not paid out every hour; instead, it is accumulated every hour based on the current funding rates.
-
Lazy Settlement: This accumulated value is tracked via a global Funding Index.
-
Realization: Payments are only settled and reflected in your actual balance when your position is updated, such as through a trade.
-
Risk Calculation: If a position is untouched, funding continues to accumulate as unsettled funding. This unsettled amount is still factored into your
omfandmfto ensure accurate risk monitoring.
6. Primary Formulas
Max Available to Trade
To find the maximum notional value you can open on a specific market () as allowed by the risk engine (considering cross-margining):
-
: Operational Margin Factor (the minimum of your total Account Value and weighted Token Value).
-
: Your current total initial margin requirement numerator.
-
: The specific initial margin rate for the asset.
Liquidation Price
Calculates the distance from the current index price where will equal .
For Longs:
For Shorts:
-
: Your dollar cushion before reaching the liquidation threshold.
-
: Position sensitivity. The factor accounts for the “double-squeeze”: as price moves against you, your account value drops and your required maintenance margin increases.