Please use this identifier to cite or link to this item: http://hdl.handle.net/10397/99843
PIRA download icon_1.1View/Download Full Text
Title: BSHUNTER : detecting and tracing defects of bitcoin scripts
Authors: Zheng, P
Luo, X 
Zheng, Z
Issue Date: Jul-2023
Source: 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE), Melbourne, Australia, 14-20 May 2023, p. 307-318
Abstract: Supporting the most popular cryptocurrency, the Bitcoin platform allows its transactions to be programmable via its scripts. Defects in Bitcoin scripts will make users lose their bitcoins. However, there are few studies on the defects of Bitcoin scripts. In this paper, we conduct the first systematic investigation on the defects of Bitcoin scripts through three steps, including defect definition, defect detection, and exploitation tracing. First, we define six typical defects of scripts in Bitcoin history, namely unbinded-txid, simple-key, useless-sig, uncertain-sig, impossible-key, and never-true. Three are inspired by the community, and three are new from us. Second, we develop a tool to discover Bitcoin scripts with any of typical defects based on symbolic execution and enhanced by historical exact scripts. By analyzing all Bitcoin transactions from Oct. 2009 to Aug. 2022, we find that 383,544 transaction outputs are paid to the Bitcoin scripts with defects. The total amount of them is 3,115.43 BTC, which is around 60 million dollars at present. Third, in order to trace the exploitation of the defects, we instrument the Bitcoin VM to record the traces of the real-world spending transactions of the buggy scripts. We find that 84,130 output scripts are exploited. The implementation and non-harmful datasets are released.
Keywords: Bitcoin
Blockchain
Smart contract
ISBN: 978-1-6654-5701-9 (Electronic)
978-1-6654-5702-6 (Print on Demand(PoD))
DOI: 10.1109/ICSE48619.2023.00037
Description: 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE), 14-20 May 2023, Melbourne, Australia
Rights: © 2023 IEEEPersonal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.
The following publication P. Zheng, X. Luo and Z. Zheng, "BSHUNTER: Detecting and Tracing Defects of Bitcoin Scripts," 2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE), Melbourne, Australia, 2023, pp. 307-318 is available at https://doi.org/10.1109/ICSE48619.2023.00037.
Appears in Collections:Conference Paper

Files in This Item:
File Description SizeFormat 
Zheng_BSHUNTER_Detecting_Tracing.pdfPre-Published version22.59 MBAdobe PDFView/Open
Open Access Information
Status open access
File Version Final Accepted Manuscript
Access
View full-text via PolyU eLinks SFX Query
Show full item record

Page views

127
Citations as of Apr 14, 2025

Downloads

274
Citations as of Apr 14, 2025

Google ScholarTM

Check

Altmetric


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.