Checking Smart Contracts With Structural Code Embedding

坚固性 计算机科学 编码(集合论) 智能合约 解析 程序设计语言 词(群论) 语义学(计算机科学) 语言学 数据库事务 哲学 集合(抽象数据类型)
作者
Zhipeng Gao,Lingxiao Jiang,Xin Xia,David Lo,John Grundy
出处
期刊:IEEE Transactions on Software Engineering [IEEE Computer Society]
卷期号:47 (12): 2874-2891 被引量:134
标识
DOI:10.1109/tse.2020.2971482
摘要

Smart contracts have been increasingly used together with blockchains to automate financial and business transactions. However, many bugs and vulnerabilities have been identified in many contracts which raises serious concerns about smart contract security, not to mention that the blockchain systems on which the smart contracts are built can be buggy. Thus, there is a significant need to better maintain smart contract code and ensure its high reliability. In this paper, we propose an automated approach to learn characteristics of smart contracts in Solidity, which is useful for clone detection, bug detection and contract validation on smart contracts. Our new approach is based on word embeddings and vector space comparison. We parse smart contract code into word streams with code structural information, convert code elements (e.g., statements, functions) into numerical vectors that are supposed to encode the code syntax and semantics, and compare the similarities among the vectors encoding code and known bugs, to identify potential issues. We have implemented the approach in a prototype, named SmartEmbed. Results show that our tool can effectively identify many repetitive instances of Solidity code, where the clone ratio is around 90\%. Code clones such as type-III or even type-IV semantic clones can also be detected accurately. Our tool can identify more than 1000 clone related bugs based on our bug databases efficiently and accurately. Our tool can also help to efficiently validate any given smart contract against a known set of bugs, which can help to improve the users' confidence in the reliability of the contract. The anonymous replication packages can be accessed at: https://drive.google.com/file/d/1kauLT3y2IiHPkUlVx4FSTda-dVAyL4za/view?usp=sharing, and evaluated it with more than 22,000 smart contracts collected from the Ethereum blockchain.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
所所应助Zhao采纳,获得10
刚刚
Jack完成签到,获得积分10
1秒前
zph14204完成签到,获得积分10
1秒前
愛愛愛愛完成签到,获得积分10
1秒前
binban128完成签到,获得积分10
2秒前
weinaonao完成签到,获得积分10
2秒前
好运设计完成签到,获得积分10
6秒前
无声瀑布完成签到,获得积分10
6秒前
hhh完成签到,获得积分10
7秒前
vince完成签到 ,获得积分10
7秒前
高高的咖啡豆完成签到 ,获得积分10
7秒前
绵羊小姐应助joleisalau采纳,获得20
7秒前
大气小天鹅完成签到 ,获得积分10
8秒前
AllRightReserved应助binban128采纳,获得10
9秒前
9秒前
李华强发布了新的文献求助10
10秒前
strike完成签到,获得积分0
11秒前
科研通AI2S应助xsdpku采纳,获得10
11秒前
zyq完成签到,获得积分10
13秒前
欣于所遇完成签到,获得积分0
14秒前
这才不是我完成签到,获得积分10
15秒前
隐形觅翠完成签到,获得积分10
15秒前
zhang766完成签到 ,获得积分10
15秒前
123456qi完成签到,获得积分10
16秒前
木刻青、完成签到,获得积分10
16秒前
123完成签到,获得积分10
16秒前
Zhao发布了新的文献求助10
16秒前
B_lue完成签到 ,获得积分10
17秒前
red发布了新的文献求助10
18秒前
Liixy完成签到,获得积分10
19秒前
19秒前
JXDYYZK完成签到,获得积分10
20秒前
Jack驳回了lxf448应助
20秒前
朱洪帆完成签到,获得积分20
22秒前
Owen应助androabo采纳,获得10
23秒前
阿明完成签到 ,获得积分10
24秒前
24秒前
24秒前
kanglan完成签到,获得积分10
24秒前
wxy2011完成签到 ,获得积分10
25秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Developing Genetic Editing Tools for Lysobacter 2000
卤化钙钛矿人工突触的研究 2000
Моделирование процессов самоорганизации в кристаллообразующих системах 1000
History of U.S. Space Surveillance and Satellite Cataloging 1000
Signals, Systems, and Signal Processing 610
Fundamentals of Pharmaceutical and Biologics Regulations: A Global Perspective, Second Edition 600
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6519063
求助须知:如何正确求助?哪些是违规求助? 8311680
关于积分的说明 17770540
捐赠科研通 5621065
什么是DOI,文献DOI怎么找? 2926632
邀请新用户注册赠送积分活动 1903449
关于科研通互助平台的介绍 1764139