SCGformer: Smart contract vulnerability detection based on control flow graph and transformer

IET Blockchain Pub Date : 2023-09-06 DOI:10.1049/blc2.12046
KeXin Gong, Xiangmei Song, Na Wang, Chunyang Wang, Huijuan Zhu
{"title":"SCGformer: Smart contract vulnerability detection based on control flow graph and transformer","authors":"KeXin Gong,&nbsp;Xiangmei Song,&nbsp;Na Wang,&nbsp;Chunyang Wang,&nbsp;Huijuan Zhu","doi":"10.1049/blc2.12046","DOIUrl":null,"url":null,"abstract":"<p>The security of smart contract has always been one of the significant problems in blockchain. As shown in previous studies, vulnerabilities in smart contracts can lead to unpredictable losses. With the rapid growth of the number of smart contracts, more and more data driven detection technologies based on machine learning have been proposed. However, some state-of-the-art approaches mainly rely on the source code of smart contract. These methods are limited by the openness of the source code and the version of the programming language. To address this problem, we propose a novel vulnerability detection method based on transformer by constructing the control flow graph (CFG) of smart contracts operation codes (opcodes), which shields the difference of various versions of program language. Extensive experiments are conducted to evaluate the effectiveness of the proposed method on the authors' own collected dataset. The experimental results show that the proposed method achieves 94.36% accuracy in vulnerability detection, which performs better than other state-of-the-art methods.</p>","PeriodicalId":100650,"journal":{"name":"IET Blockchain","volume":"3 4","pages":"213-221"},"PeriodicalIF":0.0000,"publicationDate":"2023-09-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://ietresearch.onlinelibrary.wiley.com/doi/epdf/10.1049/blc2.12046","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IET Blockchain","FirstCategoryId":"1085","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1049/blc2.12046","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The security of smart contract has always been one of the significant problems in blockchain. As shown in previous studies, vulnerabilities in smart contracts can lead to unpredictable losses. With the rapid growth of the number of smart contracts, more and more data driven detection technologies based on machine learning have been proposed. However, some state-of-the-art approaches mainly rely on the source code of smart contract. These methods are limited by the openness of the source code and the version of the programming language. To address this problem, we propose a novel vulnerability detection method based on transformer by constructing the control flow graph (CFG) of smart contracts operation codes (opcodes), which shields the difference of various versions of program language. Extensive experiments are conducted to evaluate the effectiveness of the proposed method on the authors' own collected dataset. The experimental results show that the proposed method achieves 94.36% accuracy in vulnerability detection, which performs better than other state-of-the-art methods.

Abstract Image

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
SCGformer:基于控制流图和变压器的智能合约漏洞检测
智能合约的安全性一直是区块链的重要问题之一。正如之前的研究表明,智能合约中的漏洞可能导致不可预测的损失。随着智能合约数量的快速增长,越来越多基于机器学习的数据驱动检测技术被提出。然而,一些最先进的方法主要依赖于智能合约的源代码。这些方法受到源代码的开放性和编程语言版本的限制。针对这一问题,本文提出了一种基于变压器的漏洞检测方法,通过构建智能合约操作码(opcodes)的控制流图(CFG)来屏蔽不同版本程序语言的差异。在作者自己收集的数据集上进行了大量的实验来评估所提出方法的有效性。实验结果表明,该方法的漏洞检测准确率达到94.36%,优于现有的漏洞检测方法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
CiteScore
1.80
自引率
0.00%
发文量
0
期刊最新文献
Blockchain transaction data mining and its applications Research on airport baggage anomaly retention detection technology based on machine vision, edge computing, and blockchain Data‐sharing strategies in medical consortium based on master‐slave multichain and federated learning RON‐based cross‐chain routing optimization strategy in metaverse Leveraging ontochains for distributed public transit ticketing: An investigation with the system for ticketing ubiquity with blockchains
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1