Formal Analysis of Reentrancy Vulnerabilities in Smart Contract Based on CPN
Electronics · 09.05.2023 · 12 (10) · 2152
DOI: 10.3390/electronics12102152 ↗Kurz gefasst
Fachartikel in der Zeitschrift Electronics, online erschienen am 09.05.2023. Verfasst von Yaqiong He und 3 weiteren Autor:innen. Die Arbeit wurde bisher 14-mal zitiert (Crossref) und nennt 49 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: Major Public Welfare Projects Foundation of Henan Province, Open Foundation of Henna Key Laboratory Cryptography.
Abstract (Originalsprache)
A smart contract is a special form of computer program that runs on a blockchain and provides a new way to implement financial and business transactions in a conflict-free 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 methods present the highest level of confidence in the security of smart contracts. In this paper, we propose a formal solution to model a smart contract based on colored Petri nets (CPNs). Herein, we focus on the most common type of security bugs in smart contract, i.e., reentrancy bugs, which led to a serious financial loss of around USD 34 million for the Cream Finance project in 2021. 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 via CPN Tools simulation are 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 on the Ethereum network based on the Remix platform.
Förderung
- Major Public Welfare Projects Foundation of Henan Province
- Open Foundation of Henna Key Laboratory Cryptography
Zitieren
APA
He, Y., Dong, H., Wu, H., & Duan, Q. (2023). Formal Analysis of Reentrancy Vulnerabilities in Smart Contract Based on CPN. Electronics, 12(10), 2152. https://doi.org/10.3390/electronics12102152
Vancouver
He Y, Dong H, Wu H, Duan Q. Formal Analysis of Reentrancy Vulnerabilities in Smart Contract Based on CPN. Electronics. 2023;12(10):2152. doi:10.3390/electronics12102152
BibTeX
@article{He2023,
author = {He, Yaqiong and Dong, Hanjie and Wu, Huaiguang and Duan, Qianheng},
title = {Formal Analysis of Reentrancy Vulnerabilities in Smart Contract Based on CPN},
journal = {Electronics},
year = {2023},
volume = {12},
number = {10},
pages = {2152},
doi = {10.3390/electronics12102152}
}
EUVIMED