一句话:基于KEVM形式语义与K框架可达性逻辑,构建并优化了EVM字节码演绎验证器,成功验证多个知名智能合约。
本文提出一个针对以太坊虚拟机(EVM)字节码的形式化验证工具。为精确推理EVM字节码的所有可能行为,作者采用KEVM——EVM的完整形式语义,并实例化K框架的可达性逻辑定理证明器,从而得到一个构造正确的EVM演绎验证器。为提升可扩展性,作者进一步引入EVM专用的抽象与引理对验证器进行优化。该验证器已被用于验证多个高知名度智能合约,包括ERC20代币、以太坊Casper以及DappHub MakerDAO合约,表明其具备处理真实复杂合约的能力,为EVM字节码的形式化验证提供了实用且可扩展的途径。
In this paper, we present a formal verification tool for the Ethereum Virtual Machine (EVM) bytecode. To precisely reason about all possible behaviors of the EVM bytecode, we adopted KEVM, a complete formal semantics of the EVM, and instantiated the K-framework's reachability logic theorem prover to generate a correct-by-construction deductive verifier for the EVM. We further optimized the verifier by introducing EVM-specific abstractions and lemmas to improve its scalability. Our EVM verifier has been used to verify various high-profile smart contracts including the ERC20 token, Ethereum Casper, and DappHub MakerDAO contracts.