Combatting Front-Running in Smart Contracts: Attack Mining, Benchmark Construction and Vulnerability Detector Evaluation

Wuqi Zhang, Lili Wei, Shing-Chi Cheung, Yepang Liu, Shuqing Li +2 more
12/23/2022
34 citations
cs.SE

Official code: Troublor/erebus-redgiant (27 stars, Go, CC0-1.0, last commit 2023-12-11).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

CC0-1.0

Smart contract front-running vulnerability benchmark

271Go, SolidityDec 28, 20222 years agoCC0-1.0
benchmarkblockchainethereumfront-runningsmart-contracts+1 more

Similar Papers

Cite this paper

@article{zhang2022combatting,
  title  = {Combatting Front-Running in Smart Contracts: Attack Mining, Benchmark Construction and Vulnerability Detector Evaluation},
  author = {Wuqi Zhang and Lili Wei and Shing-Chi Cheung and Yepang Liu and Shuqing Li and Lu Liu and Michael R. Lyu},
  year   = {2022},
  eprint = {2212.12110},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.12110}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2212.12110.svg)](https://codeofpaper.com/paper/2212.12110)

Discussion