Skip to main content

Pre-trade validation

ValidationContract
Product validitySymbol must be supported
Open-order capMax open orders enforced per strategy per product (20 default builds, 10 with alpha1)
Tick-size and minimum-size checksPrice/amount multiple checks enforced
Order type validityLimit/market compatibility checks
Notional capMax notional constraint enforced before sequencing
Price-deviation checksExplicitly priced orders are checked during sequencing; market orders skip the sequencer deviation check and are bounded later during matching by product max_taker_price_deviation
Collateral sufficiencyRequired before sequencing
Margin invariantPost-execution OMF >= IMF must hold

Use this page when

If you need…Use this page because…
the public safety-control mapit gathers the main validation, execution, liquidation, and guarantee layers in one factual reference
to distinguish what rejects a request from what unwinds unsafe live stateit separates pre-trade, matching, liquidation, and ADL contracts explicitly
the factual baseline behind trader, governance, and troubleshooting safety claimsthis is the core reference anchor for those routes

Matching behavior

BehaviorContract
Priority modelPrice-time priority (FIFO at each price level)
Book sortingBids descending, asks ascending
Fill amountmin(maker_amount, taker_amount)
Fill priceMaker price
Partial fillsSupported; residual handling depends on order type

Execution safeties

SafetyContract
Price bandingWhen no explicit taker limit exists, matching derives a mark-price-relative band from max_taker_price_deviation; explicit limit orders stop first at their taker price
Self-trade preventionSame-trader crossing is prevented; remaining inbound size is canceled
Sequencing safeguardsValidation before sequence assignment
Insolvency handlingInsolvent maker orders are removed; insolvent taker residuals are canceled
Residual cancel at guard edgeAny unmatched remainder beyond the effective taker-deviation guard is canceled rather than matched outside the safety band

Stressed-path execution notes

CasePublic reading
taker solvency clampa taker can be partially clamped by solvency guards before the remaining size is processed
insolvent maker remaindermaker liquidity can be canceled out of the book when it cannot remain solvent through the trade path
liquidation taker reuseliquidation-specific matching paths can preserve remaining maker liquidity differently from ordinary taker flows
liquidation queue priorityliquidation orders are processed ahead of ordinary matching flow once an account enters liquidation handling

Liquidation and ADL

StageContract
TriggerMargin fraction below MMR_FRACTION / max_leverage (default 0.15 / 3 = 5%)
Initial actionPending orders canceled and account enters liquidation queue
Normal pathMatch liquidation flow against available book liquidity inside price limits
Bankruptcy referenceBankruptcy price is used to compute liquidation spread
Insurance-fund interactionPositive spread credits the fund; negative spread debits the fund
ADL pathUsed when liquidity, price-band, insurance-fund constraints, or min-order-size rounding prevent normal liquidation completion
ADL execution priceADL trades execute at the liquidated user’s bankruptcy price
Insurance-fund shortfall triggerIf projected liquidation loss would exceed the remaining insurance-fund capacity, the unresolved shortfall moves into the ADL path
ADL counterparty selectionOpposing positions are ranked by unrealized profit and closed starting from the most profitable

System guarantees

GuaranteeContract
Deterministic executionSame ordered inputs yield consistent outcomes across operators
Front-running preventionOrders stay encrypted until sequencing inside the TEE boundary
State commitmentState transitions are committed with cryptographic proofs and checkpointing

What this page does not replace

NeedUse instead
exact maintenance-threshold formulas and margin factorsMargin Requirements
mark-price construction and price-input sourcesPrice Feeds and Mark Price Inputs
exact error classes and recovery postureError Reference
step-by-step operational responseHow to Handle Liquidations and Margin Calls or How to Handle API Errors and Recovery

Boundary rule

Treat this page as the factual safety-control reference. It tells you what protections exist, not how to execute recovery steps or why the whole system is architected this way.
Last modified on April 12, 2026