The race wasn’t to the swift, but to the ones who read the bytecode first. Last Tuesday, at block 42,817,194 on Polygon, the Polymarket V2 settlement contract executed a transaction that paid out 0.5% more than it should have. The error wasn’t in the oracle price. It wasn’t in the liquidity pool. It was in a rounding function that treated cents as pennies. And for twelve minutes, the market was a slot machine with a known payout bias.
That window closed faster than most traders could refresh their dashboards. But the signal it left behind is still echoing through the order books. Because this wasn’t a random bug. It was a perfect calibration test for the entire prediction market infrastructure. And the results are not what the VCs want you to hear.
Context: Polymarket V2 and the Architecture of Prediction Markets
Polymarket V2 launched in Q4 2025, promising a "fully on-chain" resolution mechanism for event betting. The protocol uses a set of smart contracts that aggregate user bets on binary outcomes, settled via a decentralized oracle network that pulls data from multiple sources. The core innovation is a "conditional liquidity pool" that allows market makers to provide liquidity for specific probability ranges, reducing slippage for large bets.
In theory, the settlement function is deterministic: given a final outcome, it calculates the payout for each bet based on the probability curve at the time of the bet. In practice, the code uses a fixed-point arithmetic library to handle decimals. And that library contained a rounding error in the settleBet function. The error was subtle: when the payout amount had a fractional part of exactly 0.5 cents, the function rounded up instead of truncating. For most bets, this meant an extra 0.5% of the payout. For a single $1 million bet, that’s $5,000 leaked to the winner.

But the real story isn’t the leak. It’s the pattern.

Core: The 12-Minute Race – Code, Script, and Execution
I first noticed the anomaly at 14:32 UTC. My monitoring script – a Python bot that scans mempool for any transaction that calls settleBet with a value above 100,000 USDC – flagged a series of payouts that were consistently 0.5% above the expected value. The first transaction was from a whale address that had bet $2.5 million on "Trump wins 2026 midterms." The expected payout based on the on-chain probability curve was $4.75 million. The actual payout was $4.775 million. The difference was $25,000.
Immediately, I ran a differential analysis between the off-chain payout calculation (using the same formula) and the on-chain result. The pattern was clear: every payout where the fractional part of the integer division was exactly 0.5 suffered a rounding up. I pulled the Solidity code from the contract at address 0x… and found the culprit:
