[Paper Review] SmartBugs: A Framework to Analyze Solidity Smart Contracts
SmartBugs is an open-source, extensible framework that standardizes the execution and comparison of static analysis tools on Solidity smart contracts. By providing pre-configured tools, curated datasets, and Docker-based execution, it enables reproducible evaluation; extending SmartCheck within SmartBugs boosted vulnerability detection for Bad Randomness, Time Manipulation, and Access Control from 11% to 24%.
Over the last few years, there has been substantial research on automated analysis, testing, and debugging of Ethereum smart contracts. However, it is not trivial to compare and reproduce that research. To address this, we present SmartBugs, an extensible and easy-to-use execution framework that simplifies the execution of analysis tools on smart contracts written in Solidity, the primary language used in Ethereum. SmartBugs is currently distributed with support for 10 tools and two datasets of Solidity contracts. The first dataset can be used to evaluate the precision of analysis tools, as it contains 143 annotated vulnerable contracts with 208 tagged vulnerabilities. The second dataset contains 47,518 unique contracts collected through Etherscan. We discuss how SmartBugs supported the largest experimental setup to date both in the number of tools and in execution time. Moreover, we show how it enables easy integration and comparison of analysis tools by presenting a new extension to the tool SmartCheck that improves substantially the detection of vulnerabilities related to the DASP10 categories Bad Randomness, Time Manipulation, and Access Control (identified vulnerabilities increased from 11% to 24%).
Motivation & Objective
- Address the lack of reproducibility in smart contract analysis research due to inconsistent datasets and tool configurations.
- Provide a unified, extensible framework to simplify execution and comparison of static analysis tools on Solidity contracts.
- Enable researchers and practitioners to evaluate tools consistently using standardized, annotated datasets.
- Facilitate integration of new tools and extensions through modular configuration and Docker-based deployment.
- Support large-scale empirical evaluations by streamlining execution across multiple tools and contract sets.
Proposed method
- Design a modular framework with a command-line interface, tool configuration files, Docker images for tools, and dedicated datasets.
- Integrate 10 existing static analysis tools (e.g., Slither, Mythril, SmartCheck) with version-specific configurations to handle Solidity backward compatibility.
- Provide two datasets: a curated set of 143 vulnerable contracts with 208 tagged vulnerabilities (10 categories), and a larger set of 47,518 Etherscan-collected contracts.
- Use YAML-based configuration files to define tool behavior, including default and legacy Solidity version support.
- Implement a SmartBugs Runner that orchestrates tool execution across datasets using Docker containers.
- Extend SmartCheck with new XPath-based rules for detecting bad randomness, time manipulation, and unprotected access control patterns.
Experimental results
Research questions
- RQ1Can a standardized framework improve reproducibility in smart contract analysis research?
- RQ2How effectively can SmartBugs support large-scale, cross-tool evaluation of static analysis tools?
- RQ3To what extent can tool integration and extension within SmartBugs improve vulnerability detection precision?
- RQ4Can new rules be effectively added to existing tools like SmartCheck to enhance detection of specific vulnerability categories?
- RQ5How does the performance and accuracy of extended tools compare to original versions using a shared, annotated dataset?
Key findings
- SmartBugs enabled the largest experimental setup to date, supporting 10 tools and extensive execution time across multiple contract sets.
- The extension of SmartCheck within SmartBugs increased detection of vulnerabilities in the DASP10 categories Bad Randomness, Time Manipulation, and Access Control from 11% to 24%.
- The SmartCheck Extended tool detected 15 additional vulnerabilities (28 total vs. 13 in original SmartCheck) on the curated dataset of 115 vulnerable contracts.
- The new rule for Bad Randomness detected 10 out of 31 vulnerabilities (32%), significantly improving on the original tool’s 0% detection.
- The Time Manipulation category saw detection rise from 1/5 (20%) to 4/5 (80%) with the extended rules.
- The Access Control category detection improved from 2/19 (11%) to 4/19 (21%) by adding rules for unprotected selfdestruct and ownership transfer patterns.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.