Towards Assessing the Real-World Impact of Defects in Blockchain-Based Smart Contracts
Michael Hettmer, Benedikt Severin, Florian Blum, Volker Gruhn · 2023
Blockchain-based smart contracts enable a wide range of use cases by relying on trustless and guaranteed code execution. The immutability of blockchains means that defects in smart contracts cannot be fixed once the code has been deployed. Previous research has focused on identifying defects and developing tools to improve defect detection. However, several existing blockchain defect datasets rely solely on expert knowledge or static code analysis. They do not provide an objective assessment of the real-world impact of defects. We show how blockchain transactions and execution traces can support an objective evaluation of the impact of a smart contract defect. As a foundation for future research, we propose three novel blockchain-specific metrics. Using the defect dataset SmartBugs, we demonstrate the computation of the metrics and the use cases that can benefit from them. This example focuses on five distinct types of the commonly occurring reentrancy vulnerability defect as detected by Slither, Manticore and Osiris.