Testing Smart Contracts Gets Smarter

12/10/2019
by   Erfan Andesta, et al.
0

Smart contracts are immutable, verifiable, and autonomous pieces of code that can be deployed and run on blockchains like Ethereum. Duo to the immutability nature of blockchains, no change is possible on a deployed smart contract or transaction. On the other hand, there are millions of dollars carried by smart contrancts in Ethereum blockchain, and hence, a faulty smart contract can lead to a huge monetary loss. Therefore, it is important for smart contract developers to fully test and check the correctness of their code before deploying it to the blockchain. In this paper, we propose a testing mechansim for smart contracts in Solidity language, based on mutation testing. We analyzed a comprehensive list of known bugs in Solidity smart contracts, and designed 10 classes of mutation operators inspired by the real faults. Our experimental results show that our proposed mutation operators can regenerate 10 of 15 famous faulty smart contracts, which have resulted in millions of dollars loss. The results show the effectiveness of our proposed mutation operators in detecting real faults in Solidity smart contracts. We have also extended universal mutator with our mutation operators, so that it can automacially generate mutants for smart contracts written in Solidity.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/10/2019

Mutation Testing for Ethereum Smart Contract

Smart contract is a special program that manages digital assets on block...
research
05/08/2021

SuMo: A Mutation Testing Strategy for Solidity Smart Contracts

Smart Contracts are software programs that are deployed and executed wit...
research
09/27/2019

Gas limit aware mutation testing of smart contracts at scale

The blockchain is a key technology that has been adopted in many applica...
research
06/20/2020

Using Fault Injection to Assess Blockchain Systems in Presence of Faulty Smart Contracts

Blockchain has become particularly popular due to its promise to support...
research
01/30/2023

Neural-FEBI: Accurate Function Identification in Ethereum Virtual Machine Bytecode

Millions of smart contracts have been deployed onto the Ethereum platfor...
research
04/11/2023

Analyzing the Impact of Elusive Faults on Blockchain Reliability

Blockchain recently became very popular due to its use in cryptocurrenci...
research
07/05/2022

Can We Effectively Use Smart Contracts to Stipulate Time Constraints?

Smart contracts provide the means to stipulate rules of interaction betw...

Please sign up or login with your details

Forgot password? Click here to reset