Blockchain prediction markets vulnerable to trade failures and attacks

Ghost-Filled Orders: Detecting and Testing Atomicity Violations in Non-Custodial Prediction Markets

Cryptography and Security

Summary

Blockchain prediction markets let users keep their own money but use offchain order books to manage trades. The authors found that a time delay between accepting trades offchain and finalizing them on the blockchain lets bad actors cancel trades that don’t favor them after seeing market changes. This causes trades that look successful at first to fail later, leading to financial losses. They studied the problem on Polymarket and three other platforms, discovering that all have similar weaknesses and one even allows attackers to profit directly.

What this means in practice

  • For blockchain developers: Detect and measure atomicity violations to improve crypto trading platform designs preventing failed trades after offchain order acceptance.
  • For decentralized finance teams: Test other blockchain-based prediction markets to identify vulnerabilities allowing trade cancellations or attacker profits during settlement delays.

Authors

Zhiyang Chen, Fan Long, Zhendong Su

Abstract

Blockchain based prediction markets combine offchain order management with onchain settlement. This architecture supports user controlled custody, since users keep funds in wallets or smart contracts while submitting signed orders to an offchain order book. However, it creates an atomicity gap. An order may be valid when accepted or matched offchain, but become invalid before the corresponding onchain settlement transaction is executed. This behavior, often called ghost filled orders by the community, can cause trades that appear filled offchain to fail onchain. This paper studies this atomicity gap through a case study of Polymarket. We show how the delay between offchain order acceptance and onchain settlement allows adversaries to invalidate unfavorable orders after observing market outcomes or price movements. We then quantify the scale and financial impact of this behavior over a nine-month period from August 12, 2025, to May 22, 2026, using 1.8 million reverted transactions involving Polymarket official smart contracts. Our analysis separates attacker profit from market and user loss, and develops conservative measurement rules to avoid overclaiming impact. We further develop a methodology for testing other blockchain based prediction markets and apply it to three additional markets. We find that all three are vulnerable to the same class of attack, and that one design enables direct attacker profit. We have reported the findings to all three projects; one project had acknowledged the issue at the time of the study.