Dataset Viewer
Auto-converted to Parquet Duplicate
address
string
code
string
labels
list
binary_label
int64
n_positive_categories
int64
label_vector
list
0x50987e6be405ebac691f8988304562e5efc3b2ea
// File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol pragma solidity ^0.4.21; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(a...
[ "arithmetic" ]
1
1
[ 0, 0, 1, 0, 0, 0, 0, 0 ]
0xaf31604f0a88f7fcebc7d4cf4dd14653f4a6773c
pragma solidity ^0.4.13; contract Token { uint256 public totalSupply; function balanceOf(address _owner) constant returns (uint256 balance); function transfer(address _to, uint256 _value) returns (bool success); function transferFrom(address _from, address _to, uint256 _value) returns (bool success); ...
[ "arithmetic", "reentrancy" ]
1
2
[ 0, 0, 1, 0, 0, 1, 0, 0 ]
0xb81292a2e046e44121dfbfba398b19f5910faf60
pragma solidity ^0.4.25; contract Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base co...
[ "arithmetic" ]
1
1
[ 0, 0, 1, 0, 0, 0, 0, 0 ]
0xf4a3679eb0a3d9e8af9824a29bd32dd98d1e7127
pragma solidity ^0.4.25; contract IStdToken { function balanceOf(address _owner) public view returns (uint256); function transfer(address _to, uint256 _value) public returns (bool); function transferFrom(address _from, address _to, uint256 _value) public returns(bool); } contract EtheramaCommon { ...
[ "arithmetic" ]
1
1
[ 0, 0, 1, 0, 0, 0, 0, 0 ]
0xa4cc3648dba1396a2a455486b408ef4402c3a966
pragma solidity ^0.4.15; // ================= Ownable Contract start ============================= /* * Ownable * * Base contract with an owner. * Provides onlyOwner modifier, which prevents function from running if it is called by anyone other than the owner. */ contract Ownable { address public owner; func...
[ "arithmetic" ]
1
1
[ 0, 0, 1, 0, 0, 0, 0, 0 ]
0x7114e6abb99b00f3255767f4a409e5f5be3b8b83
pragma solidity ^0.4.21; library BWUtility { // -------- UTILITY FUNCTIONS ---------- // Return next higher even _multiple for _amount parameter (e.g used to round up to even finneys). function ceil(uint _amount, uint _multiple) pure public returns (uint) { return ((_amount + _multiple - 1) ...
[ "Other", "arithmetic", "denial_service" ]
1
3
[ 1, 0, 1, 1, 0, 0, 0, 0 ]
0x18a27a0e42d02d88ea2800ffe3bf094fb2de3e53
pragma solidity 0.4.21; // File: contracts/ExchangeHandler.sol /// @title Interface for all exchange handler contracts interface ExchangeHandler { /// @dev Get the available amount left to fill for an order /// @param orderAddresses Array of address values needed for this DEX order /// @param orderValues...
[]
0
0
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
0xe65702283f5773e7e0f6bdd3594f502241676f1a
pragma solidity ^0.4.13; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two ...
[ "arithmetic", "time_manipulation" ]
1
2
[ 0, 0, 1, 0, 0, 0, 1, 0 ]
0xff531d7874cab51b2661d6599d5f552edae3481e
pragma solidity ^0.4.23; contract CoinCj // @eachvar { // ======== 初始化代币相关逻辑 ============== // 地址信息 address public admin_address = 0x587b13913F4c708A4F033318056E4b6BA956A6F5; // @eachvar address public account_address = 0xf988dC2F225C64CcdeA064Dad60DD4A95776f483; // @eachvar 初始化后转入代币的地址 // 定义账...
[ "arithmetic" ]
1
1
[ 0, 0, 1, 0, 0, 0, 0, 0 ]
0x1d9bfbc9f1616dbdf5946ae95d075ce7f87d24d3
pragma solidity >=0.4.22 <0.6.0; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract MUTOToken { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 ...
[ "arithmetic" ]
1
1
[ 0, 0, 1, 0, 0, 0, 0, 0 ]
0xdc7f41f9e8ba6de05ed5cefa74fb57e82cfb038e
pragma solidity ^0.4.18; contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Ba...
[ "arithmetic", "reentrancy", "unchecked_low_calls" ]
1
3
[ 0, 0, 1, 0, 0, 1, 0, 1 ]
End of preview. Expand in Data Studio

Vultrix SmartBugs processed

44,589 real Ethereum smart contracts (Solidity source code), each labelled with up to 8 vulnerability types. It was used to train Arshit1616/vultrix-multilabel-v2.

Project code (including the training script): github.com/Arshit-Verma/Vultrix

This is a processed version of the public SmartBugs dataset. The contracts come from SmartBugs Wild, and the labels from SmartBugs results: what 9 automated analysis tools reported for each contract.

How the labels were made

The 9 tools are Slither, Mythril, Oyente, Osiris, SmartCheck, Securify, HoneyBadger, Maian and Manticore. Their findings are grouped into categories.

A contract gets a label when at least 2 different tools report that category.

metadata.json records this as "min_tool_consensus": 2.

Example: if Slither and SmartCheck both report reentrancy, the contract is labelled reentrancy. If only Oyente reports arithmetic, it isn't labelled arithmetic.

So the labels mean "at least two automated tools would flag this". They aren't the result of a human audit.

Splits and labels

Label Train Validation Test
Other 5,381 675 628
access_control 512 56 72
arithmetic 21,423 2,687 2,680
denial_service 2,166 281 282
front_running 845 109 117
reentrancy 4,306 529 545
time_manipulation 716 85 100
unchecked_low_calls 956 102 116
no label (clean) 9,654 1,207 1,207
contracts 35,671 4,459 4,459

About 73% of contracts have at least one label. The labels are very unbalanced: arithmetic is on about 60% of contracts, access_control on 1.4%.

Fields

One JSON object per line:

Field Type Meaning
address string Ethereum contract address
code string Full Solidity source (Unix line endings)
labels list of strings Label names, e.g. ["Other", "arithmetic"]
binary_label int 1 if the contract has any label
n_positive_categories int Number of labels
label_vector list of 8 ints 0/1 per label, in the order of the table above (and metadata.json)
from datasets import load_dataset
ds = load_dataset("Arshit1616/vultrix-smartbugs-processed")
print(ds["test"][0]["labels"])

Things to know

  • Old Solidity: the contracts are from 2019 and mostly Solidity 0.4.x.
  • Not every SmartBugs contract is here. SmartBugs Wild has 47,398 contracts and this set has 44,589. 67 had no tool results; why the other ≈ 2,740 were left out isn't recorded.
  • The split can't be recreated. It was random, and its seed isn't recorded.
  • Duplicates: a small number of training contracts (138) share their code with validation or test contracts when comments and whitespace are ignored. The Vultrix model's training removed them.

Credits and licence

  • Licence: Apache-2.0, the same as the source data. Each contract's source code keeps its original licence, as published on Etherscan.
  • Source: SmartBugs Wild and SmartBugs results, Apache-2.0.
  • Paper: Durieux, Ferreira, Abreu, Cruz, Empirical Review of Automated Analysis Tools on 47,587 Ethereum Smart Contracts, ICSE 2020.
  • Changes from the original: contracts and tool results were combined into one file per split, labels were derived with the 2-tools rule above, and the data was split 80 / 10 / 10.
Downloads last month
64

Models trained or fine-tuned on Arshit1616/vultrix-smartbugs-processed