Deductive Verification of Smart Contracts with Dafny

F. Cassez, Joanne Fuller, H. M. A. Quiles
{"title":"Deductive Verification of Smart Contracts with Dafny","authors":"F. Cassez, Joanne Fuller, H. M. A. Quiles","doi":"10.48550/arXiv.2208.02920","DOIUrl":null,"url":null,"abstract":". We present a methodology to develop verified smart contracts. We write smart contracts, their specifications and implementations in the verification-friendly language Dafny . In our methodology the ability to write specifications, implementations and to reason about correctness is a primary concern. We propose a simple, concise yet powerful solution to reasoning about contracts that have external calls . This includes arbitrary re-entrancy which is a major source of bugs and attacks in smart contracts. Although we do not yet have a compiler from Dafny to EVM bytecode, the results we obtain on the Dafny code can reasonably be assumed to hold on Solidity code: the translation of the Dafny code to Solidity is straightforward. As a result our approach can readily be used to develop and deploy safer contracts.","PeriodicalId":209229,"journal":{"name":"International Workshop on Formal Methods for Industrial Critical Systems","volume":"93 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-08-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Workshop on Formal Methods for Industrial Critical Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.48550/arXiv.2208.02920","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

Abstract

. We present a methodology to develop verified smart contracts. We write smart contracts, their specifications and implementations in the verification-friendly language Dafny . In our methodology the ability to write specifications, implementations and to reason about correctness is a primary concern. We propose a simple, concise yet powerful solution to reasoning about contracts that have external calls . This includes arbitrary re-entrancy which is a major source of bugs and attacks in smart contracts. Although we do not yet have a compiler from Dafny to EVM bytecode, the results we obtain on the Dafny code can reasonably be assumed to hold on Solidity code: the translation of the Dafny code to Solidity is straightforward. As a result our approach can readily be used to develop and deploy safer contracts.
Dafny智能合约的演绎验证
. 我们提出了一种开发经过验证的智能合约的方法。我们用验证友好型语言Dafny编写智能合约及其规范和实现。在我们的方法论中,编写规范、实现和对正确性进行推理的能力是主要关注的问题。我们提出了一个简单,简洁但强大的解决方案来推理具有外部调用的契约。这包括任意重入,这是智能合约中漏洞和攻击的主要来源。虽然我们还没有从Dafny到EVM字节码的编译器,但我们可以合理地假设Dafny代码上获得的结果保留在Solidity代码上:将Dafny代码转换为Solidity是很简单的。因此,我们的方法可以很容易地用于开发和部署更安全的合约。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信
小红书