Skip to main content
QUICK REVIEW

[论文解读] A Hybrid Formal Verification System in Coq for Ensuring the Reliability and Security of Ethereum-based Service Smart Contracts

Zheng Yang, Hang Lei|arXiv (Cornell University)|Feb 23, 2019
Security and Verification in Computing参考文献 38被引用 5
一句话总结

本文提出 FSPVM-E,一种在 Coq 中实现的混合形式化验证系统,用于在 Solidity 源代码层面验证以太坊智能合约。通过利用执行-验证同构性,将符号执行与高阶逻辑定理证明相结合,该系统实现了对可靠性与安全属性的自动化、形式化验证,包括检测标准漏洞以及验证 ERC20 兼容性。

ABSTRACT

This paper reports on the development of a formal symbolic process virtual machine (FSPVM) denoted as FSPVM-E for verifying the reliability and security of Ethereum-based services at the source code level of smart contracts, and a Coq proof assistant is employed for both programming the system and for proving its correctness. The current version of FSPVM-E adopts execution-verification isomorphism, which is an application extension of Curry-Howard isomorphism, as its fundamental theoretical framework to combine symbolic execution and higher-order logic theorem proving. The four primary components of FSPVM-E include a general, extensible, and reusable formal memory framework, an extensible and universal formal intermediate programming language denoted as Lolisa, which is a large subset of the Solidity programming language using generalized algebraic datatypes, the corresponding formally verified interpreter of Lolisa, denoted as FEther, and assistant tools and libraries. The self-correctness of all components is certified in Coq. Currently, FSPVM-E supports the ERC20 token standard, and can automatically and symbolically execute Ethereum-based smart contracts, scan their standard vulnerabilities, and verify their reliability and security properties with Hoare-style logic in Coq. To the best of authors' knowledge, the present work represents the first hybrid formal verification system implemented in Coq for Ethereum smart contracts that is applied at the Solidity source code level.

研究动机与目标

  • 为以太坊服务系统中智能合约的形式化验证提供关键支持。
  • 开发一种系统,确保智能合约在源代码层面的正确性与安全性,防止运行时故障与攻击。
  • 在统一的形式化验证框架中,整合符号执行与高阶逻辑定理证明。
  • 提供一个自修正、可扩展的验证栈,支持可重用组件。
  • 支持对标准智能合约模式(如 ERC20 代币兼容性)的验证,使用 Coq 中的形式化证明。

提出的方法

  • 该系统基于在 Coq 中完全实现的形式化符号过程虚拟机(FSPVM-E),支持端到端验证。
  • 采用执行-验证同构性——柯里-霍华德同构性的推广——以统一符号执行与高阶逻辑推理。
  • 定义了一种领域特定的中间语言 Lolisa,作为 Solidity 的一个精确子集,使用广义代数数据类型实现精确语义。
  • 形式化验证的解释器 FEther 以符号方式执行 Lolisa 程序,确保执行语义的正确性。
  • 一个可重用的形式化内存框架支持对以太坊状态与存储的精确建模。
  • 系统集成辅助工具与库,自动化验证霍尔风格逻辑属性,并检测标准漏洞。

实验结果

研究问题

  • RQ1能否在 Coq 中构建一个混合形式化验证系统,支持以太坊智能合约的符号执行与高阶逻辑定理证明?
  • RQ2如何有效应用执行-验证同构性,以统一智能合约验证中的符号执行与形式化证明?
  • RQ3形式化验证的中间语言(Lolisa)在多大程度上能准确建模 Solidity 语义,同时支持自动化验证?
  • RQ4该系统能否自动检测已知漏洞,并形式化验证 ERC20 兼容合约的安全性与可靠性属性?
  • RQ5构建一个自修正、可扩展的验证栈是否可行,其中所有组件均在 Coq 中形式化认证?

主要发现

  • FSPVM-E 是首个在 Coq 中实现的、在 Solidity 源代码层面运行的混合形式化验证系统,专用于以太坊智能合约。
  • FSPVM-E 的所有组件,包括内存模型、Lolisa 语言和 FEther 解释器,均在 Coq 内部形式化验证其正确性。
  • 该系统成功支持以太坊智能合约的符号执行,并能检测标准漏洞,如重入攻击与整数溢出问题。
  • FSPVM-E 支持使用霍尔风格逻辑对可靠性与安全性属性进行形式化验证,所有证明均在 Coq 中完成。
  • 该系统已在 ERC20 代币合约上进行验证,证明其能够通过形式化证明验证标准兼容性。
  • 执行-验证同构性的使用实现了符号执行与定理证明的无缝集成,显著提升了自动化程度与逻辑严谨性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。