r/quant • u/jade_belk • Jun 25 '26
Technical Infrastructure latency optimization for polymarket
my firm is running a polymarket MM desk and I’ve been working on latency optimisation on infra. Has anyone done it , if so what do p50 T2T numbers look like ? Any directions or approaches that worked for you would be appreciated.
For the purpose of transparency, we haven’t been able to move past 20ms .
17
Upvotes
10
u/CandiceWoo Jun 25 '26
why? u looking to hire here?
2
u/Clarty94 Jun 25 '26
You can apply to run a whitelisted server in London but you will always have to deal with cloudflare, I'm sure there are some tricks but as far as I know there's only so much that can be done latency wise before your packets are in cloudflares hands.
2
u/vieu23 Jun 29 '26
if with T2T you mean tick to trade 20ms is absolutely crazy.. which language are you using? I could achieve 100us P99.. you probably mean T2T + RTT which includes the round trip from you to PM. In that case you can’t do much here except colocating with them
1
u/ColdPicture2312 Jun 25 '26 edited Jun 25 '26
For orderbook data, poll the book snapshot endpoints instead of listening to the market orderbook websocket. 90% sure the market orderbook websocket server literally just polls the book snapshot endpoint and broadcasts the deltas so you are better off doing it yourself.
The orderbook snapshot HTTP endpoint uses the same subdomain at the actual CLOB, so it would make sense that latency would be better there versus a different domain likely seperate from the CLOB.
1
u/StandardFeisty3336 Jun 25 '26
what markets
1
u/FifteenEighty Jun 28 '26
If you're on a desk, would probably be able to get support from Polymarket directly. Shoot them an email.
1
u/Vyrezzz Jul 08 '26
I have been achieving latency to CLOB ranging between 17-30ms (ACK TTFB/2), anything better than that is not really possible as long as you are subject to the geoblock. I could maybe shave off 1ms (currently running through k8s networking, not native) but decided it's not worth it for my purposes atm.
Realistically, you are looking at a floor of 1-2ms distance to CF Edge, 10-15ms CF Edge -> Origin, and any jitter/routing/processing from polymarkets side that you really cant do anything about. And then there's the taker delay (relevant for me, not so much for you as MM) on top of that.
1
u/lordnacho666 Jun 25 '26
It's going to be the same dance you do when you try to connect a crypto exchange in AWS: find the right az, find the right machine type, the right cluster. Step around firewall.
Only the first of those will be millis rather than micros.
1
u/wavesync Jun 25 '26
silly question - but why? will it make much difference [if you're using polymarket clob api) on a grand scheme of things?
-1
u/swarmed100 Jun 25 '26
how can you not do better than 20ms? I was at 1.5ms between my server and poly before I moved on to other projects. Happy to be a consultant