Defining Smart Contract Defects on Ethereum
Top Cited Papers
- 20 April 2020
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Software Engineering
- Vol. 48 (1) , 327-345
Abstract
Smart contracts are programs running on a blockchain. They are immutable to change, and hence can not be patched for bugs once deployed. Thus it is critical to ensure they are bug-free and well-designed before deployment. A Contract defect is an error, flaw or fault in a smart contract that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. The detection of contract defects is a method to avoid potential bugs and improve the design of existing code. Since smart contracts contain numerous distinctive features, such as the gas system. decentralized , it is important to find smart contract specified defects. To fill this gap, we collected smart-contract-related posts from Ethereum StackExchange, as well as real-world smart contracts. We manually analyzed these posts and contracts; using them to define 20 kinds of contract defects . We categorized them into indicating potential security, availability, performance, maintainability and reusability problems. To validate if practitioners consider these contract as harmful, we created an online survey and received 138 responses from 32 different countries. Feedback showed these contract defects are harmful and removing them would improve the quality and robustness of smart contracts. We manually identified our defined contract defects in 587 real world smart contract and publicly released our dataset. Finally, we summarized 5 impacts caused by contract defects. These help developers better understand the symptoms of the defects and removal priority.Keywords
All Related Versions
Funding Information
- Australian Research Council (DE200100021)
- ARC Discovery Project Scheme (DP170101932)
- ARC Laureate Fellowship (FL190100035)
- Hong Kong RGC (152193/19E)
- National Natural Science Foundation of China (61872057)
- National Key Research and Development Program of China (2018YFB0804100)
This publication has 14 references indexed in Scilit:
- ContractFuzzer: fuzzing smart contracts for vulnerability detection2018
- ZEUS: Analyzing Safety of Smart Contracts2018
- Making Smart Contracts Smarter2016
- Belief & evidence in empirical software engineering2016
- An Exploratory Study of the Impact of Code Smells on Software Change-proneness2009
- Personal Opinion Surveys2008
- Java quality assurance by detecting code smells2003
- Refactoring: Improving the Design of Existing Code2002
- The effects of appeals, anonymity, and feedback on mail survey response patterns from salespeopleJournal of the Academy of Marketing Science, 1989
- A Coefficient of Agreement for Nominal ScalesEducational and Psychological Measurement, 1960