Skip to main content
The MarginEngine computes margin for the whole subaccount. It adds up what your collateral is worth and subtracts what your positions require. The result is your surplus.
There is one surplus for initial margin (IM) and one for maintenance margin (MM).

Position requirement

Each futures position requires a share of its notional at the mark, which moves with the price:
Requirements are gross. A long in one series does not offset a short in another.

Collateral value

  • USDC counts at par.
  • cNGN counts at cNGN held × index × 0.5. The 0.5 is cNGN’s base margin factor.
  • Pending variation margin is USDC, and counts at par whether it is owed to you or by you.

Depeg penalty

While cNGN trades below its depeg threshold, the MarginEngine adds a penalty to the IM rate:
The penalty applies to initial margin only. The threshold and factor are set on chain.

Worked example

You hold 2,000 USDC and no cNGN, and buy 4 contracts of cNGN-30NOV26 with the mark at 0.00072. Notional is 4 × 1,000,000 × 0.00072 = 2,880 USDC. Fees and variation margin change the cash side as you trade, and the requirement moves with the mark. At 25% IM, leverage on cNGN-30NOV26 is capped at 4x.

Reducing risk

A trade that only reduces a futures position is held to maintenance margin, not initial. You can always deleverage while your MM surplus is positive.

Pre-trade margin check

Before each futures fill, the matcher estimates each account’s IM surplus after the fill. Only fills that add risk are checked.
  • If an account comes up short, its order is held back for 30 seconds.
  • After three refusals, at least a minute apart from the first, the order is cancelled with cancel_reason: "insufficient_margin".
The estimate is deliberately generous. The MarginEngine on chain is the authority.