0x7d249dd67d24…7d249dd3

ConfirmedInfrastructure679 vB100 sat/vB3 min decode

Polymarket's Rust Rewritten Nex Engine Hits 100,000 Commands Per Second in Sandbox

Polymarket has opened sandbox testing for Nex, a Rust-rewritten trading engine targeting 100,000 commands per second, with p99 order placement cut from 1.55 seconds to 3.76 milliseconds ahead of a mid-December launch decision.

Polymarket opens Nex sandbox with 10x trading capacity planned
WitnessPolymarket opens Nex sandbox with 10x trading capacity plannedPexels / pixabay

Outputs

  1. Polymarket opened sandbox testing for its Rust-rewritten Nex engine on Nov. 13, targeting 100,000 commands per second against the current CLOB's 10,000.

  2. P99 order placement fell from 1.55 seconds to 3.76 milliseconds, a roughly 412-fold internal improvement.

  3. Four weeks of shadow testing precede a conditional mid-December deployment decision.

  4. The rewritten WebSocket feed cut p99 write latency to 0.099 milliseconds from 44.5–88.1 milliseconds and may ship before Nex itself.

  5. Further optimizations begin in Q1 next year, targeting another fivefold cut in p95 and p99 timings.

Polymarket has opened sandbox testing for Nex, a prediction-market trading engine rewritten in Rust that the company says handles 100,000 commands per second, with a conditional production launch targeted for mid-December. Josh Stevens, Polymarket's vice president of engineering for DeFi, announced the sandbox on X on Nov. 13.

Nex spent the previous week running alongside the existing exchange in shadow mode, mirroring every production order so engineers can compare response times, stability under load, and matching accuracy against live trading. The exchange has not switched over. Stevens said the team plans four weeks of shadow operation before deciding whether to deploy.

What do the capacity numbers mean?

Polymarket's current central limit order book, or CLOB, handles 10,000 commands per second under steady load and 15,000 during short bursts. Nex supports 100,000 and 150,000 respectively, a tenfold increase. Commands cover actions such as placing and canceling orders; the figures do not describe completed trades per second.

Further optimization could push the system to 200,000 commands per second, with bursts of 250,000. More extensive changes to the underlying code could reach 1 million commands per second over the next year, though Stevens said that level was not yet needed.

The team began the rewrite in August after concluding the existing system needed to be rebuilt from scratch. Stevens described the old CLOB as having race conditions and inconsistent behavior, and said Nex was designed to produce consistent results. Startup time has fallen from five minutes to 15 seconds.

How much faster is order handling?

At the 99th percentile, order placement took 3.76 milliseconds on Nex against 1.55 seconds on the existing system, a roughly 412-fold improvement in the published comparison. Canceling orders fell from 627.92 milliseconds to 3.20 milliseconds, and canceling market orders dropped from 810.16 milliseconds to 5.14 milliseconds.

"The numbers below are internal exchange timings, not e2e," Stevens wrote, referring to end-to-end performance. He said those measurements would follow. The distinction matters: the published figures do not measure the full journey from a trader submitting an instruction to receiving the result.

At the 95th percentile, order placement fell from 341.84 milliseconds to 1.59 milliseconds. Cancels improved from 78.22 milliseconds to 1.58 milliseconds, and market-order cancels from 84.89 milliseconds to 2.27 milliseconds.

What changes for cancellations and data feeds?

The current CLOB acknowledges a request to cancel every open order before finishing the work in the background, a process that usually takes another 600 milliseconds to two seconds. Nex responds only after every order has actually been canceled, with a p99 completion time of 3.14 milliseconds against roughly 0.64 to 2.04 seconds for the existing system.

The rewritten Rust WebSocket service, which delivers order-book changes, prices and fills, recorded p99 write latency of 0.099 milliseconds, down from 44.5 to 88.1 milliseconds. Stevens noted that delayed feeds can leave traders quoting against stale prices. Because WebSocket improvements can be deployed separately from the exchange, the team may release them before Nex goes live.

What should market makers expect?

Nex introduces no breaking changes to requests or responses, according to Stevens. The sandbox lets market makers and builders compare the new system with the current CLOB and submit feedback before deployment.

The rewrite follows Polymarket's in-house indexing overhaul, covered by crypto.news in September, in which a Rust-based system surfaced some blockchain events up to 14 blocks, or roughly 28 seconds, faster, with Goldsky retained as backup. In October, Polymarket outlined separate protocol changes involving position tokens, collateral, and market resolution, setting Nov. 2 as a tentative transition date for newly created markets.

The announcement concerns Polymarket's international DeFi operation, which remains separate from its regulated U.S. venue. The team left some optimizations out of the initial release to accelerate delivery; Stevens said work on those begins in the first quarter of next year, targeting another fivefold reduction in p95 and p99 timings.

via crypto.news (Source)

More from Tom Whitfield

Tom Whitfield

Show full bio

News editor covering technology and product news in crypto and web3 industry at Mempool Brief.

1,021 articles