错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

A General Smart Contract Vulnerability Detection Framework with Self-attention Graph Pooling

  • Lihan Zou,
  • Changhao Gong,
  • Zhen Wu,
  • Jie Tan,
  • Junnan Tang,
  • Zigui Jiang,
  • Dan Li

摘要

In recent years, the increasing development of Web 3.0 has generated growing attention toward blockchain and smart contracts. However, due to their immutability, smart contracts still exhibit various vulnerabilities that hackers can exploit, resulting in significant losses. Numerous smart contracts on various blockchains, including Ethereum, have been attacked due to various vulnerabilities. The inefficiency of detecting these vulnerabilities has become a major bottleneck in advancing blockchain and smart contracts. Although detecting smart contract vulnerabilities has attracted much attention, most existing machine learning-based methods rely on adequate expert knowledge and target only specific known vulnerabilities via binary classification models. To address this limitation, our proposed approach introduced a general vulnerability detection method that can be applied to identify various common vulnerabilities via a uniform framework. We leveraged the Abstract Syntax Trees (AST) and self-attention-based graph pooling models to generate topological graphs from smart contract code analysis. We adopted Graph Neural Networks for vulnerability detection. Experimental results demonstrated that the proposed approach exhibited satisfactory performance in detecting multiple and unseen vulnerabilities compared to traditional methods.