Deep learning-based solution for smart contract vulnerabilities detection
Authors:
Top Cited Papers
Open Access
- 16 November 2023
- journal article
- research article
- Published by Springer Nature in Scientific Reports
- Vol. 13 (1) , 1-17
Abstract
This paper aims to explore the application of deep learning in smart contract vulnerabilities detection. Smart contracts are an essential part of blockchain technology and are crucial for developing decentralized applications. However, smart contract vulnerabilities can cause financial losses and system crashes. Static analysis tools are frequently used to detect vulnerabilities in smart contracts, but they often result in false positives and false negatives because of their high reliance on predefined rules and lack of semantic analysis capabilities. Furthermore, these predefined rules quickly become obsolete and fail to adapt or generalize to new data. In contrast, deep learning methods do not require predefined detection rules and can learn the features of vulnerabilities during the training process. In this paper, we introduce a solution called Lightning Cat which is based on deep learning techniques. We train three deep learning models for detecting vulnerabilities in smart contract: Optimized-CodeBERT, Optimized-LSTM, and Optimized-CNN. Experimental results show that, in the Lightning Cat we propose, Optimized-CodeBERT model surpasses other methods, achieving an f1-score of 93.53%. To precisely extract vulnerability features, we acquire segments of vulnerable code functions to retain critical vulnerability features. Using the CodeBERT pre-training model for data preprocessing, we could capture the syntax and semantics of the code more accurately. To demonstrate the feasibility of our proposed solution, we evaluate its performance using the SolidiFI-benchmark dataset, which consists of 9369 vulnerable contracts injected with vulnerabilities from seven different types.Keywords
All Related Versions
This publication has 36 references indexed in Scilit:
- ContractFuzzer: fuzzing smart contracts for vulnerability detection2018
- SmartCheck2018
- ZEUS: Analyzing Safety of Smart Contracts2018
- One‐dimensional convolutional neural networks for spectroscopic signal regressionJournal of Chemometrics, 2017
- Word2VecNatural Language Engineering, 2016
- Making Smart Contracts Smarter2016
- McNemar Test2014
- Glove: Global Vectors for Word Representation2014
- Natural language processing: an introductionJournal of the American Medical Informatics Association, 2011
- BLEU2001