Team Ai
Datasetpublic

web3se/smart-contract-intent-vul-dataset

Smart Contract Intent & Vulnerability Dataset This dataset contains a large-scale collection of smart contracts annotated with malicious intents and security vulnerabilities, designed for research on smart contract security analysis and program understanding. The dataset includes 90,000+ smart contracts collected from Ethereum and Binance Smart Chain (BSC). All data are distributed as a MySQL database dump (.sql.gz) to support flexible querying and large-scale analysis.… See the full description on the dataset page: https://huggingface.co/datasets/web3se/smart-contract-intent-vul-dataset.

sourceHugging Facemitupdated 7mo agoView on Hugging Face
3likes34downloads
Dataset Card

Smart Contract Intent & Vulnerability Dataset

This dataset contains a large-scale collection of smart contracts annotated with malicious intents and security vulnerabilities, designed for research on smart contract security analysis and program understanding.

The dataset includes 90,000+ smart contracts collected from Ethereum and Binance Smart Chain (BSC). All data are distributed as a MySQL database dump (.sql.gz) to support flexible querying and large-scale analysis.

Dataset Structure

The dataset consists of a single MySQL database with three tables:

  • —`contracts`: Main table containing smart contract source code (Solidity) and basic metadata (e.g., contract address and chain).
  • —`tokens`: Intent annotations for token-related smart contracts.
  • —`vulnerabilities`: Vulnerability annotations for smart contracts.

The contracts table serves as the primary table and is referenced by both tokens and vulnerabilities.

Smart Contract Intent Annotations

The tokens table labels token contracts with one or more intent categories that describe potentially malicious or risky behaviors.

Intent TypeExplanationNum
FeeArbitrarily modifies transaction fees and redirects them to specific addresses33,268
DisableTradingEnables or disables trading functionality6,617
BlacklistRestricts designated users from trading or transferring tokens4,729
ReflectionRedistributes transaction taxes to token holders46,452
MaxTXLimits maximum transaction volume or frequency17,043
MintAllows minting of new tokens (controlled or unlimited)10,572
HoneypotPrevents users from selling tokens after purchase290
RewardDistributes rewards to incentivize participation4,178
RebaseAlgorithmically adjusts token supply659
MaxSellRestricts selling volume or timing68

Smart Contract Vulnerability Annotations

The vulnerabilities table provides labels for well-known smart contract security issues.

Vulnerability TypeNum
Block Number Dependency (BN)116
Timestamp Dependency (TP)214
Dangerous Delegatecall (DE)48
Ether Frozen (EF)57
Ether Strict Equality (SE)45
Integer Overflow (OF)23
Reentrancy (RE)103
Unchecked External Call (UC)113

Data Format and Usage

  • —Format: MySQL database dump (.sql, compressed as .sql.gz)
  • —Language: Solidity smart contracts
  • —Encoding: UTF-8

To use the dataset, import it into a MySQL database.

sql
CREATE DATABASE web3;
bash
gunzip web3_all.sql.gz
mysql -u <username> -p web3 < web3_all.sql

After import, the database will contain the following tables:

  • —contracts
  • —tokens
  • —vulnerabilities

Preprocessing

Newline (\n) and tab (\t) characters in smart contract source code were normalized to a single whitespace to ensure consistency in the input format. This normalization does not change the semantic content and is commonly used in smart contract understanding tasks.

Intended Use

This dataset is intended for research on:

  • —Smart contract intent detection
  • —Vulnerability detection and analysis
  • —Malicious behavior classification
  • —Large-scale empirical studies on smart contract security

Citation

tex
@article{huang2025smart,
  title={Smart Contract Intent Detection with Pre-trained Programming Language Model},
  author={Huang, Youwei and Li, Jianwen and Fang, Sen and Li, Yao and Yang, Peng and Hu, Bin},
  journal={arXiv preprint arXiv:2508.20086},
  year={2025}
}
tex
@inproceedings{huang2025deep,
  title={Deep smart contract intent detection},
  author={Huang, Youwei and Fang, Sen and Li, Jianwen and Hu, Bin and Tao, Jiachun and Zhang, Tao},
  booktitle={2025 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)},
  pages={124--135},
  year={2025},
  organization={IEEE}
}
tex
@article{huang2022smartintentnn,
  title={Smartintentnn: Towards smart contract intent detection},
  author={Huang, Youwei and Fang, Sen and Li, Jianwen and Hu, Bin and Zhang, Tao},
  journal={arXiv preprint arXiv:2211.13670},
  year={2022}
}

Contributor

Acknowledgment