Papers1 provider Ā· 1 record
November 1, 2023Ā· 2023 IEEE 22nd International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom)
conference-paper

Opcode Sequences-Based Smart Contract Vulnerabilities Detection Using Deep Learning

Abstract

Ethereum is a blockchain platform that allows developers to create smart contracts. Smart contracts are programs that can automatically execute and handle cryptocurrency funds. However, over a hundred thousand new smart contracts are deployed every day and inevitably contain vulnerabilities due to programming errors. Once deployed, smart contracts cannot be fixed or changed, leaving funds at risk. To mitigate it, we use deep learning to detect vulnerabilities in smart contracts. First, we create our own dataset of labeled smart contracts based on opcode sequences, since few smart contract codes and labeled datasets are publicly available. We collect opcode sequences by replaying real-world transactions from the Ethereum Mainnet in our fully synchronized node while we leverage a plugin called "SODA" to label opcode sequences with vulnerability classes. Second, after data collection, we preprocess the data by removing duplicate opcode sequences, normalizing the sequences to the same length, and converting them into vectors. Finally, to detect vulnerabilities in smart contracts, we train a deep classification model using LSTM neural networks. Our model achieved an average accuracy of 82.63% and an F1-score of 79.74% across seven types of vulnerabilities, which is important for securing funds and logic in smart contracts.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.