When Deep Learning Meets Smart Contracts

08/07/2020
by   Zhipeng Gao, et al.
0

Ethereum has become a widely used platform to enable secure, Blockchain-based financial and business transactions. However, many identified bugs and vulnerabilities in smart contracts have led to serious financial losses, which raises serious concerns about smart contract security. Thus, there is a significant need to better maintain smart contract code and ensure its high reliability. In this research: (1) Firstly, we propose an automated deep learning based approach to learn structural code embeddings of smart contracts in Solidity, which is useful for clone detection, bug detection and contract validation on smart contracts. We apply our approach to more than 22K solidity contracts collected from the Ethereum blockchain, results show that the clone ratio of solidity code is at around 90 We collect a list of 52 known buggy smart contracts belonging to 10 kinds of common vulnerabilities as our bug database. Our approach can identify more than 1000 clone related bugs based on our bug databases efficiently and accurately. (2) Secondly, according to developers' feedback, we have implemented the approach in a web-based tool, named SmartEmbed, to facilitate Solidity developers for using our approach. Our tool can assist Solidity developers to efficiently identify repetitive smart contracts in the existing Ethereum blockchain, as well as checking their contract against a known set of bugs, which can help to improve the users' confidence in the reliability of the contract. We optimize the implementations of SmartEmbed which is sufficient in supporting developers in real-time for practical uses. The Ethereum ecosystem as well as the individual Solidity developer can both benefit from our research.

READ FULL TEXT

page 1

page 2

page 3

research
08/22/2019

SmartEmbed: A Tool for Clone and Bug Detection in Smart Contracts through Structural Code Embedding

Ethereum has become a widely used platform to enable secure, Blockchain-...
research
01/20/2020

Checking Smart Contracts with Structural Code Embedding

Smart contracts have been increasingly used together with blockchains to...
research
04/13/2023

Smart Contract Upgradeability on the Ethereum Blockchain Platform: An Exploratory Study

Context: Smart contracts are computerized self-executing contracts that ...
research
10/21/2022

An Empirical Study on Real Bug Fixes in Smart Contracts Projects

Blockchain uses cryptographic proof to replace trusted third parties to ...
research
04/13/2021

Coinbugs: Enumerating Common Blockchain Implementation-Level Vulnerabilities

A good amount of effort has been dedicated to surveying and systematizin...
research
05/16/2020

Why Do Smart Contracts Self-Destruct? Investigating the Selfdestruct Function on Ethereum

The Selfdestruct function is provided by Ethereum smart contracts to des...
research
05/05/2019

SIF: A Framework for Solidity Code Instrumentation and Analysis

Solidity is an object-oriented and high-level language for writing smart...

Please sign up or login with your details

Forgot password? Click here to reset