Nyx: Detecting Exploitable Front-Running Vulnerabilities in Smart Contracts
Wuqi Zhang, Zhuo Zhang, Qingkai Shi, Lu Liu, Lili Wei, Yepang Liu, Xiangyu Zhang, Shing-Chi Cheung
Abstract
Smart contracts are susceptible to front-running attacks, in which malicious users leverage prior knowledge of upcoming transactions to execute attack transactions in advance and benefit their own portfolios. Existing contract analysis techniques raise a number of false positives and false negatives in that they simplistically treat data races in a contract as front-running vulnerabilities and can only analyze contracts in isolation. In this work, we formalize the definition of exploitable front-running vulnerabilities based on previous empirical studies on historical attacks, and present Nyx, a novel static analyzer to detect them. Nyx features a Datalog-based preprocessing procedure that efficiently and soundly prunes a large part of the search space, followed by a symbolic validation engine that precisely locates vulnerabilities with an SMT solver. We evaluate Nyx using a large dataset that comprises 513 real-world front-running attacks in smart contracts. Compared to six state-of-the-art techniques, Nyx surpasses them by 32.64%-90.19% in terms of recall and 2.89%-70.89% in terms of precision. Nyx has also identified four zero-days in real-world smart contracts.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers9
- An Empirical Study of Proxy Contracts at the Ethereum Ecosystem ScaleMengya Zhang, Preksha Shukla, Wuqi Zhang, Zhuo Zhang et al.ICSE 2025 · 5 citations
- Smartreco: Detecting Read-Only Reentrancy via Fine-Grained Cross-DApp AnalysisJingwen Zhang, Zibin Zheng, Yuhong Nan, Mingxi Ye et al.ICSE 2025 · 4 citations
- OpDiffer: LLM-Assisted Opcode-Level Differential Testing of Ethereum Virtual MachineJie Ma, Ningyu He, Jinwen Xi, Mingzhe Xing et al.ISSTA 2025 · 2 citations
- NESA: Relational Neuro-Symbolic Static Program AnalysisChengpeng Wang, Yifei Gao, Wuqi Zhang, Xuwei Liu et al.FSE 2026 · 1 citation
- Chord: Towards a Unified Detection of Blockchain Transaction Parallelism BugsYuanhang Zhou, Zhen Yan, Yuanliang Chen, Fuchen Ma et al.ICSE 2025 · 1 citation
Builds on12
- Making Smart Contracts SmarterLoi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena et al.CCS 2016 · 2,306 citations
- Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais et al.CCS 2018 · 1,108 citations
- Empirical review of automated analysis tools on 47, 587 Ethereum smart contractsThomas Durieux, João F. Ferreira, Rui Abreu, Pedro CruzICSE 2020 · 373 citations
- Quantifying Blockchain Extractable Value: How dark is the forest?Kaihua Qin, Liyi Zhou, Arthur GervaisS&P 2022 · 336 citations
- High-Frequency Trading on Decentralized On-Chain ExchangesLiyi Zhou, Kaihua Qin, Christof Ferreira Torres, Duc Viet Le et al.S&P 2021 · 243 citations
Related papers
- On Identifying Sound Conditions for Frontrunning ResistanceSebastian Holler, Anna Piscitelli, Jannik Albrecht, Stephan Dübler et al.CCS 2026
- SmarTest: Effectively Hunting Vulnerable Transaction Sequences in Smart Contracts through Language Model-Guided Symbolic ExecutionSunbeom So, Seongjoon Hong, Hakjoo OhUSENIX Security 2021 · 118 citations
- Surviving in Dark Forest: Towards Evading the Attacks from Front-Running Bots in Application LayerZuchao Ma, Muhui Jiang, Feng Luo, Xiapu Luo et al.USENIX Security 2025
- AdvSCanner: Generating Adversarial Smart Contracts to Exploit Reentrancy Vulnerabilities Using LLM and Static AnalysisYin Wu, Xiaofei Xie, Chenyang Peng, Dijun Liu et al.ASE 2024 · 9 citations
- Your Exploit is Mine: Instantly Synthesizing Counterattack Smart ContractZhuo Zhang, Zhiqiang Lin, Marcelo Morales, Xiangyu Zhang et al.USENIX Security 2023
