A Detection Method for Scarcity Defect of Blockchain Digital Asset based on Invariant Analysis
【Author】 Sun, Jinlei; Huang, Song; Wang, Xingya; Wang, Meijuan; Du, Jinhu
【Source】2022 IEEE 22ND INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY, QRS
【影响因子】
【Abstract】Blockchain Digital Assets (BDAs) are intangible assets issued based on blockchain, providing a new paradigm for managing digital assets. Smart contracts are programs running on the blockchain and enhance the flexibility of BDA in a programmable way. However, scarcity defects in smart contracts can lead to abnormal changes in the number of BDA and affect their worth. Software invariants are logical assertions that a program fragment needs to remain faithful during execution and work well in defect detection. This paper studies the scarcity defect detection method of smart contract digital assets based on invariant analysis for the first time. First, we point out eight scarcity defects in three categories and describe their examples. Next, we propose two invariants-transfer invariant and swap invariant-that should be maintained in digital assets' management and transaction process. Then, we use the two invariants as test oracles and propose an oracle-based method to detect scarcity defects in smart contract. Finally, we evaluate the proposed method on a real-world smart contract dataset. The experimental results show that our method can effectively detect scarcity defects in smart contracts and improve the scarcity defect detection capability of existing smart contract testing tools.
【Keywords】Blockchain Digital Assets; smart contract; scarcity defects; invariants; test oracle
【发表时间】2022
【收录时间】2023-06-03
【文献类型】理论模型
【主题类别】
区块链治理-技术治理-智能合约漏洞检测
评论