By clicking "Accept", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. See our Privacy Policy for more information
Open Datasets
Vulnerable Functions Base
Text

Vulnerable Functions Base

Dataset containing real examples of vulnerable Solidity functions, from 5 specialized audit firms, with associated recommendations.

Download dataset
Size

Solidity functions annotated with description, impact, recommendation; JSON/CSV text format

Licence

MIT

Description

Vulnerable Functions Base is a structured corpus of functions written in Solidity, collected from audit reports made by blockchain cybersecurity experts (Codehawks, ConsenSys, Cyfrin, Sherlock, Trust Security). Each function is accompanied by an explanation of the vulnerability, its severity level, a possible impact, and a recommendation.

What is this dataset for?

  • Train NLP or LLMs models to automatically detect flaws in smart contracts
  • Serve as a basis for generating static analysis tools or audit support systems
  • Use in benchmarks to compare different detectors or security models

Can it be enriched or improved?

Yes, you can add more examples, integrate snippets with patches, link to public CVEs, or enrich the dataset with examples of unit tests simulating attacks. Adding metadata (full contract, compiler version) could also improve training value.

🔎 In summary

Criterion Evaluation
🧩 Ease of use⭐⭐⭐✩✩ (Average – requires Solidity code parsing)
🧼 Need for cleaning⭐⭐⭐✩✩ (Possible – some snippets may be noisy - e.g., mixed JS/Solidity syntax)
🏷️ Annotation richness⭐⭐⭐⭐✩ (Good – explanation + level + recommendation)
📜 Commercial license✅ Yes (MIT)
👨‍💻 Beginner friendly⚠️ Not really – requires Solidity knowledge and blockchain security
🔁 Fine-tuning ready🛡️ Excellent base for SFT of an LLM in smart contract auditing
🌍 Cultural diversity⚠️ Limited – focus on Solidity and EVM context only

🧠 Recommended for

  • Blockchain security researchers
  • Web3 developers
  • Solidity analysis tools

🔧 Compatible tools

  • Hugging Face
  • LangChain
  • Tree-sitter
  • Slither
  • GPT fine-tuning

💡 Tip

For better automatic detection results, filter the examples by severity or vulnerability category (e.g. reentrancy, overflow).

Frequently Asked Questions

Does this dataset only contain Solidity code?

Mostly yes, but some snippets may contain other languages like JavaScript — filtering is recommended.

Where do examples of vulnerabilities come from?

They come from audit reports carried out by 5 specialized firms and aggregated by the Solodit platform.

Can this dataset be used to generate automatic alerts on new contracts?

Yes, it can be used as a basis for training models or tools that analyze contracts in real time in search of flaws.

Similar datasets

See more
Category

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

Category

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.

Category

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.