Specification is Law: Safe Creation and Upgrade of Ethereum Smart Contracts

P. Antonino, J. Ferreira, A. Sampaio, A. W. Roscoe
{"title":"Specification is Law: Safe Creation and Upgrade of Ethereum Smart Contracts","authors":"P. Antonino, J. Ferreira, A. Sampaio, A. W. Roscoe","doi":"10.48550/arXiv.2205.07529","DOIUrl":null,"url":null,"abstract":"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.","PeriodicalId":413471,"journal":{"name":"IEEE International Conference on Software Engineering and Formal Methods","volume":"3 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-05-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE International Conference on Software Engineering and Formal Methods","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.48550/arXiv.2205.07529","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

Abstract

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.
规范即法律:以太坊智能合约的安全创建和升级
智能合约是“代码即法律”范式的基石:智能合约的代码无可争议地描述了如何管理其资产——一旦创建,其代码通常是不可变的。有缺陷的智能合约是反对这种范式的实用性的最重要证据;它们都是有据可查的,并导致了价值巨额资金的资产受损。为了解决这个问题,以太坊社区提出了(i)审计/分析智能合约的工具和流程,以及(ii)设计模式,实现使合约代码可变的机制。单独地,(i)和(ii)只是部分地解决了“代码即法律”范式提出的挑战。在本文中,我们结合了(i)和(ii)的元素来创建一个系统框架,该框架从“代码即法律”转移到新的“规范即法律”范式。它允许创建和升级契约,但前提是它们必须满足相应的正式规范。该框架以\emph{受信任的部署者为}中心:一个正式验证并执行这种一致性概念的链下服务。我们对这个框架进行了原型设计,并研究了它对实现两个广泛使用的以太坊标准的合约的适用性:ERC20令牌标准和ERC1155多令牌标准,并取得了可喜的结果。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信