SC-Bench
收藏资源简介:
SC-Bench是由宾夕法尼亚州立大学创建的第一个用于自动化智能合约审计的大规模数据集。该数据集包含5377个运行在以太坊上的真实智能合约和15975个ERC标准违规记录。数据集内容丰富,涵盖了多种ERC规则的违规情况,包括139个真实开发者犯下的违规和15836个系统注入的违规。数据集的创建过程包括手动检查和自动错误注入,旨在为智能合约审计研究提供高质量的数据支持。SC-Bench的应用领域主要集中在智能合约的安全审计和自动化技术改进,旨在解决智能合约在区块链平台上的合规性和安全性问题。
SC-Bench is the first large-scale dataset for automated smart contract auditing, developed by Pennsylvania State University. This dataset contains 5,377 real smart contracts running on Ethereum and 15,975 ERC standard violation records. The dataset is rich in content, covering violations of multiple ERC specifications, including 139 violations committed by real developers and 15,836 system-injected violations. The creation process of the dataset includes manual inspection and automated error injection, aiming to provide high-quality data support for smart contract auditing research. The application domains of SC-Bench primarily focus on smart contract security auditing and automated technical improvement, with the goal of addressing the compliance and security issues of smart contracts on blockchain platforms.
SCBench
SCBench是一个用于智能合约审计的大规模数据集。
数据集信息
Err-Inj 数据库
| call | emit | throw | interface | assign | return | total | # of contracts | |
|---|---|---|---|---|---|---|---|---|
| ERC-20 | 0 | 3612 | 566 | 4605 | 736 | 5930 | 15449 | 5211 |
| ERC-721 | 15 | 33 | 158 | 72 | 0 | 48 | 326 | 110 |
| ERC-1155 | 4 | 0 | 18 | 30 | 0 | 9 | 61 | 26 |
| Total | 19 | 3645 | 742 | 4707 | 736 | 5987 | 15836 | 5347 |
方法 1 (LLM: Full Contract + Full ERC)
| high | medium | low | total | |
|---|---|---|---|---|
| ERC-20 | (3,0,3659) | (83, 5, 7381) | (16,0, 533) | (102,5,11573) |
| ERC-721 | (0,0,108) | (0,0,195) | (0,0,17) | (0,0,320) |
| ERC-1155 | (0,0,4) | (0,0,31) | (0,0,8) | (0,0,43) |
| Total | (3,0,3771) | (83,5,7607) | (16,0,558) | (102,5,11936) |
方法 2 (LLM: Full Contract + Single Violated Rule)
| high | medium | low | total | |
|---|---|---|---|---|
| ERC-20 | (739, 1273) | (2037, 7788) | (823, 2789) | (3599, 11850) |
| ERC-721 | (2, 185) | (1, 105) | (0, 33) | (3, 323) |
| ERC-1155 | (4, 27) | (0, 30) | (0,0) | (4, 57) |
| Total | (745, 1485) | (2038, 7923) | (823, 2822) | (3606, 12230) |
方法 3 (LLM: Sliced Code + Single Violated Rule)
| high | medium | low | total | |
|---|---|---|---|---|
| ERC-20 | (1232, 780) | (8761, 1064) | (1794, 1818) | (11787, 3662) |
| ERC-721 | (84, 103) | (73, 33) | (3, 30) | (160, 166) |
| ERC-1155 | (11, 20) | (24, 6) | (0,0) | (35, 26) |
| Total | (1327, 903) | (8858, 1103) | (1797, 1848) | (11982, 3854) |
Manual-Inspect 数据库
| call | emit | throw | interface | assign | return | total | # of contracts | |
|---|---|---|---|---|---|---|---|---|
| ERC-20 | 0 | 57 | 48 | 35 | 1 | 4 | 145 | 30 |
方法 1 (LLM: Full Contract + Full ERC)
| high | medium | low | total | |
|---|---|---|---|---|
| ERC-20 | (16,0,40) | (21, 0, 36) | (5,2, 6) | (42,2,82) |
方法 2 (LLM: Full Contract + Single Violated Rule)
| high | medium | low | total | |
|---|---|---|---|---|
| ERC-20 | (3, 18) | (29, 30) | (30, 35) | (62, 83) |
方法 3 (LLM: Sliced Code + Single Violated Rule)
| high | medium | low | total | |
|---|---|---|---|---|
| ERC-20 | (8, 13) | (48, 11) | (54, 11) | (110, 35) |
平均代码行数
- Manual-Inspect: 303.73
- Err-Inj: 555.83
平均错误数
- Manual-Inspect: 4.83
- Err-Inj: 2.96
错误分布
| high | medium | low | |
|---|---|---|---|
| Manual-Inspect | 9.4% | 29.2 % | 61.3 % |
| Err - Inj | 14.1% | 62.9% | 23.0% |




