V2E: Validating Smart Contract Vulnerabilities through Profit-driven Exploit Generation and Execution

Jingwen Zhang, Yuhong Nan, Kaiwen Ning, Mingxi Ye, Wei Li, Yuming Xiao, Yuming Feng, Weizhe Zhang, Zibin Zheng

TL;DR

V2E is an automated framework that validates whether reported smart contract vulnerabilities are truly exploitable by generating and executing Proof-of-Concept (PoC) exploits. By evaluating both whether a bug can be triggered and whether it yields an actual financial profit for an attacker, V2E successfully filters out the false alarms that frequently overwhelm blockchain developers and auditors.

What Problem Does This Paper Address?

Smart contracts manage billions of dollars in digital assets, making them prime targets for attackers. While the security community has developed numerous vulnerability detection tools (such as static analyzers and fuzzers), these tools suffer from notoriously high false-positive rates. They typically flag code based on predefined, rigid patterns without understanding the broader execution context.

Consequently, developers and auditors are flooded with security alerts that are not actually exploitable in the real world. A bug might be harmless because the vulnerable code path can never be triggered under realistic conditions, or because it fails to cause any tangible financial damage. For instance, as shown in the motivating example below, a reentrancy bug that is highly profitable in older Solidity versions becomes unexploitable in Solidity 0.8+ due to built-in underflow protection.

Fig. 2. Motivating example. Even for the same vulnerability, different compile versions lead to different exploitability.

Methods

V2E automates the validation process through a three-stage pipeline that combines program analysis with Large Language Models (LLMs):

Fig. 4. The detailed workflow of V2E.
  1. Vulnerability Path Guided PoC Synthesis: Instead of asking an LLM to blindly generate an exploit, V2E uses fine-grained static analysis to map out potential exploit paths (focusing on state read-write dependencies and access control). It strips away irrelevant code and feeds only the essential context to the LLM to generate a Foundry-based test script.
  2. Trigger and Profit-Driven PoC Effectiveness Analysis: V2E executes the generated PoC inside a customized Ethereum Virtual Machine (EVM). It checks the execution trace against specific "trigger rules" for five common vulnerability types (e.g., checking for nested calls in Reentrancy). Crucially, it tracks balance changes across native tokens, ERC-20 tokens, and NFTs, using an LLM to verify if the attacker actually walked away with a financial profit.
  3. Feedback-Driven PoC Refinement: If a PoC fails to execute, V2E uses EVM source mapping to pinpoint the exact line of code (like a failed require statement) that caused the revert and asks the LLM to fix it. If the PoC executes successfully but fails to generate profit, V2E applies predefined "primitive operations" (such as swapping transaction orders or altering function arguments) to iteratively optimize the exploit.

Datasets

The authors evaluated V2E using a benchmark of 264 vulnerable contracts curated from the widely recognized SmartBugs dataset:

  • $D_{manual}$ (64 contracts): Manually constructed vulnerable smart contracts.
  • $D_{onchain}$ (200 contracts): Real-world contracts deployed on-chain.

To establish a ground truth, two smart contract auditing experts independently reviewed all 264 contracts to annotate their actual exploitability, bringing in a third expert to resolve any disagreements.

Key Insights and Ideas

  • Exploitability $\neq$ Vulnerability: The core philosophy of V2E is that a bug is only critical if it is both triggerable and profitable. Shifting the validation metric to financial gain aligns automated testing with actual attacker motivations.
  • The Power of Localized Context: LLMs frequently hallucinate or fail when fed entire codebases. V2E bypasses this limitation by using traditional static analysis to isolate the exact state-modifying functions needed for an exploit, minimizing the LLM's cognitive load.
  • Bytecode-to-Source Feedback Loop: When an exploit fails, raw EVM bytecode errors are useless to an LLM. V2E’s use of compiler source-mappings to translate EVM execution failures back into human-readable Solidity statements is what makes its iterative refinement loop highly effective.

Key Results

V2E significantly outperformed LLM-only baselines and state-of-the-art multi-agent frameworks:

  • High Accuracy: V2E successfully identified 102 out of 124 truly exploitable vulnerabilities, achieving a precision of 91.9% and a recall of 82.3%.
  • False Positive Elimination: It correctly filtered out 71 out of 140 false alarms (50.7%).
  • Boosting Existing Tools: When used as a post-processing validation step, V2E reduced the false positive rates of popular tools drastically: Slither by 76.9%, Mythril by 56.9%, and Confuzzius by 65%.
  • Cost Efficiency: The average API cost to validate a single vulnerability was just $0.71 USD, making it highly practical for commercial deployment.

Limitations and Future Work

Despite its success, V2E has a few limitations:

  • Source Code Dependency: V2E requires contract source code for its static analysis and source-mapping phases; it cannot currently validate bytecode-only contracts.
  • Token Price Blindness: V2E assumes a 1:1 exchange rate for tokens during profit analysis because it lacks real-time market price feeds, which occasionally leads to incorrect profit estimations.
  • Mathematical Reasoning Limits: Because LLMs struggle with complex math, V2E can fail to generate precise inputs when an exploit path requires solving complex cryptographic hashes or intricate arithmetic conditions.

Future Directions: The authors plan to integrate external constraint solvers to handle complex arithmetic, automate the creation of trigger rules for more vulnerability types, and pull on-chain DeFi data to dynamically calculate token exchange rates.

Summary updated

BibTeX
@article{zhang2026v,
  author = {Jingwen Zhang and Yuhong Nan and Kaiwen Ning and Mingxi Ye and Wei Li and Yuming Xiao and Yuming Feng and Weizhe Zhang and Zibin Zheng},
  title = {{V2E: Validating Smart Contract Vulnerabilities through Profit-driven Exploit Generation and Execution}},
  journal = {Proc. ACM Softw. Eng.},
  year = {2026},
  doi = {10.1145/3808108},
}
Figure