[Paper Review] Smart-Corpus: an Organized Repository of Ethereum Smart Contracts Source Code and Metrics
Smart-Corpus is a curated, up-to-date repository of Ethereum smart contracts that aggregates Solidity source code, ABI, byte-code, and both intrinsic and extrinsic software metrics. It enables researchers to efficiently query and analyze smart contracts via a GraphQL interface, reducing time and effort in static analysis by providing pre-computed metrics from validated, EtherScan-verified contracts, with over 30,000 contracts already indexed and growing at 100 per day.
Many empirical software engineering studies show that there is a great need for repositories where source code is acquired, filtered and classified. During the last few years, Ethereum block explorer services have emerged as a popular project to explore and search Ethereum blockchain data such as transactions, addresses, tokens, smart-contracts' source code, prices and other activities taking place on the Ethereum blockchain. Despite the availability of this kind of services, retrieving specific information useful to empirical software engineering studies, such as the study of smart-contracts' software metrics might require many sub-tasks, such as searching specific transactions in a block, parsing files in HTML format and filtering the smart-contracts to remove duplicated code or unused smart-contracts. In this paper we afford this problem creating Smart Corpus', a Corpus of Smart Contracts in an organized reasoned and up to date repository where Solidity source code and other metadata about Ethereum smart contracts can easily and systematically be retrieved. We present the Smart Corpus' design and its initial implementation and we show how the data-set of smart contracts' source code in a variety of programming languages can be queried and processed, get useful information on smart contracts and their software metrics. The Smart Corpus aims to create a smart-contracts' repository where smart contracts data (source code, ABI and byte-code) are freely and immediately available and also classified based on the main software metrics identified in the scientific literature. Smart-contracts source code has been validated by EtherScan and each contract comes with its own associated software metrics as computed by the freely available software PASO. Moreover, Smart Corpus can be easily extended, as the number of new smart-contracts increases day by day.
Motivation & Objective
- To address the lack of organized, accessible, and structured repositories of Ethereum smart contract source code and associated software metrics.
- To reduce the time and computational cost of static analysis for blockchain researchers by providing pre-validated and pre-processed data.
- To support reproducible empirical software engineering research on smart contracts by offering a standardized, up-to-date corpus.
- To enable efficient querying of smart contract data using both a GUI and a GraphQL interface for targeted research needs.
- To classify and enrich smart contract data with intrinsic (e.g., number of functions, events) and extrinsic (e.g., transaction count, balance) metrics.
Proposed method
- The Smart-Corpus system ingests smart contract data from Ethereum block explorers, primarily relying on EtherScan for source code validation and metadata extraction.
- It extracts and stores Solidity source code, ABI, byte-code, and associated metadata for each contract in a centralized, organized repository.
- Intrinsic metrics—such as number of functions, events, modifiers, and payable functions—are computed using the open-source tool PASO.
- Extrinsic metrics—such as transaction count and Ether balance—are derived from blockchain transaction data and contract interaction logs.
- The system implements a GraphQL API to allow researchers to query specific subsets of data using structured queries, enabling efficient and targeted data retrieval.
- The corpus is continuously updated, with new contracts added at a rate of approximately 100 per day, ensuring ongoing relevance and coverage.
Experimental results
Research questions
- RQ1How can researchers efficiently retrieve and analyze Ethereum smart contract source code and associated software metrics without manually processing raw blockchain data?
- RQ2What are the most common structural patterns (e.g., number of functions, modifiers) in real-world smart contracts as derived from a large-scale, validated corpus?
- RQ3To what extent can a pre-computed, curated repository reduce the time and computational cost of static analysis in smart contract research?
- RQ4How do extrinsic properties such as transaction volume and token balance correlate with intrinsic code complexity in deployed smart contracts?
- RQ5Can a standardized, open, and continuously updated corpus support reproducible research in blockchain software engineering?
Key findings
- The Smart-Corpus repository currently hosts approximately 30,000 Ethereum smart contracts, with source code, ABI, byte-code, and associated metrics stored and validated.
- The corpus is updated daily, with an average of 100 new contracts added per day, ensuring up-to-date coverage of the Ethereum smart contract ecosystem.
- Intrinsic metrics such as function count, event count, and payable function presence are computed using the PASO tool and stored for each contract.
- Extrinsic metrics including total transaction count and Ether balance are extracted from blockchain transaction data and associated with each contract's address.
- The GraphQL interface enables researchers to retrieve precise data subsets—such as contracts with more than 20 functions—without manual filtering or parsing of raw data.
- The system enables efficient, reproducible research by eliminating the need for researchers to independently download, validate, and compute metrics on raw blockchain data.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.