Smart Contract Fuzzing Towards Profitable Vulnerabilities

Ziqiao Kong, Cen Zhang, Maoyi Xie, Ming Hu, Yue Xue, Ye Liu, Haijun Wang, Yang LiuProc. ACM Softw. Eng 2025

Introduction

In the rapidly evolving landscape of Decentralized Finance (DeFi), the security of smart contracts is paramount. A single logic flaw can lead to catastrophic financial losses, often totaling millions of dollars. While automated security tools like smart contract fuzzers have become standard in the auditing process, traditional approaches often fall short in the context of complex DeFi protocols. This paper introduces Verite, a novel profit-centric fuzzer designed to bridge the gap between simple bug detection and the realization of maximum financial impact.

The Limitations of Code-Centric Fuzzing

Existing smart contract fuzzers, such as ItyFuzz or Echidna, are primarily code-centric. Their primary metric for success is code coverage—the ability to trigger as many unique lines of code or branches as possible. However, the most devastating DeFi vulnerabilities, such as price manipulation or flawed business logic, do not necessarily require unusual code paths. Instead, they trigger unusual fund flows within otherwise standard execution paths.

Furthermore, traditional tools typically stop once a "Proof of Concept" (PoC) is generated. This leaves an "exploitation gap," requiring human analysts to manually tune transaction parameters to determine the actual value at risk. Verite addresses these limitations by treating profit as the primary signal for both detecting and optimizing exploits.

Methodology: The Verite Architecture

Verite differentiates itself from standard grey-box fuzzers through three core components that shift the focus from code execution to financial outcomes.

1. Action-Based Mutators

Standard fuzzers often struggle with the high dimensionality of smart contract APIs, frequently generating sequences of transactions that revert due to missing dependencies (e.g., attempting a swap without a prior approve() call). Verite introduces "DeFi Actions"—semantic groupings of API calls that represent logical operations like a "Uniswap Swap." By operating at this higher level of abstraction, the fuzzer can explore complex fund flow spaces more efficiently and reduce the noise of invalid transactions.

2. Profitability Recognition

Rather than relying solely on assertions or crashes, Verite monitors the blockchain state for "abnormal" fund flow properties. It identifies a transaction sequence as a "Proof-of-Profit" (PoP) candidate if it detects:

  • Net positive profit for the attacker.
  • Significant imbalances in liquidity pools.
  • Unconditional token gains or burns.

3. SGD-Based Profit Maximizer

Once a profitable sequence is identified, Verite treats the potential profit as a mathematical function $f(x)$, where $x$ represents transaction parameters such as amounts or repeat counts. It employs a variant of Stochastic Gradient Descent (SGD) to iteratively tune these parameters. This allows the tool to search for the global maximum profit a vulnerability can yield, often finding more efficient exploit paths than those discovered by human attackers.

Experimental Evaluation

The authors evaluated Verite using an expanded version of the ItyFuzz dataset, comprising 61 real-world DeFi projects on Ethereum and Binance Smart Chain (BSC) that had previously suffered exploits. These projects represented a combined historical loss of over $67 million.

Key Results

  • Superior Detection: Verite successfully generated exploits for 29 targets, nearly triple the 10 targets identified by the state-of-the-art fuzzer, ItyFuzz.
  • Massive Profit Gains: Across the dataset, Verite extracted over $18 million. In cases where both fuzzers were successful, Verite’s optimized exploits yielded an average of 134 times more profit than those generated by ItyFuzz.
  • Outperforming Human Attackers: In 12 instances, Verite’s automated optimization found exploit parameters that were more profitable than the original real-world attacks, with gains ranging from 1.01x to 11.45x the original stolen amount.

Real-World Impact and Zero-Day Discoveries

Beyond historical benchmarks, Verite demonstrated its efficacy in active environments. During auditing contests on the Secure3 platform, the tool discovered 6 zero-day vulnerabilities, 5 of which were classified as high severity. These findings earned the authors over $2,500 in bounties, proving that a profit-centric approach is highly effective for identifying critical flaws in live protocols.

Limitations and Future Work

While Verite represents a significant advancement, it faces certain challenges common to fuzzing technology. It can struggle with "magic numbers" or complex byte-array decoding that might require symbolic execution to resolve. Additionally, the tool currently relies on a set of 10 predefined DeFi actions.

Future iterations of Verite may explore the use of Large Language Models (LLMs) to automatically synthesize new actions from contract source code. This would allow the tool to adapt more dynamically to exotic or newly launched DeFi protocols without manual intervention.

Conclusion

Verite demonstrates that in the domain of DeFi, "money moving where it shouldn't" is a more reliable bug oracle than code coverage. By bridging the semantic gap with action-based mutation and employing gradient-based optimization, Verite transforms smart contract fuzzing from a code-testing exercise into a powerful tool for financial risk assessment and vulnerability discovery.

Summary updated

BibTeX
@inproceedings{kong2025smart,
  author = {Ziqiao Kong and Cen Zhang and Maoyi Xie and Ming Hu and Yue Xue and Ye Liu and Haijun Wang and Yang Liu},
  title = {{Smart Contract Fuzzing Towards Profitable Vulnerabilities}},
  booktitle = {Proc. ACM Softw. Eng},
  year = {2025},
}
Figure