CodeBERT-Based Embeddings for Detecting Vulnerable Smart Contracts
Abstract
Smart contracts are a key part of blockchain applications, and attackers can exploit them to manipulate contract behaviour or steal assets. Smart contracts often contain security vulnerabilities, either accidentally introduced by developers or due to flawed business logic. In this paper, we focus on finding an optimal Machine Learning based framework for detecting vulnerable smart contracts by analysing the smart contracts as embedding vectors. CodeBERT, a pre-trained transformer model, is used for feature extraction in the proposed framework. The framework has shown approximately 97% accuracy in detecting smart contracts that contain various vulnerabilities. Additionally, the research explores the performance of CodeBERT variants for this task. The results of the experiments have proven the favourability of this framework in detecting vulnerable smart contracts.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.