Vulnerable Functions Base
Dataset containing real examples of vulnerable Solidity functions, from 5 specialized audit firms, with associated recommendations.
Solidity functions annotated with description, impact, recommendation; JSON/CSV text format
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
🧠 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.




