定理携带交易:确保智能合约交易安全的运行时认证

Nikolaj S. BjørnerMicrosoft Research, Ashley J. ChenNew York University Shanghai, Shuo ChenMicrosoft Research, Yang ChenMicrosoft Research, Zhongxin GuoMicrosoft Research, Tzu-Han HsuMichigan State University, Peng LiuPennsylvania State University, Nanqing LuoPennsylvania State University
{"title":"定理携带交易:确保智能合约交易安全的运行时认证","authors":"Nikolaj S. BjørnerMicrosoft Research, Ashley J. ChenNew York University Shanghai, Shuo ChenMicrosoft Research, Yang ChenMicrosoft Research, Zhongxin GuoMicrosoft Research, Tzu-Han HsuMichigan State University, Peng LiuPennsylvania State University, Nanqing LuoPennsylvania State University","doi":"arxiv-2408.06478","DOIUrl":null,"url":null,"abstract":"Security bugs and trapdoors in smart contracts have been impacting the\nEthereum community since its inception. Conceptually, the 1.45-million\nEthereum's contracts form a single \"gigantic program\" whose behaviors are\ndetermined by the complex reference-topology between the contracts. Can the\nEthereum community be assured that this gigantic program conforms to its\ndesign-level safety properties, despite unforeseeable code-level intricacies?\nStatic code verification is inadequate due to the program's gigantic scale and\nhigh polymorphism. In this paper, we present a viable technological roadmap for\nthe community toward this ambitious goal. Our technology, called\nTheorem-Carrying-Transaction (TCT), combines the benefits of concrete execution\nand symbolic proofs. Under the TCT protocol, every transaction carries a\ntheorem that proves its adherence to the specified properties in the invoked\ncontracts, and the runtime system checks the theorem before executing the\ntransaction. Once a property is specified in a contract, it can be treated\nconfidently as an unconditional guarantee made by the contract. As case\nstudies, we demonstrate that TCT secures token contracts without foreseeing\ncode-level intricacies like integer overflow and reentrancy. TCT is also\nsuccessfully applied to a Uniswap codebase, showcasing a complex decentralized\nfinance (DeFi) scenario. Our prototype incurs a negligible runtime overhead,\ntwo orders of magnitude lower than a state-of-the-art approach.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-08-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Theorem-Carrying-Transaction: Runtime Certification to Ensure Safety for Smart Contract Transactions\",\"authors\":\"Nikolaj S. BjørnerMicrosoft Research, Ashley J. ChenNew York University Shanghai, Shuo ChenMicrosoft Research, Yang ChenMicrosoft Research, Zhongxin GuoMicrosoft Research, Tzu-Han HsuMichigan State University, Peng LiuPennsylvania State University, Nanqing LuoPennsylvania State University\",\"doi\":\"arxiv-2408.06478\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Security bugs and trapdoors in smart contracts have been impacting the\\nEthereum community since its inception. Conceptually, the 1.45-million\\nEthereum's contracts form a single \\\"gigantic program\\\" whose behaviors are\\ndetermined by the complex reference-topology between the contracts. Can the\\nEthereum community be assured that this gigantic program conforms to its\\ndesign-level safety properties, despite unforeseeable code-level intricacies?\\nStatic code verification is inadequate due to the program's gigantic scale and\\nhigh polymorphism. In this paper, we present a viable technological roadmap for\\nthe community toward this ambitious goal. Our technology, called\\nTheorem-Carrying-Transaction (TCT), combines the benefits of concrete execution\\nand symbolic proofs. Under the TCT protocol, every transaction carries a\\ntheorem that proves its adherence to the specified properties in the invoked\\ncontracts, and the runtime system checks the theorem before executing the\\ntransaction. Once a property is specified in a contract, it can be treated\\nconfidently as an unconditional guarantee made by the contract. As case\\nstudies, we demonstrate that TCT secures token contracts without foreseeing\\ncode-level intricacies like integer overflow and reentrancy. TCT is also\\nsuccessfully applied to a Uniswap codebase, showcasing a complex decentralized\\nfinance (DeFi) scenario. Our prototype incurs a negligible runtime overhead,\\ntwo orders of magnitude lower than a state-of-the-art approach.\",\"PeriodicalId\":501197,\"journal\":{\"name\":\"arXiv - CS - Programming Languages\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-08-12\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Programming Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2408.06478\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.06478","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

自以太坊社区成立以来,智能合约中的安全漏洞和陷阱一直在影响着它。从概念上讲,以太坊的 145 万个合约组成了一个单一的 "巨型程序",其行为由合约之间复杂的参考拓扑结构决定。尽管存在不可预见的代码级错综复杂性,但以太坊社区能否确保这个巨型程序符合其设计级安全属性?在本文中,我们为业界提出了实现这一宏伟目标的可行技术路线图。我们的技术被称为定理携带事务(TCT),它结合了具体执行和符号证明的优点。在 TCT 协议下,每个事务都会携带一个定理,证明其符合所调用合约中的指定属性,运行时系统会在执行事务之前检查该定理。一旦在合同中指定了属性,就可以将其视为合同的无条件保证。通过案例研究,我们证明了 TCT 无需预见代码级的复杂性(如整数溢出和重入)就能保证令牌合约的安全。我们还将 TCT 成功应用于 Uniswap 代码库,展示了复杂的去中心化金融(DeFi)场景。我们的原型产生的运行时开销可以忽略不计,比最先进的方法低两个数量级。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Theorem-Carrying-Transaction: Runtime Certification to Ensure Safety for Smart Contract Transactions
Security bugs and trapdoors in smart contracts have been impacting the Ethereum community since its inception. Conceptually, the 1.45-million Ethereum's contracts form a single "gigantic program" whose behaviors are determined by the complex reference-topology between the contracts. Can the Ethereum community be assured that this gigantic program conforms to its design-level safety properties, despite unforeseeable code-level intricacies? Static code verification is inadequate due to the program's gigantic scale and high polymorphism. In this paper, we present a viable technological roadmap for the community toward this ambitious goal. Our technology, called Theorem-Carrying-Transaction (TCT), combines the benefits of concrete execution and symbolic proofs. Under the TCT protocol, every transaction carries a theorem that proves its adherence to the specified properties in the invoked contracts, and the runtime system checks the theorem before executing the transaction. Once a property is specified in a contract, it can be treated confidently as an unconditional guarantee made by the contract. As case studies, we demonstrate that TCT secures token contracts without foreseeing code-level intricacies like integer overflow and reentrancy. TCT is also successfully applied to a Uniswap codebase, showcasing a complex decentralized finance (DeFi) scenario. Our prototype incurs a negligible runtime overhead, two orders of magnitude lower than a state-of-the-art approach.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术文献互助群
群 号:481959085
Book学术官方微信