Skip to main content
QUICK REVIEW

[Paper Review] DAppSCAN: Building Large-Scale Datasets for Smart Contract Weaknesses in DApp Projects

Zibin Zheng, Jianzhong Su|arXiv (Cornell University)|May 15, 2023
Blockchain Technology Applications and SecurityComputer Science4 citations
TL;DR

This paper introduces DAppSCAN, a large-scale, real-world dataset of 1,618 SWC-listed smart contract weaknesses extracted from 682 decentralized applications (DApps). Using 1,199 audit reports analyzed over 44 person-months, the authors created two datasets—DAppSCAN-Source (39,904 Solidity files) and DAppSCAN-Bytecode (6,665 compiled contracts)—to enable realistic evaluation of smart contract analysis tools, revealing that existing tools perform poorly on real DApp code.

ABSTRACT

The Smart Contract Weakness Classification Registry (SWC Registry) is a widely recognized list of smart contract weaknesses specific to the Ethereum platform. Despite the SWC Registry not being updated with new entries since 2020, the sustained development of smart contract analysis tools for detecting SWC-listed weaknesses highlights their ongoing significance in the field. However, evaluating these tools has proven challenging due to the absence of a large, unbiased, real-world dataset. To address this problem, we aim to build a large-scale SWC weakness dataset from real-world DApp projects. We recruited 22 participants and spent 44 person-months analyzing 1,199 open-source audit reports from 29 security teams. In total, we identified 9,154 weaknesses and developed two distinct datasets, i.e., DAPPSCAN-SOURCE and DAPPSCAN-BYTECODE. The DAPPSCAN-SOURCE dataset comprises 39,904 Solidity files, featuring 1,618 SWC weaknesses sourced from 682 real-world DApp projects. However, the Solidity files in this dataset may not be directly compilable for further analysis. To facilitate automated analysis, we developed a tool capable of automatically identifying dependency relationships within DApp projects and completing missing public libraries. Using this tool, we created DAPPSCAN-BYTECODE dataset, which consists of 6,665 compiled smart contract with 888 SWC weaknesses. Based on DAPPSCAN-BYTECODE, we conducted an empirical study to evaluate the performance of state-of-the-art smart contract weakness detection tools. The evaluation results revealed sub-par performance for these tools in terms of both effectiveness and success detection rate, indicating that future development should prioritize real-world datasets over simplistic toy contracts.

Motivation & Objective

  • Address the lack of large-scale, unbiased, real-world datasets for evaluating smart contract weakness detection tools.
  • Overcome the limitations of existing evaluation methods that rely on small, synthetic, or toy contracts with limited real-world relevance.
  • Create a comprehensive, manually curated dataset of smart contract vulnerabilities from real DApp projects using audit reports from 29 security teams.
  • Develop a tool to automatically resolve dependencies and compile DApp projects into executable bytecode for automated analysis.
  • Evaluate the performance of state-of-the-art tools on real-world DApp code to reveal gaps in current detection capabilities.

Proposed method

  • Recruited 22 researchers (7 PhD, 15 master’s students) to manually analyze 1,199 open-source audit reports from 29 security teams over 44 person-months.
  • Identified 9,154 total weaknesses, of which 1,618 were mapped to SWC Registry categories, with precise source code locations and descriptions.
  • Constructed DAppSCAN-Source: 39,904 Solidity files from 682 real-world DApp projects, preserving original code structure and vulnerability context.
  • Built a dependency resolution tool to automatically detect and resolve missing public libraries in DApp projects, enabling compilation.
  • Generated DAppSCAN-Bytecode: 6,665 compiled smart contracts with 888 SWC weaknesses, suitable for bytecode-level analysis.
  • Conducted an empirical evaluation of six state-of-the-art tools on DAppSCAN-Bytecode to assess detection effectiveness and success rates.

Experimental results

Research questions

  • RQ1How effective are current smart contract analysis tools in detecting SWC-listed weaknesses when evaluated on real-world DApp code?
  • RQ2What is the distribution and frequency of SWC weaknesses across real-world DApp projects, and how do they compare to toy contracts?
  • RQ3To what extent do existing tools detect exploitable vulnerabilities in real DApp deployments, and what types of weaknesses are most commonly missed?
  • RQ4How do dependency resolution and compilation completeness affect the reliability of automated vulnerability detection on DApp-level projects?
  • RQ5What are the key limitations of current tools when applied to complex, real-world DApp architectures rather than isolated contracts?

Key findings

  • The DAppSCAN-Source dataset contains 39,904 Solidity files from 682 real DApp projects, with an average of 58 contract files and 7,885 lines of code per DApp.
  • 66.3% of the DApps in the dataset use Solidity compiler versions higher than 0.6, reflecting modern development practices.
  • The DAppSCAN-Bytecode dataset includes 6,665 compiled smart contracts with 888 SWC weaknesses, enabling executable analysis.
  • Empirical evaluation revealed that state-of-the-art tools achieve poor performance in both effectiveness and success detection rate on real DApp code.
  • Only 463 (1.98%) of the 23,327 vulnerable contracts in the dataset had been exploited in practice, suggesting a high rate of false positives or non-exploitable issues in academic tools.
  • Existing tools fail to detect a significant portion of real-world, exploitable vulnerabilities—especially logic bugs and protocol-layer flaws—highlighting a critical gap in current detection capabilities.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.