[Paper Review] Combatting Front-Running in Smart Contracts: Attack Mining, Benchmark Construction and Vulnerability Detector Evaluation
This paper presents a comprehensive study on front-running vulnerabilities in Ethereum smart contracts. It introduces an attack mining algorithm to detect real-world front-running incidents, uses dynamic taint analysis to localize vulnerable code, constructs a benchmark of 513 real attacks across 235 contracts, and evaluates seven state-of-the-art detection tools—revealing a low recall of ≤6.04% and identifying key limitations in existing tools.
Front-running attacks have been a major concern on the blockchain. Attackers launch front-running attacks by inserting additional transactions before upcoming victim transactions to manipulate victim transaction executions and make profits. Recent studies have shown that front-running attacks are prevalent on the Ethereum blockchain and have caused millions of US dollars loss. Vulnerable smart contracts, blockchain programs invoked by transactions, are held responsible for front-running attacks. Although techniques to detect front-running vulnerabilities have been proposed, their performance on real-world vulnerable contracts is unclear. There is no large-scale benchmark based on real attacks to evaluate their capabilities. This motivates us to build a benchmark consisting of 513 real-world attacks with vulnerable code labeled in 235 distinct smart contracts. We propose automated techniques to effectively collect real-world attacks and localize the corresponding vulnerable code at scale. Our experiments show that our approaches are effective, achieving higher recall in finding real attacks and higher precision in pinpointing vulnerabilities compared to the existing techniques. The evaluation of seven state-of-the-art vulnerability detection techniques on the benchmark reveals their inadequacy in detecting front-running vulnerabilities, with a low recall of at most 6.04%. Our further analysis identifies four common limitations in existing techniques: lack of support for inter-contract analysis, inefficient constraint solving for cryptographic operations, improper vulnerability patterns, and lack of token support.
Motivation & Objective
- To address the lack of large-scale, real-world benchmarks for evaluating front-running vulnerability detection in smart contracts.
- To develop an effective algorithm for mining real front-running attacks from blockchain history with higher recall than prior work.
- To localize vulnerable code segments in smart contracts using dynamic taint analysis to improve precision in vulnerability detection.
- To empirically evaluate the performance of seven state-of-the-art vulnerability detection tools on a real-world benchmark, exposing their limitations.
- To identify and analyze the root causes of poor detection performance in existing tools, particularly in inter-contract analysis, cryptographic operations, and token handling.
Proposed method
- An automated attack mining algorithm is designed to analyze transaction sequences in Ethereum blocks, identifying front-running patterns by detecting transactions that precede and profit from victim transactions.
- Dynamic taint analysis is applied to the mined attack traces to propagate trust and data flow from transaction inputs to contract function calls, enabling precise localization of vulnerable code snippets.
- A benchmark of 513 real front-running attacks is constructed, with 235 distinct smart contracts annotated to include the exact vulnerable code segments responsible for the attacks.
- The benchmark is used to evaluate seven state-of-the-art vulnerability detection tools, with results analyzed for precision, recall, and false positive rates.
- Manual validation by three experienced researchers ensures the ground truth of attack and vulnerability labels, using objective criteria and consensus-based review.
- A systematic analysis of detection failures identifies four core limitations: lack of inter-contract analysis, inefficient handling of cryptographic operations, incorrect vulnerability patterns, and poor token support.
Experimental results
Research questions
- RQ1How effective is the proposed attack mining algorithm in detecting real-world front-running attacks compared to prior work?
- RQ2To what extent can dynamic taint analysis localize vulnerable code segments in smart contracts with high precision?
- RQ3How comprehensive and representative is the proposed benchmark of real front-running vulnerabilities across Ethereum smart contracts?
- RQ4What is the actual recall and precision of existing state-of-the-art vulnerability detection tools when evaluated on real-world attacks?
- RQ5What are the primary technical limitations in current tools that lead to poor detection performance on front-running vulnerabilities?
Key findings
- The proposed attack mining algorithm achieves higher recall than prior work, successfully identifying more real front-running attacks in Ethereum's blockchain history.
- The dynamic taint analysis-based localization method achieves higher precision in pinpointing vulnerable code segments compared to baseline techniques.
- The benchmark contains 513 real front-running attacks across 235 distinct smart contracts, with all vulnerabilities confirmed as true positives through manual validation.
- The empirical evaluation reveals that existing vulnerability detection tools have a maximum recall of only 6.04% on the benchmark, indicating severe underperformance.
- The study identifies four key limitations in current tools: lack of inter-contract analysis, inefficient constraint solving for cryptographic operations, incorrect vulnerability patterns, and insufficient support for ERC20 tokens.
- Most reported vulnerabilities by existing tools are false positives, with 23 out of 24 functions reported as vulnerable by at least two tools being manually confirmed as non-vulnerable due to view functions, restricted access, or isolated state access.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.