What Crypto Exchanges Get Wrong About Matching Engine Design

By Dejan Jelovic | Published September 28, 2026

If your exchange is scaling past its matching engine capacity, BridgeIQ can review your architecture to ensure deterministic, high-throughput trading before outages occur.

Most crypto exchanges build their matching engine like a web application first and a trading system second — and it shows the first time volume spikes. The mistakes are rarely exotic: they're the same order-book and concurrency problems traditional exchanges solved decades ago, rediscovered the hard way.

The web-app mindset that breaks under trading load

A web application is built to handle requests independently of one another and scale horizontally by simply adding more servers behind a load balancer — that model works because most web requests don't depend on strict ordering relative to each other, and two users loading a page at the same moment don't need their requests processed in any particular sequence relative to one another. A matching engine has to maintain a single, consistent order book that every incoming order interacts with in a strict sequence, because the whole point of price-time priority is that order matters; you can't just add more servers and shard your way out of that requirement without fundamentally changing what “correct matching” even means for that instrument, since two servers processing the same instrument independently would immediately create two conflicting versions of the order book.

Teams that come from web engineering backgrounds, which describes a large share of crypto exchange teams given the industry's roots, often architect for the scaling problem they already know how to solve — stateless horizontal scaling — rather than the fundamentally different, stateful, strictly-ordered problem an order book actually presents, and the mismatch usually doesn't surface until volume is high enough to expose it.

What traditional matching engines get right

Deterministic ordering is the foundational property — replaying the exact same sequence of incoming events should always produce the exact same resulting order book state, every time, which is essential both for disaster recovery, since it means a crashed engine can be reconstructed exactly from its event log, and for being able to reconstruct and audit exactly what happened during any given trading session when a client or regulator asks. Careful handling of partial fills matters just as much, so that a large order being filled across multiple smaller counter-orders never gets double-counted, never loses track of remaining size, and never leaves the book in an inconsistent state where the sum of visible liquidity doesn't match reality.

And a matching algorithm that's been stress-tested at volumes far beyond what a new exchange expects to see on day one, because volume spikes — the exact moment a fragile matching design is most likely to fail — are also exactly when correctness matters most and when the cost of a bug, in terms of both money and reputation, is highest, since a matching failure during a volatile market affects every participant trading at that moment simultaneously.

OTC and RFQ flows: the part crypto platforms usually bolt on late

Order-book matching handles continuous, smaller-size trading well, but large trades often need a request-for-quote or over-the-counter style negotiation instead, since dropping a large order straight into a public order book can move the price against the trader before it even fills, a problem commonly called market impact or slippage. That's a genuinely different flow, with different latency expectations — an RFQ negotiation can reasonably take seconds rather than needing sub-millisecond response — and different privacy requirements around who can see the order before it's executed, since an OTC counterparty typically doesn't want their large order visible to the broader market before it's filled.

Exchanges that design the order book first, launch on it, and add OTC support later as a separate initiative usually end up with two systems that don't share risk calculation or settlement logic cleanly — two sources of truth about a client's exposure that have to be manually reconciled — which becomes a reconciliation problem precisely at the volume and trade size where getting it wrong matters most, since OTC trades tend to be the largest and most consequential ones on the platform.

What a matching engine built for trading actually needs

Not just uptime, which is the metric most engineering teams default to monitoring because it's easy to measure and easy to put on a status page, but correctness under concurrency specifically — a guarantee that the same order is never matched twice against two different counter-orders, that no fill is ever silently dropped during a race condition, and that the system degrades predictably and visibly under load instead of failing in ways nobody can reproduce afterward in a post-mortem, which is a far more dangerous failure mode than an outright crash because it can go undetected for hours. That's a narrower, harder engineering problem than most exchanges budget for when they first scope the build, because it doesn't show up as a missing feature in a product spec that a reviewer would notice was absent — it shows up as an incident, usually during the highest-volume day the exchange has ever had, which is also the worst possible day for it to happen and the day it's most likely to happen given how these failure modes tend to be volume-triggered.

What a stress test for a crypto matching engine should include

A sustained-load test comes first: running the engine at a steady order rate well above anything the exchange has seen in production, for long enough to surface any slow degradation that wouldn't show up in a brief burst — memory that isn't being cleaned up properly, a queue that grows slowly until it eventually causes problems. A burst test follows, simulating the kind of sudden spike that happens during a genuinely volatile market, since sustained-load and burst-load expose different classes of bugs and passing one doesn't guarantee passing the other.

A partial-fill reconciliation test specifically constructs scenarios with large orders filling against many small counter-orders simultaneously and verifies the resulting book state is exactly what it should be, down to the last unit of size, not just approximately correct. And a chaos or failover test deliberately kills a component mid-operation — during an active match, during a partial fill — and verifies the recovery process produces a correct, consistent book state rather than a plausible-looking but subtly wrong one, since a matching engine's worst failures are the ones that look fine on the surface and are actually corrupted underneath.

Sharing infrastructure without sharing risk

The mistake isn't building separate order-book and OTC flows — that separation is often correct, given how different the two workflows genuinely are. The mistake is letting them diverge all the way down to risk calculation and settlement, so the exchange ends up with two independent, disconnected views of the same client's total exposure. A better pattern keeps the matching logic separate, since order-book matching and RFQ negotiation genuinely are different problems, but routes both through a shared risk and position layer underneath, so a client's exposure from an order-book fill and an OTC trade update the same account state rather than two parallel ones that need manual reconciliation.

That shared layer becomes the single source of truth for exposure regardless of which flow generated a given trade, which is the piece crypto exchanges most often skip when OTC support gets added as a bolt-on feature under time pressure rather than designed in from the start alongside the order book.

.