arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1905.01467cs.SE
收藏

定义以太坊上的智能合约缺陷

Defining Smart Contract Defects on Ethereum

Jiachi Chen, Xin Xia, David Lo, John Grundy, Daniel Xiapu Luo, Ting Chen

摘要:

智能合约是在区块链上运行的程序。它们是不可改变的,因此一旦部署就不能修补错误。因此,在部署之前确保它们没有错误并且设计良好至关重要。合约缺陷是智能合约中的错误、缺陷或故障,导致其产生不正确或意外的结果,或以非预期的方式表现。检测合同缺陷是避免潜在错误并改进现有代码设计的一种方法。因为智能合约包含许多独特的功能,例如气体系统。去中心化,重要的是要找到智能合约指定的缺陷。为了填补这一空白,我们从以太坊StackExchange收集了与智能合约相关的帖子,以及现实世界的智能合约。我们手动分析了这些帖子和合同;使用它们来定义20种合同缺陷。我们将它们分为潜在的安全性、可用性、性能、可维护性和可重用性问题。为了验证从业者是否认为这些合同是有害的,我们创建了一个在线调查,并收到了来自32个不同国家的138份回复。反馈显示,这些合约缺陷是有害的,消除它们将提高智能合约的质量和健壮性。我们在587个真实世界的智能合约中手动识别了我们定义的合约缺陷,并公开发布了我们的数据集。最后,总结了合同瑕疵可能造成的五种影响。这些帮助开发人员更好地了解缺陷的症状和删除优先级。

英文摘要:

Smart contracts are programs running on a blockchain. They are immutable to change, and hence can not be patched for bugs once deployed. Thus it is critical to ensure they are bug-free and well-designed before deployment. A Contract defect is an error, flaw or fault in a smart contract that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. The detection of contract defects is a method to avoid potential bugs and improve the design of existing code. Since smart contracts contain numerous distinctive features, such as the gas system. decentralized, it is important to find smart contract specified defects. To fill this gap, we collected smart-contract-related posts from Ethereum StackExchange, as well as real-world smart contracts. We manually analyzed these posts and contracts; using them to define 20 kinds of contract defects. We categorized them into indicating potential security, availability, performance, maintainability and reusability problems. To validate if practitioners consider these contract as harmful, we created an online survey and received 138 responses from 32 different countries. Feedback showed these contract defects are harmful and removing them would improve the quality and robustness of smart contracts. We manually identified our defined contract defects in 587 real world smart contract and publicly released our dataset. Finally, we summarized 5 impacts caused by contract defects. These help developers better understand the symptoms of the defects and removal priority.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑