Smart contracts deployed on blockchains such as Ethereum routinely manage large amounts of assets, making their security critical. Empirical studies show that real-world attacks often exploit flaws in the business logic of contracts that unfold across multiple transactions, such as liquidity or front-running attacks. Detecting these attacks requires reasoning about expressive temporal properties beyond the capabilities of existing analysis tools. In this paper, we present an automated approach to the formal verification of smart contracts, enabling the specification and verification of complex temporal properties. Our approach provides a fully automated encoding into Lustre -- the specification language supported by the Kind 2 model checker -- of an expressive subset of Solidity contracts and temporal specifications based on first-order Hennessy-Milner Logic. This encoding allows us to leverage Kind 2 to determine whether the contract respects the specification or not. We implement our approach in a toolchain that integrates the translation and verification steps, and we evaluate its effectiveness and performance on a benchmark of smart contracts and temporal properties capturing complex attack scenarios. Our results show that the proposed approach can effectively verify non-trivial temporal properties of smart contracts and detect violations that are beyond the reach of existing analysis tools.


翻译:部署在以太坊等区块链上的智能合约通常管理着大量资产,因此其安全性至关重要。实证研究表明,现实世界中的攻击往往利用合约业务逻辑中的缺陷,这些缺陷会跨多个交易展开,例如流动性攻击或抢先交易攻击。检测这些攻击需要对超越现有分析工具能力的、具有表达性的时序性质进行推理。在本文中,我们提出了一种自动化智能合约形式化验证方法,支持复杂时序性质的规约与验证。我们的方法提供了一种全自动编码方案,可将Solidity合约的一个具有表达力的子集以及基于一阶Hennessy-Milner逻辑的时序规约编码至Lustre语言——即Kind 2模型检查器所支持的规约语言。该编码使我们能够利用Kind 2判定合约是否满足规约。我们实现了一个集成翻译与验证步骤的工具链,并在涵盖复杂攻击场景的智能合约与时序性质基准上评估了其有效性与性能。结果表明,所提出的方法能够有效验证智能合约的非平凡时序性质,并检测出现有分析工具无法识别的违规行为。

0
下载
关闭预览

相关内容

【2023新书】工业4.0中的人工智能和区块链, 333页pdf
专知会员服务
64+阅读 · 2023年9月18日
《区块链和量子计算》MITRE公司
专知会员服务
26+阅读 · 2023年1月4日
《网络拦截--博弈论方法》美国MITRE公司
专知会员服务
34+阅读 · 2022年8月19日
专知会员服务
34+阅读 · 2021年5月8日
《人工智能安全测评白皮书》,99页pdf
专知
36+阅读 · 2022年2月26日
智能合约的形式化验证方法研究综述
专知
16+阅读 · 2021年5月8日
区块链隐私保护研究综述——祝烈煌详解
计算机研究与发展
23+阅读 · 2018年11月28日
【智能制造】德勤:预测性维护和智能工厂
产业智能官
11+阅读 · 2018年11月27日
基于强化学习的量化交易框架
机器学习研究会
30+阅读 · 2018年2月22日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
8+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
10+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关基金
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
19+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员