Core margin quantities
These quantities appear throughout the platform’s risk checks.
The mark price (not the last trade price) is the risk input for notional, PnL, and liquidation checks. See Price Feeds and Mark Price Inputs.
Strategy leverage and shared constants
The baseline margin requirements come from the strategy’s leverage setting and two shared protocol constants.Initial margin admission rule
DerivaDEX checks initial margin on the post-execution strategy state. An order that opens or increases exposure is accepted only if the resultingOMF is at least the resulting IMF.
Maintenance margin and liquidation trigger
Once a strategy has open exposure, liquidation monitoring usesMF rather than OMF.
When each rule applies
The platform applies the same margin model differently depending on whether an order increases or reduces risk.Worked margin cases
These examples show the two thresholds in action, including a rejection where opposite-side resting orders still leave a larger absolute exposure in one direction.Size-scaling threshold
The square-rootIMF_FACTOR term matters only once a position is large enough to exceed the base leverage floor.