基于符号模型检验的智能合约业务逻辑分析
Debugging Smart Contract's Business Logic Using Symbolic Model-Checking
摘要:
智能合约是在区块链内部运行的一种特殊类型的程序。它们是不可变和透明的,提供了实现容错和抗审查服务的方法。不幸的是,它的不变性导致了一个严重的挑战,即在区块链中发布之前,确保业务逻辑和实现是正确的。几起重大事故确实表明,这项技术的用户需要特殊的工具来验证智能合约的正确性。现有的自动检查器只能检测已知的实现错误,而将业务逻辑正确性问题远远抛在一边。在这项工作中,我们提出了一个象征性的模型检验技术,以及一个正式的规格说明方法的一个子集的Solidity程序设计语言,能够表达状态属性和跟踪属性,后者构成了一个弱的类比的时间属性。我们在MiniDAO智能合约上评估了所提出的技术,MiniDAO是臭名昭著的TheDAO的年轻兄弟。我们的概念验证能够在几秒钟内检测到这个智能合约的业务逻辑中的一个重要错误。
英文摘要:
Smart contracts are a special type of programs running inside a blockchain. Immutable and transparent, they provide means to implement fault-tolerant and censorship-resistant services. Unfortunately, its immutability causes a serious challenge of ensuring that a business logic and implementation is correct upfront, before publishing in a blockchain. Several big accidents have indeed shown that users of this technology need special tools to verify smart contract correctness. Existing automated checkers are able to detect only well known implementation bugs, leaving the question of business logic correctness far aside. In this work, we present a symbolic model-checking technique along with a formal specification method for a subset of Solidity programming language that is able to express both state properties and trace properties; the latter constitutes a weak analogy of temporal properties. We evaluate the proposed technique on the MiniDAO smart contract, a young brother of notorious TheDAO. Our Proof-of-Concept was able to detect a non-trivial error in the business logic of this smart contract in a few seconds.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。