Open Access iconOpen Access

ARTICLE

crossmark

A Data Consistency Insurance Method for Smart Contract

by Jing Deng1, Xiaofei Xing1, Guoqiang Deng2,*, Ning Hu3, Shen Su3, Le Wang3, Md Zakirul Alam Bhuiyan4

1 School of Computer Science and Cyber Engineering, Guangzhou University, Guangzhou, 510006, China
2 Information Network Engineering and Reasearch Center, South China University of Technology, Guangzhou, 510640, China
3 Cyberspace Institute of Advanced Technology, Guangzhou University, Guangzhou, 510006, China
4 Department of Computer and Information Sciences, Fordham University, New York, 10458, USA

* Corresponding Author: Guoqiang Deng. Email: email

Computers, Materials & Continua 2023, 76(3), 3783-3795. https://doi.org/10.32604/cmc.2023.034116

Abstract

As one of the major threats to the current DeFi (Decentralized Finance) ecosystem, reentrant attack induces data inconsistency of the victim smart contract, enabling attackers to steal on-chain assets from DeFi projects, which could terribly do harm to the confidence of the blockchain investors. However, protecting DeFi projects from the reentrant attack is very difficult, since generating a call loop within the highly automatic DeFi ecosystem could be very practicable. Existing researchers mainly focus on the detection of the reentrant vulnerabilities in the code testing, and no method could promise the non-existent of reentrant vulnerabilities. In this paper, we introduce the database lock mechanism to isolate the correlated smart contract states from other operations in the same contract, so that we can prevent the attackers from abusing the inconsistent smart contract state. Compared to the existing resolutions of front-running, code audit, and modifier, our method guarantees protection results with better flexibility. And we further evaluate our method on a number of de facto reentrant attacks observed from Etherscan. The results prove that our method could efficiently prevent the reentrant attack with less running cost.

Keywords


Cite This Article

APA Style
Deng, J., Xing, X., Deng, G., Hu, N., Su, S. et al. (2023). A data consistency insurance method for smart contract. Computers, Materials & Continua, 76(3), 3783-3795. https://doi.org/10.32604/cmc.2023.034116
Vancouver Style
Deng J, Xing X, Deng G, Hu N, Su S, Wang L, et al. A data consistency insurance method for smart contract. Comput Mater Contin. 2023;76(3):3783-3795 https://doi.org/10.32604/cmc.2023.034116
IEEE Style
J. Deng et al., “A Data Consistency Insurance Method for Smart Contract,” Comput. Mater. Contin., vol. 76, no. 3, pp. 3783-3795, 2023. https://doi.org/10.32604/cmc.2023.034116



cc Copyright © 2023 The Author(s). Published by Tech Science Press.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 360

    View

  • 305

    Download

  • 0

    Like

Share Link