An Empirical Study on Real Bug Fixes in Smart Contracts Projects

10/21/2022
by   Yilin Wang, et al.
0

Blockchain uses cryptographic proof to replace trusted third parties to ensure the correctness of the information, allowing any two willing parties to transact directly with each other. Smart contracts are pieces of code that reside inside the blockchains and can be triggered to execute any transaction when specifically predefined conditions are satisfied. Being commonly used for commercial transactions in blockchain makes the security of smart contracts particularly important. Over the last few years, we have seen a great deal of academic and practical interest in detecting and repairing the vulnerabilities in smart contracts developed for the Ethereum blockchain. In this paper, we conduct an empirical study on historical bug fixing versions of 46 real-world smart contracts projects from Github, providing a multi-faceted discussion. In this paper, we mainly explore the following four questions: File Type and Amount, Fix Complexity, Bug distribution, and Fix Patches. By analyzing the file type, amount, and fix complexity, we find that about 80 bug-related commits modified no more than one solidity source file to fix bugs. Up to 80 actions. Modification is the mostly used fix action, which involves three lines of code on average. By using the analysis tool Mythril to detect the vulnerabilities, we find that nearly 20 had or have had vulnerabilities. We finally find that the developers may not put much attention to fixing vulnerabilities reported by Mythril completely or avoid introducing them again. Because vulnerabilities that have a high repair percentage usually have a high rate to be introduced again.

READ FULL TEXT

page 6

page 11

page 12

page 13

research
08/07/2020

When Deep Learning Meets Smart Contracts

Ethereum has become a widely used platform to enable secure, Blockchain-...
research
10/23/2021

Diving Into Blockchain's Weaknesses: An Empirical Study of Blockchain System Vulnerabilities

Blockchain is an emerging technology for its decentralization and the ca...
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/26/2021

Vulnerabilities and Open Issues of Smart Contracts: A Systematic Mapping

Smart Contracts (SCs) are programs stored in a Blockchain to ensure agre...
research
06/07/2023

An Empirical Study of Impact of Solidity Compiler Updates on Vulnerabilities in Ethereum Smart Contracts

Vulnerabilities of Ethereum smart contracts often cause serious financia...
research
04/13/2021

Coinbugs: Enumerating Common Blockchain Implementation-Level Vulnerabilities

A good amount of effort has been dedicated to surveying and systematizin...

Please sign up or login with your details

Forgot password? Click here to reset