DAppFL: Just-in-Time Fault Localization for Decentralized Applications in Web3
Open Access
- 11 September 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 137-148
Abstract
Web3 describes an idea for the next evolution of the Internet, where blockchain technology enables the Internet of Value. As Web3 software, decentralized applications (DApps) have emerged in recent years. There exists a natural link between DApps and cryptocurrencies, where faults in DApps could directly lead to monetary losses associated with cryptocurrencies. Hence, efficient fault localization technology is of paramount importance for urgent DApp rescue operations and the mitigation of financial losses. However, fault localization methods applied in traditional applications are not well-suited for this specific field, due to their inability to identify DApp-specific fault features, e.g., a substantial amount of cryptocurrency is transferred from DApps to hackers. In order to explore the root cause of DApp faults, some researchers try to identify suspicious code snippets through mutation testing. Nonetheless, applying mutation testing for DApp fault localization is time-consuming and thus limited in practice. This paper conducts the first comprehensive study of DApp fault localization. We introduce DAppFL, a learning-based DApp fault localization tool that performs reverse engineering to gather executed source code and then trace cryptocurrency flow to assist in locating faulty functions. We also present the inaugural dataset for DApp fault localization, providing a new benchmark for this domain.Our experimental results demonstrate that DAppFL locates 63% of faults within the Top-5, 23% more than the state-of-the-art method. To facilitate further research, our code and dataset are freely available online: https://github.com/xplanet-sysu/awesome-works#dappfl.Keywords
Funding Information
- National Key Research and Development Program of China (2022YFB2703204)
- National Natural Science Foundation of China (62372485, 62332004)
- Natural Science Foundation of Guangdong Province (2023A1515011314)
- Shanghai Committee of Science and Technology, China (23511101000)
This publication has 33 references indexed in Scilit:
- DeFiWarder: Protecting DeFi Apps from Token Leaking Vulnerabilities2023
- Demystifying Exploitable Bugs in Smart Contracts2023
- Evaluating the Impact of Experimental Assumptions in Automated Fault Localization2023
- Fault Localization with Code Coverage Representation Learning2021
- XBlock-ETH: Extracting and Exploring Blockchain Data From EthereumIEEE Open Journal of the Computer Society, 2020
- MuSC: A Tool for Mutation Testing of Ethereum Smart Contract2019
- Practical Mutation Testing for Smart Contracts2019
- Focal Loss for Dense Object Detection2017
- Ask the Mutants: Mutating Faulty Programs for Fault Localization2014
- Metallaxis‐FL: mutation‐based fault localizationSoftware Testing, Verification and Reliability, 2013