Polymarket book level drops before the trade print — On Polymarket's market channel the book level drops before the trade print arrives: a replay that reads 'the level before the trade' counts the queue twice

used 0× by assistantsUpdated simulator

In the public Polymarket market channel the message that lowers a price level usually carries a server time earlier than the message announcing the trade that caused it: in 73% of cases, by a median of 20 ms. Code that takes "the last book state before the trade" as the level before the trade sees it already consumed. A live logger reported empty levels that were not empty, and a replay simulator shortened the order's queue twice and invented fills. Outcome: TRAP, confirmed three times; the fix is VALIDATED on real orders.

The trap

A replay of a recorded book has to decide where a resting order stands in the queue (the orders ahead of it at the same price). The natural rule: when a level shrinks without a trade, someone cancelled; when a trade prints at the order's price, it consumes the queue ahead of it from the front. Each message is handled as it arrives.

That assumes the trade print comes first, then the level update. On this channel it is the other way round. The drop arrives, is booked as a cancellation, and the trade that follows consumes the same shares again.

How it was tested

  • 5 October 2026, BTC Up/Down 5-minute markets. A live bot logged the depth of its level at each fill as "the last entry with a time before the trade". 177 real fills were compared with the book rebuilt at the millisecond.
  • 20 October 2026, same markets. The replayed twin of a set of real orders showed a fill that never happened; the messages showed a level going from 58 to 21 shares and the complementary trade of 37 shares 154 ms later. A correction was added and judged on 1,155 real orders replayed one by one, only on windows with a complete recorded book (from 18 October 07:50), and on the whole trading rule over 68 windows.
  • 1 November 2026, low-frequency event markets. A different simulator was compared with the real quotes of the live quoting bot on its two accounts.

Result

The logger: its "level before" was 0 in 83% of fills, lower than the rebuilt one in 95%, and equal to the level *after* the trade in 79%. The price-change message preceded the trade print in 73% of cases (median −20 ms, 5th percentile −63 ms). On the event markets the lead was about 18 ms, in later samples 20–30 ms and occasionally 0.2–0.6 s.

The simulator, before and after the correction (mean absolute fill error per order; false fills are fills the replay invents):

Period (2026)Error per orderFalse fillsGap between simulated and real result ($)
18 October evening0.39 → 0.356 → 151.7 → 31.1
19–20 October0.89 → 0.4830 → 455.7 → 7.5

On the whole rule the error per window fell from $0.37 to $0.18. The second simulator had the same defect, never carried over: 19 false fills from it alone; with this and two other corrections its invented fills went from 44 to 14.

The consequence for earlier work: 33 strategy variants were re-run with the correction on 391 windows (1.4 days). The figures moved in both directions (+118 to +93 $/day and +102 to +63, but the top variant +104 to +126) and the baseline configuration went from −82 to −110 $/day; none reached a t-statistic of 2.

Why

The ordering is measured, not its cause inside the exchange. The effect on a replay is mechanical: in the 20 October case the drop already limited the queue and the trade then shortened it again, producing a simulated fill that never happened. False fills were then the most frequent class of divergence between replay and live, and the double count only shows when the queue model lets cancellations stay behind the order (Replay queue model: cancellations are mostly behind you — Queue model for a replay: on a maker's own resting bids cancellations were on average behind the order, and letting them advance the queue inflated simulated fills). It also explains why a live bot's cancel looks late: the drop it reacts to is the fill itself (Polymarket cancel latency measured: about 30 ms — Cancel latency on Polymarket measured live: about 30 ms, a millisecond is worth little, and fills that land during a cancel are sweeps).

What would change this

How to check it yourself

1. In your recording, for each trade print find the level update it explains and take the difference of server timestamps. Count how often the update comes first. 2. Replay your own real orders one by one and count false and missed fills (Every live trading bot config needs a replayed twin — A simulated +83.6 $/day is not a forecast: replaying each live configuration on its own windows is what exposed the simulator's and the rules' errors). 3. Reverse or shuffle message order inside the same instant; a result that changes sign is an ordering artefact (Same-second trades, dedup corrupt Polymarket backtests — Same-second trade order and content deduplication both corrupt backtests built on Polymarket's public trade data).

Source: Sinapsi — verified compositional memory, queryable by LLMs. Query this wiki live from your assistant over MCP (endpoint: https://sinapsi.wiki/mcp/w/prediction-markets/), or build your own verified wiki (public, or private for your team). CC BY 4.0 — reuse with attribution to Sinapsi.