
Head of Dev Tooling - DeFi @Polymarket
Joined December 2009
- Tweets210
- Following267
- Followers313
- Likes514
Cesare retweeted
At the end of August, I said our Polymarket DeFi CLOB couldn't be saved, and we were rewriting it from scratch in Rust 🦀
Today I'm excited to announce Nex, our new exchange built from the ground up.
We've been sprinting on it since August. A Nex instance has been running in shadow mode on production traffic for the last week, side by side with the current exchange. It mirrors every order the current exchange gets, so we can measure latency, stability under load, and validate matching correctness against live production flow.
The numbers below are internal exchange timings, not e2e (those are coming soon), but we wanted to show how big the difference is.
p99 current CLOB → Nex:
- Place order: 1.55s → 3.76ms (412x faster)
- Cancel orders: 627.92ms → 3.20ms (196x faster)
- Cancel market orders: 810.16ms → 5.14ms (158x faster)
- Cancel all*:
↳ Response (current CLOB) vs complete (Nex): 35.70ms → 3.14ms (11x faster)
↳ Full cancel all: ~636ms-2.04s → 3.14ms (~200-650x faster)
p95 current CLOB → Nex:
- Place order: 341.84ms → 1.59ms (215x faster)
- Cancel orders: 78.22ms → 1.58ms (50x faster)
- Cancel market orders: 84.89ms → 2.27ms (37x faster)
- Cancel all*:
↳ Response (current CLOB) vs complete (Nex): 6.20ms → 1.58ms (4x faster)
↳ Full cancel all: ~606ms-2.01s → 1.58ms (~380-1,270x faster)
*Cancel all: the current CLOB responds immediately and cancels in the background, so when you get the response, your orders aren't cancelled yet. Nex responds only after everything is actually cancelled. Full cancel all on the current CLOB depends on how many orders you have, but it usually adds another 600ms-2s.
We also rewrote our WebSockets in Rust. This is the feed you see the market through: book changes, price moves, your fills. Fall behind it, and you're trading on old prices, and your quotes get picked off.
- Write latency p99: 44.5-88.1ms → 0.099ms (~449-889x faster)
- Slow readers/sec: 48.7-75.6 → 0.01 (~4,870-7,560x fewer, basically 0)
Scale: The current CLOB in stable state can handle 10k commands/s with 15k bursts → Nex can handle 100k commands/s with 150k bursts. 10x more, and with a few optimisations we can get to 200k commands/s with 250k bursts; with more low-level core changes, we can get to 1M commands/s over the next year. Not needed yet, but the headroom is there.
Startup time: 5 mins → 15s (20x faster)
The old CLOB had many race conditions and wasn't deterministic. Nex is deterministic by design and removes the race conditions in the old CLOB.
We also skipped some easy wins for launch to get this out faster that could make p95 and p99 another 5x faster, and we'll start work on that in Q1 next year to keep pushing these numbers down.
We wanted to build this without any breaking changes for MMs or builders; Nex has no breaking changes to requests or responses, so we just need to swap out the binary on our side and it will go live.
We want everyone to be on this journey with us, with the ability to relay feedback and test it against the existing CLOB, so we've opened a Nex Sandbox. Fill out the form and test it yourself: docs.polymarket.com/nex
We'll run 4 weeks of shadow mode on production traffic to make sure everything is perfect, then if everything is good, we will go live mid-December. We can roll out WebSocket improvements without the full exchange, so we may do that sooner.
We've been rebuilding every system around the exchange for months, and we've seen huge benefits, but the exchange is the heart of Polymarket DeFi. Nex fixes most of the pain traders have had.
Really proud of the team on this one.
Make Polymarket fast, finally. It's coming.
Honest post: the Polymarket DeFi CLOB is full of tech debt. It grew fast, got hacked together, and most of the team inherited it that way. Since joining and building out the team, we have scaled it 10x and made it 3x faster, but it’s not enough; the core foundations of how it’s been built are wrong in almost every way. You try to fix one thing, and another thing goes wrong; the conclusion now is that the codebase can’t be saved long-term.
The exchange is the heart of Polymarket; everything runs through it. If we want to be the best exchange in the world, it must be fast, stable, and scalable. We can’t keep patching the old one, where these core foundations are generally missing throughout, so we’re rewriting it from scratch in Rust.
Early numbers: 10-20x faster on p99 than today, 200,000 orders per second (15x what we have now, with room to reach 400,000+), and stability under load. This will put us faster than most exchanges, including CEXs.
Building it in Rust gives us memory safety with no garbage collector. No GC means no random pauses and no random latency spikes; the tail latency in the benchmarks is the tail latency you get in production, alongside a strict compiler that enforces correctness up front. Data races and memory corruption (the bugs that take exchanges down) can’t exist in the first place.
Polymarket has to take it seriously that we are an exchange; this is people’s money, not a joke. To succeed, we have to fix this; otherwise, we will fail. It’s as simple as that. I joined to build the best software in the world, not to maintain some of the worst, and I will do everything I can to make Polymarket a serious exchange.
We are aiming to have the exchange ready sometime in Q4 (mid to end). I'll communicate progress as we go so you all know the status. Breaking changes will be minimal for all integrators and will be communicated in advance. We will maintain the existing CLOB and keep trying to improve it as we build this side by side. We can’t wait to throw away the existing CLOB; we dislike it as much as you all do.
Make Polymarket fast, finally.
Cesare retweeted
We know the website has been getting slow - as market creation exploded, the UI was flooding Gamma with API calls (it had no market paging 🤯). We've shipped a new internal gateway API built in Rust and rebuilt the pages from scratch on top of it, now serving combos (8x faster) and sports (4x faster). Next up, we're working on the event, esports, categories, and home pages to make them load instantly, too. The website will keep getting faster every week. You all deserve a website that feels instant.
Left is before (no cache), and right is after (now live)
Cesare retweeted
One of our complaints from traders: the UI optimised orders for speed, not correctness. Some flows updated positions before the exchange responded, then corrected them later if the order was partially filled or failed, but this caused late updates, incorrect states, and failed sells. Now that our indexing and data API is much more performant, we changed this so that market buys and sells wait for the trade response; fills, partial fills, rejections and errors show immediately. This also improves correctness and sell success rate, making it safer and better to trade.
Cesare retweeted
We have built our Polymarket indexing systems in-house, powered by rindexer in Rust. We now see onchain data events up to 14 blocks (28 seconds) faster, and we index within 0-10ms of block broadcasting, making it nearly instant. This means trades, positions, and balances will update much faster. We will use Goldsky as a data backup, but we now primarily run on our own indexing infrastructure.
Cesare retweeted
We just shipped a major rewrite of our developer docs.
Clearer integration guides, unified SDK documentation, practical API examples, and a much better path from first request to production.
We would love to hear what you think. docs.polymarket.com
Cesare retweeted
Replying to @Polymarket
@Polymarket is launching combos soon. Take a look at our new docs, and happy quoting!
Docs: docs.polymarket.com/market-m…
Quoter Telegram: t.me/+7j9GsyNe7jBiOGMx
Cesare retweeted
I am absolutely more productive using agents. I don't know the factor but it's large. However much of that productivity is spent tuning the agents and hardening the product. I'm guessing 30%-40%.
Some might consider that a waste; but I don't. The software I'm creating nowadays is vastly more robust than I'd ever been able to create manually.
I don't mean that the code is better. I mean the surrounding tests are vastly better. I have a higher degree of confidence than I ever had manually -- even when I used very disciplined TDD and Acceptance testing.
And then there's the ability to quickly reorganize the modules and the architecture while keeping those robust tests running. That is a tremendous boon.
Cesare retweeted
No polymarket or UMA contracts have been exploited. All user funds are safe, and using Polymarket.com is safe, so business as usual.
We had a 6-year-old private key that was compromised. This was in the internal top-up config, which is why funds were being sent to it. We have rotated this key, revoked all prod permissions and are moving all PKs to KMS keys from now on.
Cesare retweeted
What a day, but on a more positive note, we did a release this morning, and the latency on the CLOB is now 500% better. You should see a huge difference. Thanks for waiting for the fix. It was a hard one because it was at the lowest level of the services. We have many other fixes coming in the next weeks to take this down even further.
Cesare retweeted
Introducing the unified TypeScript and Python SDKs, now in beta.
One consistent surface for Polymarket discovery, market data, trading, account data, and realtime streams.
Python ships with both async and sync clients, so you can choose the model that fits your app.
Docs: docs.polymarket.com/dev-tool…
Coming soon: unified API, Rust SDK, and React SDK.
Our goal is to build the best developer tooling for Polymarket integrations.
Feedback welcome: drop it in the discord dev channel, reply here, or DM me.
Cesare retweeted
Much of Polymarket's core trading infrastructure was built years ago and is now being rearchitected to handle today's scale. ClobV2 with deposit wallet was the top non-negotiable priority because it's what prevents ghost fills the added latency you've seen since v2 mostly comes from new order and wallet validation infrastructure. With that protection in place, reducing latency to the fastest we ever had it is now our single biggest focus.
Over the next two weeks we have a series of releases dedicated to bringing latency down. Broadly, they target:
- Rewriting one of the slowest internal steps in the order flow.
- Smarter handling of activity bursts, aiming at reducing backed-up queues.
- Reworking the order book and its data flow. The single biggest latency reduction in the plan.
The first release in this series went live today. Expect the next latency releases toward the end of this week and next week.
Cesare retweeted
Temp Check for the Aave Will Win proposal has passed. This brings Aave Labs closer to a fully token-centric model, directing 100% of product revenue to the $AAVE token.
Next step: refine the proposal with structural improvements for the ARFC stage based on community feedback.
Aave will win.
This was the last missing piece.
Introducing Custom Tables for rindexer 🦀
Production indexers. Zero code. Just YAML.
Events? YAML.
Contract calls? YAML.
Cron jobs? YAML.
Filters? YAML.
Computed values? YAML.
Aggregations? YAML.
DB schema? YAML.
Schema migrations? YAML.
Cross-chain state? YAML.
GraphQL API? YAML.
Track token balances, NFT ownership, DEX pools, lending protocols — anything on any EVM chain.
Docs - rindexer.xyz/docs/start-buil…
Cesare retweeted
HMRC has published its consultation outcome in the UK regarding the taxation of DeFi activities related to lending and staking.
A particularly interesting conclusion is that when users deposit assets into Aave, the deposit itself is not treated as a disposal for capital gains tax purposes, creating a ‘no gain, no loss’ (NGNL) approach.
This is a major win for UK DeFi users who want to borrow stablecoins against their crypto collateral.
I’m proud that our team at Aave Labs participated in the consultation, advocating for DeFi and ensuring that the tax treatment of interactions with lending protocols reflects the economic reality: users are not intending to dispose of their assets when borrowing against their collateral for liquidity needs.
We’re fully supportive of this approach and hope to see these changes reflected in UK tax legislation soon.
More details: gov.uk/government/consultati…
Cesare retweeted
We’ve launched a developer toolkit that enables the fastest and safest way to integrate @aave.
Choose your market based on your risk profile, and use vaults to access billions in liquidity with just a few lines of code, while capturing fees.
Cesare retweeted
Introducing the Aave V3 developer toolkit.
A new SDK, React hooks, and API let you connect to Aave markets and deploy vaults in minutes.













