Trade flow and busts
How trades move from order submission to on-chain settlement, and when they can be reversed.
Paradex is a hybrid system where the matching engine runs in the cloud and the chain independently validates each trade. If a matched trade fails on-chain validation, it results in a trade bust.
Trade flow
Order submission
The cloud matching engine checks whether the order would cause the account to exceed the Initial Margin Requirement, considering the full portfolio (collateral, positions, and orders) and market data (oracle prices, funding rates). Orders that violate the requirement are rejected. See Order Risk Check for details.
Trade busts
A trade bust occurs when the chain rejects a trade that was already matched off-chain. The off-chain account data is then reverted to undo the impact of the invalid trade.
Paradex continuously works to minimize trade bust occurrences through tighter alignment between off-chain and on-chain risk checks.
Why busts happen
- Rounding differences. The cloud and chain use different rounding logic in their margin checks. These small numerical differences can cause a trade to fail on-chain, especially for orders trading close to the margin boundary.
- Counterparty failure. A trade involves two parties. Even if your account passes risk checks, the trade can bust if the counterparty’s account fails on-chain margin validation.
- Reduce-only conflicts. An order marked as
reduce_onlycan bust when other order events (fills or cancellations) occur between matching and on-chain settlement, making thereduce_onlyconstraint unsatisfiable.
What happens during a bust
- The chain rejects the fill.
- Off-chain balances and positions are reverted.
- Affected orders return to their pre-trade state.
Cascading busts
When a bust occurs, other trades from the same account may already be inflight to the chain. Since the chain is the source of truth, the cloud’s risk checks for those inflight trades were based on assumptions that no longer reflect the actual on-chain state. This can cause a series of consecutive busts for the same account.
Account resync
Resync is a self-recovery mechanism on the platform. When the system detects a trade bust due to mismatch between the off-chain and on-chain state of an account, it automatically places the account into RESYNC mode. Resync synchronizes the off-chain state with the on-chain state to stop new busts from being generated. Trades already inflight to the chain will still bust since they were submitted before the resync began.