TL;DR
The matching engine is the invisible referee that pairs buyers with sellers. It enforces price-time priority, ensuring the best price always fills first and, among equal prices, the earliest order goes first.
Key Points
✓Most prediction market exchanges use price-time priority (FIFO): the best-priced order fills first; ties go to the order that arrived earliest.
✓The matching engine continuously compares incoming orders against the [[order-book]] and executes trades in microseconds when prices cross.
✓Order types like [[limit-order]] and [[market-order]] are interpreted and routed by the matching engine before reaching the book.
✓A [[market-order]] is matched immediately at the best available price; an unmatched [[limit-order]] is queued in the book until a counterparty arrives.
✓The throughput and latency of the matching engine directly affect [[slippage]] and the fairness of [[order-fill]] sequences during high-volume periods.
How Price-Time Priority Works
The standard matching algorithm used by Kalshi and most CFTC-regulated exchanges is price-time priority, also called first-in-first-out (FIFO). Among all resting orders on the same side of the Order Book, the matching engine selects the best price first. A buy order at 64 cents beats one at 63 cents. When multiple orders share the same price, the one submitted earliest is filled first. This means that queue position has real economic value in active markets: traders who post Limit Order quotes early at a given price level get filled before later arrivals at the same level. The matching engine maintains an in-memory sorted data structure, typically a price-level tree with per-level FIFO queues, to execute these rankings in microseconds.
Role in Prediction Market Infrastructure
On a CFTC-Regulated Exchange like Kalshi, the matching engine is the legally regulated component that must treat all participants fairly and maintain an auditable trade record. Every Order Fill event is timestamped and logged, enabling post-trade surveillance and Dispute Resolution. The engine also enforces Tick Size constraints, rejecting orders placed at prices that are not valid multiples of the minimum increment. High-performance matching engines process orders in under ten microseconds, which matters less on slower-moving prediction markets than on equity or futures exchanges, but still affects latency-sensitive strategies. On Polymarket and other on-chain venues, the matching function is partially replaced by Automated Market Maker smart contracts, which execute trades deterministically according to a pricing formula rather than by pairing individual orders.
Sources & References
Last updated: June 25, 2026
Related Terms
More in Market Mechanics
Find the best odds on every market
Compare live prices across Kalshi, Polymarket, and more — spot arbitrage and trade the sharpest line on any event.
Compare Markets