Skip to main content

Core margin invariants

InvariantContract
Pre-trade margin enforcementPost-execution strategy state must satisfy OMF >= IMF
Continuous solvency checksMaker and taker solvency verified before and during fills
Liquidation trigger modelMargin fraction monitored against maintenance threshold

Use this page when

If you need…Use this page because…
the public baseline for margin invariants and liquidation thresholdsit is the canonical formula/threshold reference
to distinguish initial-margin safety from maintenance liquidation triggersit separates those concepts into explicit invariants and threshold parameters
the exact public reading of OMF, IMF, and MMR termsit keeps those factors in one factual carrier

Thresholds and factors

ParameterValue
MMR_FRACTION constant0.15
Maintenance threshold formulaMMR = MMR_FRACTION / max_leverage
Default-example maintenance threshold0.15 / 3 = 5%
IMF_FACTOR constant0.0004

Formula summary

QuantityPublic reading
MFmargin fraction used for liquidation monitoring: Total Strategy Value / Total Position Notional
Total Strategy Valuedeposited collateral plus unrealized PnL for the strategy
OMFopen-margin fraction derived from strategy value or margin over total open position notional
IMFweighted initial-margin fraction derived from open-position notional and the larger of base leverage margin or the IMF_FACTOR * sqrt(open size) term
Maintenance thresholdMMR_FRACTION / max_leverage

Edge behavior

Edge casePublic reading
reducing ordersorders that only reduce existing exposure can improve solvency and are treated differently from exposure-increasing orders
no-position or empty-liquidity edgesolvency helpers have special edge semantics in source rather than behaving like an ordinary non-zero position state
default valuesthe public constants are baseline examples and should not be overread as timeless deployment law

Reading notes

TopicPublic reading
MF versus OMFMF is the liquidation-monitoring ratio, while OMF is the exposure-aware initial-margin safety ratio checked against IMF for post-execution admissibility
OMF >= IMFpost-execution initial-margin safety invariant
maintenance thresholdseparate liquidation trigger derived from MMR_FRACTION / max_leverage
default 5% examplepublic default example, not a promise that every deployment will always use identical leverage posture

Liquidation entry behavior

When margin fraction drops below the computed maintenance threshold for the strategy:
  1. Account enters liquidation queue.
  2. Pending orders are canceled.
  3. Normal liquidation path is attempted first.
  4. ADL path is used when normal path cannot resolve risk safely.

What this page does not replace

NeedUse instead
the broader safety-control mapTrading Safeties and Guards
mark-price inputs and deviation contextPrice Feeds and Mark Price Inputs
the step-by-step response workflowHow to Handle Liquidations and Margin Calls

Boundary rule

This page is the formula and threshold reference. Use it for exact margin terminology and trigger math, not as the full rationale or the operational playbook.
Last modified on April 13, 2026