Isolated by default
The vault is the maker on every parlay. Under isolated accounting the book is charged the sum of per-parlay maker collateral, and the relayer’s quoting capacity check is simply:max(A, B), not A + B.
Cross-margin secured credit
In cross mode (an admin-toggled relayer setting) the engine computes the book’s true worst case and extends the difference back as quoting capacity:- Conflict graph. Two parlays conflict iff they can never both win: opposite sides of the same market, or YES on two different markets in the same HL question group. Only structural impossibility counts; no correlation estimate, however high, creates credit.
- Worst-case liability = the max-weight set of parlays that can co-win (max-weight independent set, weight = collateral). Solved exactly per conflict component up to 22 nodes; larger components fall back to the conservative sum.
- Secured credit =
(isolated - worstCase) * (1 - haircut). Default haircut 20% (creditHaircutBps = 2000). - Effective locked =
isolated - securedCredit, which is what the utilization check charges:
The margin block in a quote
Every QuoteResponse carries a margin field:
nullunder isolated accounting (the default) or when no NAV-relative cap is active.- Under cross mode, a transparency object showing how capacity was charged for this quote:
Post-trade book charge under isolated accounting (raw USDC).
Post-trade charge actually applied under cross accounting.
Netting benefit extended back as capacity, after the haircut.
Whether the worst case was solved exactly (false = a large conflict component fell back to the conservative sum).
{"mode": "cross", "degraded": true} and isolated accounting stays in force; capacity tightens, never loosens.
GET /margin
The public transparency endpoint returns both accounting modes side by side, whichever one is live. The client wraps it asclient.margin(detail?), typed as MarginState:

