基于时间自动机的比特币合约建模
Modeling Bitcoin Contracts by Timed Automata
摘要:
比特币是一种点对点加密货币系统。自2008年推出以来,比特币获得了显著的普及,主要是由于其以下特性:(1)交易费用非常低,(2)它不受任何中央机构的控制,这特别意味着没有人可以“印刷”货币来产生通货膨胀。此外,交易语法允许创建所谓的合同,其中一些相互不信任的各方参与协议,共同执行一些金融任务,并且这个过程的公平性由比特币的属性保证。虽然比特币合约在数字经济中有几个潜在的应用,但到目前为止,它们还没有在现实生活中广泛使用。这部分是因为它们的创建和分析都很麻烦,因此使用起来很危险。在本文中,我们建议纠正这个问题,使用最初开发的计算机辅助分析的硬件和软件系统,特别是那些基于时间自动机的方法。更具体地说,我们提出了一个使用UPPAAL模型检查器中的时间自动机对比特币合约进行建模的框架。我们的方法是通用的,可以用来模拟几个合同。作为概念验证,我们使用这个框架来模拟我们最近之前工作中的一些比特币合约。然后,我们在UPPAAL中自动验证它们的安全性,发现(并纠正)一些手动分析难以发现的细微错误。我们希望我们的工作能引起形式化建模研究人员对比特币合约验证问题的关注,并引发更多关于这一主题的研究。
英文摘要:
Bitcoin is a peer-to-peer cryptographic currency system. Since its introduction in 2008, Bitcoin has gained noticeable popularity, mostly due to its following properties: (1) the transaction fees are very low, and (2) it is not controlled by any central authority, which in particular means that nobody can "print" the money to generate inflation. Moreover, the transaction syntax allows to create the so-called contracts, where a number of mutually-distrusting parties engage in a protocol to jointly perform some financial task, and the fairness of this process is guaranteed by the properties of Bitcoin. Although the Bitcoin contracts have several potential applications in the digital economy, so far they have not been widely used in real life. This is partly due to the fact that they are cumbersome to create and analyze, and hence risky to use. In this paper we propose to remedy this problem by using the methods originally developed for the computer-aided analysis for hardware and software systems, in particular those based on the timed automata. More concretely, we propose a framework for modeling the Bitcoin contracts using the timed automata in the UPPAAL model checker. Our method is general and can be used to model several contracts. As a proof-of-concept we use this framework to model some of the Bitcoin contracts from our recent previous work. We then automatically verify their security in UPPAAL, finding (and correcting) some subtle errors that were difficult to spot by the manual analysis. We hope that our work can draw the attention of the researchers working on formal modeling to the problem of the Bitcoin contract verification, and spark off more research on this topic.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。