Smart contracts are the building blocks of the "code is law" paradigm: the smart contract's code indisputably describes how its assets are to be managed - once it is created, its code is typically immutable. Faulty smart contracts present the most significant evidence against the practicality of this paradigm; they are well-documented and resulted in assets worth vast sums of money being compromised. To address this issue, the Ethereum community proposed (i) tools and processes to audit/analyse smart contracts, and (ii) design patterns implementing a mechanism to make contract code mutable. Individually, (i) and (ii) only partially address the challenges raised by the "code is law" paradigm. In this paper, we combine elements from (i) and (ii) to create a systematic framework that moves away from "code is law" and gives rise to a new "specification is law" paradigm. It allows contracts to be created and upgraded but only if they meet a corresponding formal specification. The framework is centered around \emph{a trusted deployer}: an off-chain service that formally verifies and enforces this notion of conformance. We have prototyped this framework, and investigated its applicability to contracts implementing two widely used Ethereum standards: the ERC20 Token Standard and ERC1155 Multi Token Standard, with promising results.
翻译:智能合同是“ 代码就是法律” 范式的构件:智能合同的编码无可争议地描述了如何管理其资产—— 一旦创建, 它的编码通常是不可改变的。 错误的智能合同提供了与这一范式实用性相比的最重要证据; 它们有详细的记录, 并导致价值巨大的资产受损。 为了解决这个问题, Etheyum 社区提议 (一) 审计/分析智能合同的工具和程序, 以及 (二) 实施使合同代码变异的机制的设计模式。 个人, (一) 和 (二) 仅部分地应对“ 代码就是法律” 范式带来的挑战。 在本文件中, 我们将(一) 和 (二) 的元素结合起来, 以建立一个系统化的框架, 远离“ 代码就是法律”, 并产生一个新的“ 具体化是法律” 范式。 它允许合同的创建和升级, 但只有在符合相应的正式规格的情况下。 框架以\ emph{ a 信任的部署者为中心。 个人, (一) 仅部分解决“ 守则就是法律” 提出的挑战。 在本文件中, 我们从 (一) ) 和 (二) 创建了“ 标准 Eum Cental Er) 执行“ 标准” 20 的选项框架。