smartmaldb / README.md
Adson59's picture
Update README.md
7803d64 verified
metadata
language:
  - en
license: mit
tags:
  - smart-contracts
  - blockchain
  - vulnerability-detection
  - text-classification
  - graph-classification
pretty_name: SmartMalDB
size_categories:
  - 10K<n<20K
task_categories:
  - text-classification
  - feature-extraction

SmartMalDB

Dataset Description

  • Homepage: [Add if applicable]
  • Repository: [Add GitHub link if public]
  • Paper: [Add if applicable]
  • Point of Contact: Banda William

Summary

SmartMalDB is a labeled dataset for smart contract vulnerability classification. It contains 17,160 smart contract samples, each represented across multiple formats: source code, bytecode, opcode sequences, and control flow graph (CFG) features. The dataset supports both traditional text-based classification and graph-based deep learning approaches.

Vulnerability types include:

  • 0 — Clean (no vulnerability)
  • 1 — Time manipulation (e.g, block timestamp dependencies)
  • 2 — Reentrancy (e.g, External calls before state updates)
  • 3 — External (e.g., unchecked external calls)
  • 4 — Overflow (e.g, unchecked arithmetic operations)
  • 5 — Locked (e.g., lack withdraw or strict balance comparisons)

Supported Tasks and Leaderboards

  • Text-based vulnerability classification using code, bytecode, or opcode fields.
  • Graph-based vulnerability classification using CFG nodes, edges, adjacency matrices, or density features.
  • Multi-modal classification combining code and structural features.

No official leaderboard is currently available.

Languages

All smart contract source code is in Solidity (English-based syntax). Labels and documentation are in English.

Dataset Structure

Data Instances

Example from the dataset:

{
  "code": "pragma solidity ^0.8.0; contract Safe {...}",
  "bytecode": "608060405234801561001057...",
  "opcode": "PUSH1 0x80 PUSH1 0x40 MSTORE...",
  "label": "clean",
  "label_encoded": 0,
  "cfg": "{...}",
  "adj_matrix": "[[0,1,0],[1,0,1],[0,1,0]]",
  "cfg_dot": "digraph G {...}",
  "cfg_nodes": 12,
  "cfg_edges": 15,
  "cfg_density": 0.1136
}

Citations

If you use this dataset, please cite:

@misc{smartmaldb25,
  author = {B. William},
  title = {SmartMalDB},
  year = {2025},
  publisher = {Hugging Face},
  url= {https://huggingface.co/datasets/Adson59/smartmaldb},
}