7.28 MB
5 files
Updated 3 months ago
Name
Size
.gitattributes2.31 kB
xet
.gitignore9 Bytes
xet
README.md2.51 kB
xet
db-verified.csv373 kB
xet
db-vulnerable.csv6.91 MB
xet
README.md

These datasets serve as a basis for other datasets in this family which are built for tasks like Classification or Seq2Seq generation.

1. Smart Contract Vulnerabilities with Explanations (vulnerable-w-explanations)

This repository offers two datasets of Solidity functions, This dataset comprises vulnerable Solidity functions audited by 5 auditing companies:

(Codehawks, ConsenSys, Cyfrin, Sherlock, Trust Security). These audits are compiled by Solodit.

Usage

from datasets import load_dataset
dataset = load_dataset(
  "msc-smart-contract-audition/vulnerable-functions-base",
  split='train',
  escapechar='\\',
)
Field Description
1. name Title of audit report
2. severity Severity of vulnerability (Low, Medium, High)
3. description Description/Explanation of the vulnerability
4. recommendation Recommended mitigation of the vulnerability
5. impact Explains how the vulnerability affects the smart contract (Optional)
6. function Raw vulnerable solidity code (Sometimes this could be inaccurate. Best efforts were made to clean-up the dataset but some rows might include other programming languages e.g. javascript)

2. Verified functions (verified-functions)

This repository also includes a dataset with functions with no known vulnerabilities. They were scraped-off from Etherscan. Specifically, the functions are a part of the top 500 auditted contracts holding at least 1 ETH.

Usage

from datasets import load_dataset
dataset = load_dataset(
  "msc-smart-contract-audition/vulnerable-functions-base",
  name="verified-functions",
  split='train',
  escapechar='\\',
)
Field Description
1. function Raw solidity code

Additional Info

  • The newline characters are escaped (i.e. \\n)
  • The dataset has a single split train (hence the adjusted loading isntructions).
Total size
7.28 MB
Files
5
Last updated
Sep 3
Pre-warmed CDN
US EU US EU

Contributors