At present, millions of Ethereum smart contracts are created per year and become attractive targets for financially motivated attackers. However, existing analyzers are not sufficient to analyze the financial security of massive contracts precisely. In this paper, we propose and implement FASVERIF, an automated analyzer for fine-grained analysis of smart contracts' financial security. On the one hand, FASVERIF automatically generates models to be verified against security properties of smart contracts. On the other hand, our analyzer automatically generates the security properties, which is different from existing approaches of formal verifications. Specifically, we propose two types of security properties, invariant properties and equivalence properties, which can be used to detect various types of finance-related vulnerabilities and can be automatically generated based on our statistical analysis. As a result, FASVERIF can automatically process source code of smart contracts, and uses formal methods whenever possible to simultaneously maximize its accuracy. We also prove the soundness of verifying our properties using our translated model based on a custom semantics of Solidity. We evaluate FASVERIF on a vulnerabilities dataset of 548 contracts by comparing it with other automatic tools. Our evaluation shows that FASVERIF greatly outperforms the representative tools using different technologies, with respect to accuracy and coverage of types of vulnerabilities.
翻译:目前,数百万Eceenum智能合同每年创建,成为有财政动机的袭击者具有吸引力的目标,然而,现有的分析师不足以准确分析大规模合同的财务安全性。我们在本文件中提议并实施FASVERIF,这是一个对智能合同财务安全性进行精细分析的自动分析师。一方面,FASVERIF自动生成模型,以对照智能合同的安全性能进行核查。另一方面,我们的分析师自动生成安全性能,这与现有的正式核查方法不同。具体地说,我们提出两类安全性能,即不易变性质和等值性质,可用于检测各种与金融有关的弱点,并可根据我们的统计分析自动生成。结果,FASVERIF可以自动处理智能合同的源代码,并在可能时使用正式方法,以尽量提高合同的准确性能。我们还证明,使用我们翻译的模型来核查我们财产的准确性能,这与现有的正式核查方法不同。我们通过将548项合同的脆弱性数据集评估FASVERIF,通过将之与其他自动工具进行比较来评估。我们的评估显示,FASVIF的准确性能与不同类型技术的准确性。