skip to main content
10.1145/3460319.3464837acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections

Empirical evaluation of smart contract testing: what is the best choice?

Published:11 July 2021Publication History

ABSTRACT

Security of smart contracts has attracted increasing attention in recent years. Many researchers have devoted themselves to devising testing tools for vulnerability detection. Each published tool has demonstrated its effectiveness through a series of evaluations on their own experimental scenarios. However, the inconsistency of evaluation settings such as different data sets or performance metrics, may result in biased conclusion.

In this paper, based on an empirical evaluation of widely used smart contract testing tools, we propose a unified standard to eliminate the bias in the assessment process. First, we collect 46,186 source-available smart contracts from four influential organizations. This comprehensive dataset is open to the public and involves different code characteristics, vulnerability patterns and application scenarios. Then we propose a 4-step evaluation process and summarize the difference among relevant work in these steps. We use nine representative tools to carry out extensive experiments. The results demonstrate that different choices of experimental settings could significantly affect tool performance and lead to misleading or even opposite conclusions. Finally, we generalize some problems of existing testing tools, and propose some possible directions for further improvement.

References

  1. Andrea Arcuri and Lionel Briand. 2011. A practical guide for using statistical tests to assess randomized algorithms in software engineering. In 2011 33rd International Conference on Software Engineering (ICSE). 1–10.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Roberto Baldoni, Emilio Coppa, Daniele Cono D’elia, Camil Demetrescu, and Irene Finocchi. 2018. A survey of symbolic execution techniques. ACM Computing Surveys (CSUR), 51, 3 (2018), 1–39.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Lexi Brent, Neville Grech, Sifis Lagouvardos, Bernhard Scholz, and Yannis Smaragdakis. 2020. Ethainter: a smart contract security analyzer for composite vulnerabilities. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation. 454–469.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Lexi Brent, Anton Jurisevic, Michael Kong, Eric Liu, Francois Gauthier, Vincent Gramoli, Ralph Holz, and Bernhard Scholz. 2018. Vandal: A scalable security analysis framework for smart contracts. arXiv preprint arXiv:1809.03981.Google ScholarGoogle Scholar
  5. Cristian Cadar, Patrice Godefroid, Sarfraz Khurshid, Corina S Pasareanu, Koushik Sen, Nikolai Tillmann, and Willem Visser. 2011. Symbolic execution for software testing in practice: preliminary assessment. In 2011 33rd International Conference on Software Engineering (ICSE). 1066–1071.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Jialiang Chang, Bo Gao, Hao Xiao, Jun Sun, Yan Cai, and Zijiang Yang. 2019. sCompile: Critical path identification and analysis for smart contracts. In International Conference on Formal Engineering Methods. 286–304.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Jiachi Chen, Xin Xia, David Lo, John Grundy, Xiapu Luo, and Ting Chen. 2020. DEFECTCHECKER: Automated Smart Contract Defect Detection by Analyzing EVM Bytecode. arxiv:2009.02663.Google ScholarGoogle Scholar
  8. Jiachi Chen, Xin Xia, David Lo, John Grundy, Xiapu Luo, and Ting Chen. 2020. Defining Smart Contract Defects on Ethereum. IEEE Transactions on Software Engineering.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ting Chen, Xiaoqi Li, Xiapu Luo, and Xiaosong Zhang. 2017. Under-optimized smart contracts devour your money. In 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER). 442–446.Google ScholarGoogle ScholarCross RefCross Ref
  10. Ting Chen, Zihao Li, Yufei Zhang, Xiapu Luo, Ting Wang, Teng Hu, Xiuzhuo Xiao, Dong Wang, Jin Huang, and Xiaosong Zhang. 2019. A large-scale empirical study on control flow identification of smart contracts. In 2019 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). 1–11.Google ScholarGoogle ScholarCross RefCross Ref
  11. ConsenSys. 2018. Mythril. https://github.com/ConsenSys/mythril-classicGoogle ScholarGoogle Scholar
  12. A Day and E Medvedev. 2019. Ethereum in BigQuery: a public dataset for smart contract analytics.Google ScholarGoogle Scholar
  13. B. Dolan-Gavitt, P. Hulin, E. Kirda, T. Leek, A. Mambretti, W. Robertson, F. Ulrich, and R. Whelan. 2016. LAVA: Large-Scale Automated Vulnerability Addition. In 2016 IEEE Symposium on Security and Privacy (SP). 110–121.Google ScholarGoogle Scholar
  14. Thomas Durieux, João F Ferreira, Rui Abreu, and Pedro Cruz. 2020. Empirical review of automated analysis tools on 47,587 Ethereum smart contracts. In Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering. 530–541.Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Etherscan. 2019. Etherscan. https://etherscan.io/Google ScholarGoogle Scholar
  16. J. Feist, G. Grieco, and A. Groce. 2019. Slither: A Static Analysis Framework for Smart Contracts. In 2019 IEEE/ACM 2nd International Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB). 8–15.Google ScholarGoogle Scholar
  17. Asem Ghaleb and Karthik Pattabiraman. 2020. How Effective Are Smart Contract Analysis Tools? Evaluating Smart Contract Static Analysis Tools Using Bug Injection. In Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2020). Association for Computing Machinery, New York, NY, USA. 415–427. isbn:9781450380089 https://doi.org/10.1145/3395363.3397385 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Google. 2018. Fuzzer Test Suite. https://github.com/google/fuzzer-test-suiteGoogle ScholarGoogle Scholar
  19. Rahul Gopinath, Carlos Jensen, and Alex Groce. 2014. Code coverage for suite evaluation by developers. In Proceedings of the 36th International Conference on Software Engineering. 72–82.Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Neville Grech, Lexi Brent, Bernhard Scholz, and Yannis Smaragdakis. 2019. Gigahorse: thorough, declarative decompilation of smart contracts. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE). 1176–1186.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Neville Grech, Michael Kong, Anton Jurisevic, Lexi Brent, Bernhard Scholz, and Yannis Smaragdakis. 2018. Madmax: Surviving out-of-gas conditions in ethereum smart contracts. Proceedings of the ACM on Programming Languages, 2, OOPSLA (2018), 1–27.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Ilya Grishchenko, Matteo Maffei, and Clara Schneidewind. 2018. A semantic framework for the security analysis of ethereum smart contracts. In International Conference on Principles of Security and Trust. 243–269.Google ScholarGoogle ScholarCross RefCross Ref
  23. Jingxuan He, Mislav Balunović, Nodar Ambroladze, Petar Tsankov, and Martin Vechev. 2019. Learning to fuzz from symbolic execution with application to smart contracts. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security. 531–548.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Bin Hu, Zongyang Zhang, Jianwei Liu, Yizhong Liu, Jiayuan Yin, Rongxing Lu, and Xiaodong Lin. 2020. A Comprehensive Survey on Smart Contract Construction and Execution: Paradigms, Tools and Systems. arXiv preprint arXiv:2008.13413.Google ScholarGoogle Scholar
  25. Sungjae Hwang and Sukyoung Ryu. 2020. Gap between theory and practice: An empirical study of security patches in solidity. In Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering. 542–553.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Bo Jiang, Ye Liu, and W. K. Chan. 2018. ContractFuzzer: fuzzing smart contracts for vulnerability detection. Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering - ASE 2018, isbn:9781450359375 https://doi.org/10.1145/3238147.3238177 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Sukrit Kalra, Seep Goel, Mohan Dhawan, and Subodh Sharma. 2018. ZEUS: Analyzing Safety of Smart Contracts.. In NDSS.Google ScholarGoogle Scholar
  28. George Klees, Andrew Ruef, Benji Cooper, Shiyi Wei, and Michael Hicks. 2018. Evaluating fuzz testing. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security. 2123–2138.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Jun Li, Bodong Zhao, and Chao Zhang. 2018. Fuzzing: a survey. Cybersecurity, 1, 1 (2018), 1–13.Google ScholarGoogle ScholarCross RefCross Ref
  30. Chao Liu, Han Liu, Zhao Cao, Zhong Chen, Bangdao Chen, and Bill Roscoe. 2018. Reguard: finding reentrancy bugs in smart contracts. In 2018 IEEE/ACM 40th International Conference on Software Engineering: Companion (ICSE-Companion). 65–68.Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Han Liu, Chao Liu, Wenqi Zhao, Yu Jiang, and Jiaguang Sun. 2018. S-gram: towards semantic-aware security auditing for ethereum smart contracts. In 2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE). 814–819.Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Loi Luu, Duc-Hiep Chu, Hrishi Olickel, Prateek Saxena, and Aquinas Hobor. 2016. Making Smart Contracts Smarter. IACR Cryptology ePrint Archive, 633.Google ScholarGoogle Scholar
  33. Fuchen Ma, Ying Fu, Meng Ren, Wanting Sun, Zhe Liu, Yu Jiang, Jun Sun, and Jiaguang Sun. 2019. Gasfuzz: Generating high gas consumption inputs to avoid out-of-gas vulnerability. arXiv preprint arXiv:1910.02945.Google ScholarGoogle Scholar
  34. Valentin Jean Marie Manès, HyungSeok Han, Choongwoo Han, Sang Kil Cha, Manuel Egele, Edward J Schwartz, and Maverick Woo. 2019. The art, science, and engineering of fuzzing: A survey. IEEE Transactions on Software Engineering.Google ScholarGoogle Scholar
  35. Anastasia Mavridou and Aron Laszka. 2018. Tool Demonstration: FSolidM for Designing Secure Ethereum Smart Contracts. In Principles of Security and Trust, Lujo Bauer and Ralf Küsters (Eds.). Springer International Publishing, Cham. 270–277. isbn:978-3-319-89722-6Google ScholarGoogle Scholar
  36. MITRE. 2018. Common vulnerabilities and exposures. https://cve.mitre.org/Google ScholarGoogle Scholar
  37. Mark Mossberg, Felipe Manzano, Eric Hennenfent, Alex Groce, Gustavo Grieco, Josselin Feist, Trent Brunson, and Artem Dinaburg. 2019. Manticore: A user-friendly symbolic execution framework for binaries and smart contracts. In 2019 34th IEEE/ACM International Conference on Automated Software Engineering (ASE). 1186–1189.Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. MythX. 2019. Smart Contract Weakness Classification and Test Cases. https://swcregistry.io/ Accessed November 4, 2019.Google ScholarGoogle Scholar
  39. Tai D Nguyen, Long H Pham, Jun Sun, Yun Lin, and Quang Tran Minh. 2020. sFuzz: An Efficient Adaptive Fuzzer for Solidity Smart Contracts. arXiv preprint arXiv:2004.08563.Google ScholarGoogle Scholar
  40. Ivica Nikolić, Aashish Kolluri, Ilya Sergey, Prateek Saxena, and Aquinas Hobor. 2018. Finding the greedy, prodigal, and suicidal contracts at scale. In Proceedings of the 34th Annual Computer Security Applications Conference. 653–663.Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Robert Norvill, Beltran Borja Fiz Pontiveros, Radu State, and Andrea Cullen. 2018. Visual emulation for Ethereum’s virtual machine. In NOMS 2018-2018 IEEE/IFIP Network Operations and Management Symposium. 1–4.Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Trail of Bits. 2018. ethersplay. https://github.com/crytic/ethersplayGoogle ScholarGoogle Scholar
  43. Reza M Parizi, Ali Dehghantanha, Kim-Kwang Raymond Choo, and Amritraj Singh. 2018. Empirical vulnerability analysis of automated smart contracts security testing on blockchains. arXiv preprint arXiv:1809.02702.Google ScholarGoogle Scholar
  44. Daniel Perez and Benjamin Livshits. 2019. Smart contract vulnerabilities: Does anyone care? arXiv preprint arXiv:1902.06710.Google ScholarGoogle Scholar
  45. Anton Permenev, Dimitar Dimitrov, Petar Tsankov, Dana Drachsler-Cohen, and Martin Vechev. 2020. Verx: Safety verification of smart contracts. In 2020 IEEE Symposium on Security and Privacy, SP. 18–20.Google ScholarGoogle ScholarCross RefCross Ref
  46. Theofilos Petsios, Jason Zhao, Angelos D Keromytis, and Suman Jana. 2017. Slowfuzz: Automated domain-independent detection of algorithmic complexity vulnerabilities. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security. 2155–2168.Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Purathani Praitheeshan, Lei Pan, Jiangshan Yu, Joseph Liu, and Robin Doss. 2019. Security analysis methods on Ethereum smart contract vulnerabilities: a survey. arXiv preprint arXiv:1908.08605.Google ScholarGoogle Scholar
  48. Raine Revere. 2018. solgraph. https://github.com/raineorshine/solgraphGoogle ScholarGoogle Scholar
  49. Sunbeom So, Myungho Lee, Jisu Park, Heejo Lee, and Hakjoo Oh. 2020. VeriSmart: A highly precise safety verifier for Ethereum smart contracts. In 2020 IEEE Symposium on Security and Privacy (SP). 1678–1694.Google ScholarGoogle ScholarCross RefCross Ref
  50. Matt Suiche. 2017. Porosity: A decompiler for blockchain-based smart contracts bytecode. DEF con, 25 (2017), 11.Google ScholarGoogle Scholar
  51. Sergei Tikhomirov, Ekaterina Voskresenskaya, Ivan Ivanitskiy, Ramil Takhaviev, and Yaroslav Alexandrov. 2018. SmartCheck: static analysis of ethereum smart contracts. In the 1st International Workshop.Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Christof Ferreira Torres, Antonio Ken Iannillo, Arthur Gervais, and Radu State. 2020. Towards Smart Hybrid Fuzzing for Smart Contracts. arXiv preprint arXiv:2005.12156.Google ScholarGoogle Scholar
  53. Christof Ferreira Torres, Julian Schütte, and Radu State. 2018. Osiris: Hunting for integer bugs in ethereum smart contracts. In Proceedings of the 34th Annual Computer Security Applications Conference. 664–676.Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. Christof Ferreira Torres and Mathis Steichen. 2019. The art of the scam: Demystifying honeypots in ethereum smart contracts. In 28th $USENIX$ Security Symposium ($USENIX$ Security 19). 1591–1607.Google ScholarGoogle Scholar
  55. Petar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais, Florian Buenzli, and Martin T. Vechev. 2018. Securify: Practical Security Analysis of Smart Contracts. In ACM Conference on Computer and Communications Security.Google ScholarGoogle Scholar
  56. Patrick Ventuzelo. 2018. Octopus. https://github.com/pventuzelo/octopusGoogle ScholarGoogle Scholar
  57. Mingzhe Wang, Jie Liang, Chijin Zhou, Yuanliang Chen, Zhiyong Wu, and Yu Jiang. [n.d.]. Industrial Oriented Evaluation of Fuzzing Techniques.Google ScholarGoogle Scholar
  58. W. Wang, J. Song, G. Xu, Y. Li, H. Wang, and C. Su. 2020. ContractWard: Automated Vulnerability Detection Models for Ethereum Smart Contracts. IEEE Transactions on Network Science and Engineering, 1–1.Google ScholarGoogle Scholar
  59. Valentin Wüstholz and Maria Christakis. 2019. Harvey: A greybox fuzzer for smart contracts. arXiv preprint arXiv:1905.06944.Google ScholarGoogle Scholar
  60. Jiaming Ye, Mingliang Ma, Yun Lin, Yulei Sui, and Yinxing Xue. 2020. Clairvoyance: Cross-Contract Static Analysis for Detecting Practical Reentrancy Vulnerabilities in Smart Contracts. In Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering: Companion Proceedings (ICSE ’20). Association for Computing Machinery, New York, NY, USA. 274–275. isbn:9781450371223 https://doi.org/10.1145/3377812.3390908 Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. Pengcheng Zhang, Feng Xiao, and Xiapu Luo. 2019. SolidityCheck: Quickly Detecting Smart Contract Problems Through Regular Expressions. arXiv preprint arXiv:1911.09425.Google ScholarGoogle Scholar
  62. Ence Zhou, Song Hua, Bingfeng Pi, Jun Sun, Yashihide Nomura, Kazuhiro Yamashita, and Hidetoshi Kurihara. 2018. Security assurance for smart contract. In 2018 9th IFIP International Conference on New Technologies, Mobility and Security (NTMS). 1–5.Google ScholarGoogle ScholarCross RefCross Ref
  63. Yi Zhou, Deepak Kumar, Surya Bakshi, Joshua Mason, Andrew Miller, and Michael Bailey. 2018. Erays: reverse engineering ethereum’s opaque smart contracts. In 27th $USENIX$ Security Symposium ($USENIX$ Security 18). 1371–1385.Google ScholarGoogle Scholar
  64. Xiaogang Zhu, Xiaotao Feng, Tengyun Jiao, Sheng Wen, Yang Xiang, Seyit Camtepe, and Jingling Xue. 2019. A feature-oriented corpus for understanding, evaluating and improving fuzz testing. In Proceedings of the 2019 ACM Asia Conference on Computer and Communications Security. 658–663.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Empirical evaluation of smart contract testing: what is the best choice?

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ISSTA 2021: Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis
      July 2021
      685 pages
      ISBN:9781450384599
      DOI:10.1145/3460319

      Copyright © 2021 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 11 July 2021

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate58of213submissions,27%

      Upcoming Conference

      ISSTA '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader