Formal verification of Reentrancy Vulnerability Based on CPN

Author:

He Yaqiong1,Dong Hanjie1,Wu Huaiguang1,Duan Qianheng2

Affiliation:

1. Zhengzhou University of Light Industry

2. Henan Key Laboratory of Network Cryptography Technology

Abstract

Abstract A smart contract is a special form of computer program running on a blockchain, which provides a new way to implement financial and business transactions in a free-of-conflicts and transparent environment. In blockchain systems, such as Ethereum, smart contracts can handle and autonomously transfer assets of considerable value to other parties. Hence, it is particularly important to ensure that smart contracts function as intended since bugs or vulnerabilities may lead and indeed have led, to substantial economic losses and erosion of trust for blockchain. While a number of approaches and tools have been developed to find vulnerabilities, formal method presents the highest level of confidence about the security of smart contracts. In this paper, we propose a formal solution to model smart contract based on Colored Petri Net (CPN). Herein we focus on the most common type of security bugs in smart contract, i.e., reentrancy bug, which led to a serious financial loss of around $60 million in 2016. We present a hierarchical CPN modelling method to analyze potential security vulnerabilities at the contract’s source code level. Then modeling analysis methods such as correlation matrix, state space report and state space graph generated by CPN Tools simulation were exploited for formal analysis of smart contracts. The example shows the full state space and wrong path in accordance with our expected results. Finally, the conclusion was verified in the Ethereum network based on Remix platform.

Publisher

Research Square Platform LLC

Reference38 articles.

1. Amani S, Bégel M, Bortin M, et al. (2018) Towards verifying ethereum smart contract bytecode in Isabelle/HOL[C]//Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs. pp: 66–77.

2. Blass E O, Kerschbaum F. Strain (2018) A secure auction for blockchains[C]//European Symposium on Research in Computer Security. Springer, Cham, pp: 87–110.

3. Bai X, Cheng Z, Duan Z, et al. (2018) Formal modeling and verification of smart contracts[C]//Proceedings of the 2018 7th international conference on software and computer applications. pp: 322–326.

4. Buterin V. (2014) A next-generation smart contract and decentralized application platform[J]. white paper,

5. Chinen Y, Yanai N, Cruz J P, et al. (2020) RA: Hunting for re-entrancy attacks in ethereum smart contracts via static analysis[C]//2020 IEEE International Conference on Blockchain (Blockchain). IEEE, pp: 327–336.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3