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
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
lizard956完成签到 ,获得积分10
刚刚
1秒前
CipherSage应助姚驰采纳,获得10
1秒前
雨辰完成签到 ,获得积分10
2秒前
ichi发布了新的文献求助30
2秒前
xiaowan完成签到,获得积分10
4秒前
5秒前
一颗杨梅发布了新的文献求助10
6秒前
bo发布了新的文献求助10
6秒前
6秒前
阳光海云发布了新的文献求助10
6秒前
7秒前
华仔应助hello_25baby采纳,获得10
7秒前
7秒前
7秒前
8秒前
9秒前
9秒前
mly完成签到,获得积分10
10秒前
10秒前
11秒前
公冶君浩完成签到,获得积分10
11秒前
kuiba完成签到 ,获得积分10
12秒前
逆风给逆风的求助进行了留言
12秒前
rabpig应助Ada1989采纳,获得10
12秒前
王大帅哥完成签到,获得积分0
12秒前
seven发布了新的文献求助10
15秒前
姚驰发布了新的文献求助10
16秒前
kkk完成签到 ,获得积分10
16秒前
17秒前
17秒前
充电宝应助13504544355采纳,获得10
17秒前
17秒前
科研渣渣完成签到,获得积分10
17秒前
丘比特应助wqx采纳,获得10
17秒前
LBQ完成签到,获得积分10
18秒前
浩然完成签到 ,获得积分10
19秒前
Bean发布了新的文献求助30
19秒前
LiuHD完成签到,获得积分10
19秒前
19秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Developing Genetic Editing Tools for Lysobacter 2000
卤化钙钛矿人工突触的研究 2000
Моделирование процессов самоорганизации в кристаллообразующих системах 1000
History of U.S. Space Surveillance and Satellite Cataloging 1000
Adhesion Science: Principles & Practice 800
Signals, Systems, and Signal Processing 610
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6519879
求助须知:如何正确求助?哪些是违规求助? 8312890
关于积分的说明 17777813
捐赠科研通 5621998
什么是DOI,文献DOI怎么找? 2926879
邀请新用户注册赠送积分活动 1903779
关于科研通互助平台的介绍 1764293