skip to main content
10.1145/3410886.3410907acmotherconferencesArticle/Chapter ViewAbstractPublication PageshtConference Proceedingsconference-collections
research-article

Testing Ethereum Smart Contracts: A Comparison of Symbolic Analysis and Fuzz Testing Tools

Published:14 September 2020Publication History

ABSTRACT

Ethereum smart contract exploits have inflicted enormous monetary damage due to vulnerabilities introduced accidentally by the contract authors. Many of these errors can now be detected automatically by a growing number of security analysis tools that specifically target the most common vulnerabilities present in the Ethereum smart contract ecosystem. The aim of this work is to identify state-of-the-art security analysis tools that assist auditors in automatically testing and verifying real-world contracts. We compare two such symbolic executioners, Manticore (which we also extend) and Mythril, and one fuzz tester, Echidna, to evaluate their effectiveness when analysing a set of challenge contracts hosted online, as well as twenty of the most popular ERC-20 tokens found on the main Ethereum network. Our results showed that the tools were able to solve 24 of the 39 challenge contracts and both symbolic tools achieved on average more than 80% code coverage on successful evaluations of the popular ERC-20 token data. Code coverage plateaued after the second symbolic transaction, suggesting a good performance target for continuous integration environments.

References

  1. Nicola Atzei, Massimo Bartoletti, and Tiziana Cimoli. 2017. A survey of attacks on ethereum smart contracts (sok). In International Conference on Principles of Security and Trust. Springer, Berlin, Heidelberg, 164–186. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Vitalik Buterin 2014. A next-generation smart contract and decentralized application platform. Ethereum project white paper(2014).Google ScholarGoogle Scholar
  3. Huashan Chen, Marcus Pendleton, Laurent Njilla, and Shouhuai Xu. 2019. A Survey on Ethereum Systems Security: Vulnerabilities, Attacks and Defenses. arXiv preprint arXiv:1908.04507(2019).Google ScholarGoogle Scholar
  4. ConsenSys. 2019. ConsenSys/mythril: Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains.https://github.com/ConsenSys/mythril. (Accessed on 10/31/2019).Google ScholarGoogle Scholar
  5. ConsenSys. 2019. Overview · Smart Contract Weakness Classification and Test Cases. https://swcregistry.io. (Accessed on 10/25/2019).Google ScholarGoogle Scholar
  6. Echidna 2019. crytic/echidna: Ethereum fuzz testing framework. https://github.com/crytic/echidna. (Accessed on 10/28/2019).Google ScholarGoogle Scholar
  7. Enigmatic. 2018. Smart Contract Exploits Part 1 — Featuring Capture the Ether (Lotteries). https://medium.com/coinmonks/smart-contract-exploits-part-1-featuring-capture-the-ether-lotteries-8a061ad491b. (Accessed on 09/26/2019).Google ScholarGoogle Scholar
  8. Etherscan. 2019. Ethereum (ETH) Blockchain Explorer. https://etherscan.io. (Accessed on 09/23/2019).Google ScholarGoogle Scholar
  9. Josselin Feist, Gustavo Grieco, and Alex 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). IEEE, 8–15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Yu Feng, Emina Torlak, and Rastislav Bodik. 2019. Precise Attack Synthesis for Smart Contracts. arXiv preprint arXiv:1902.06067(2019).Google ScholarGoogle Scholar
  11. Ying Fu, Meng Ren, Fuchen Ma, Heyuan Shi, Xin Yang, Yu Jiang, Huizhong Li, and Xiang Shi. 2019. EVMFuzzer: detect EVM vulnerabilities via fuzz testing. In Proceedings of the 2019 27th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. ACM, 1110–1114. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Osman Güçlütürk. 2018. The DAO Hack Explained: Unfortunate Take-off of Smart Contracts. https://medium.com/@ogucluturk/the-dao-hack-explained-unfortunate-take-off-of-smart-contracts-2bd8c8db3562. (Accessed on 12/15/2019).Google ScholarGoogle Scholar
  13. Dominik Harz and William Knottenbelt. 2018. Towards safer smart contracts: A survey of languages and verification methods. arXiv preprint arXiv:1809.09805(2018).Google ScholarGoogle Scholar
  14. hevm 2019. hevm: Ethereum virtual machine evaluator. http://hackage.haskell.org/package/hevm. (Accessed on 11/14/2019).Google ScholarGoogle Scholar
  15. Alexander Leid. 2020. Testing Smart Contracts. Master’s thesis. Stellenbosch University.Google ScholarGoogle Scholar
  16. 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. arXiv preprint arXiv:1907.03890(2019).Google ScholarGoogle Scholar
  17. 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. ACM, 653–663. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Trail of Bits. 2019. crytic/not-so-smart-contracts: Examples of Solidity security issues. https://github.com/crytic/not-so-smart-contracts. (Accessed on 12/11/2019).Google ScholarGoogle Scholar
  19. Trail of Bits. 2019. trailofbits/manticore: Symbolic execution tool. https://github.com/trailofbits/manticore. (Accessed on 11/14/2019).Google ScholarGoogle Scholar
  20. OpenZeppelin. 2019. Ethernaut. https://ethernaut.openzeppelin.com. (Accessed on 09/23/2019).Google ScholarGoogle Scholar
  21. OpenZeppelin. 2019. OpenZeppelin/ethernaut: Web3/Solidity based wargame. https://github.com/OpenZeppelin/ethernaut. (Accessed on 09/23/2019).Google ScholarGoogle Scholar
  22. OpenZeppelin. 2020. Proxy Patterns – OpenZeppelin blog. https://blog.openzeppelin.com/proxy-patterns/. (Accessed on 05/10/2020).Google ScholarGoogle Scholar
  23. SMARX. 2019. Capture the Ether - the game of Ethereum smart contract security. https://capturetheether.com. (Accessed on 09/23/2019).Google ScholarGoogle Scholar
  24. Vyper Team. 2019. Vyper — Vyper documentation. https://vyper.readthedocs.io/en/v0.1.0-beta.13/. (Accessed on 10/24/2019).Google ScholarGoogle Scholar

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 Other conferences
    SAICSIT '20: Conference of the South African Institute of Computer Scientists and Information Technologists 2020
    September 2020
    258 pages
    ISBN:9781450388474
    DOI:10.1145/3410886

    Copyright © 2020 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: 14 September 2020

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article
    • Research
    • Refereed limited

    Acceptance Rates

    Overall Acceptance Rate187of439submissions,43%

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format .

View HTML Format