Open-source tool to detect Polymarket's incrementNonce() exploit (ghost fills)
u/Vanadium_Hydroxide ·
Reddit — r/algotrading
· February 22, 2026 at 00:03
· ⬆ 18 pts
· 💬 5 comments
| View on Reddit ↗
AI Summary
Summary
The post introduces "Nonce Guard," an open-source tool designed to protect algorithmic traders on the Polymarket prediction market from a specific exploit.
The author's thesis is that a vulnerability called incrementNonce() allows malicious actors to cancel their losing trades after they have already matched, creating "ghost fills" and causing losses for legitimate traders. The author's tool mitigates this risk.
Quality assessment: This is a technical announcement, not investment due diligence (DD). It describes a real, verifiable on-chain exploit and provides a software solution. The information is high-quality from a technical/risk management perspective but is not a market forecast.
Score18
Comments5
Upvote %92%
▶ Full Post Text
If you run bots on Polymarket's BTC 5-minute markets, you may have experienced 'ghost fills' — orders that match on the CLOB but never settle on-chain.
The exploit: bad actors call incrementNonce() on the CTF Exchange contract to invalidate their losing orders after matching. They keep only winning sides.
I built Nonce Guard — a free, open-source monitoring tool that:
- Watches Polygon blocks in real-time for incrementNonce() calls
- Builds exploiter address blacklists
- Emits universal alerts (file/socket/webhook) any bot can consume
- Includes counterparty checking
Repo: https://github.com/TheOneWhoBurns/polymarket-nonce-guard
MIT licensed. Works with any Polymarket bot.