The growing adoption of smart contracts on blockchains poses new security risks that can lead to significant monetary loss, while existing approaches either provide no (or partial) security guarantees for smart contracts or require huge proof effort. To address this challenge, we present SciviK, a versatile framework for specifying and verifying industrial-grade smart contracts. SciviK's versatile approach extends previous efforts with three key contributions: (i) an expressive annotation system enabling built-in directives for vulnerability pattern checking, neural-based loop invariant inference, and the verification of rich properties of real-world smart contracts (ii) a fine-grained model for the Ethereum Virtual Machine (EVM) that provides low-level execution semantics, (iii) an IR-level verification framework integrating both SMT solvers and the Coq proof assistant. We use SciviK to specify and verify security properties for 12 benchmark contracts and a real-world Decentralized Finance (DeFi) smart contract. Among all 158 specified security properties (in six types), 151 properties can be automatically verified within 2 seconds, five properties can be automatically verified after moderate modifications, and two properties are manually proved with around 200 lines of Coq code.
翻译:越来越多地采用关于链条的智能合同带来了新的安全风险,可能导致巨大的货币损失,而现有的办法要么不为智能合同提供(或部分)安全保障,要么需要巨大的证明努力。为了应对这一挑战,我们向SciviK展示了用于具体和核查工业级智能合同的多用途框架,SciviK的多用途办法扩大了以往的努力,并作出了三项关键贡献:(一) 一种表达式说明系统,能够对脆弱性模式检查、神经基循环反复回推以及核实真实世界智能合同的丰富特性等作出内在指示;(二) 一种精细微的虚拟机器(Etheem虚拟机器)模型,提供低级执行语义学,(三) IR级核查框架,将SMT解决者和Coq验证助理结合起来。我们利用SciviK来为12项基准合同和真实世界分权金融(DeFi)智能合同规定和安保特性。在所有158项具体规定的安全特性(6种类型)中,151种财产可在2秒钟内自动核实,5种财产可以在中度修改后自动核实,两套手动财产。