CodeBERT-Based Embeddings for Detecting Vulnerable Smart Contracts

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.

Authors

Institutions

Publication Details

Published
2025-09-15
DOI
https://doi.org/10.1109/lcn65610.2025.11146388
Citations
1
Primary Topic
Blockchain Technology Applications and Security
Type
article
Field-Weighted Citation Impact
3.25
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

CodeBERT-Based Embeddings for Detecting Vulnerable Smart Contracts

Awarjana Perera, Anand S. Rao, Vallipuram Muthukkumarasamy, Jeyakumar Samantha Tharani et al.
1 citations
Blockchain Technology Applications and Security
3.25
article

CodeBERT-Based Embeddings for Detecting Vulnerable Smart Contracts

Awarjana Perera, Anand S. Rao, Vallipuram Muthukkumarasamy, Jeyakumar Samantha Tharani, Babu Pillai
article en
1 citations

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.

Griffith University (AU), University of Jaffna (LK)
Openalex Percentile: Top 6%
Blockchain Technology Applications and Security
3.25
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

CodeBERT-Based Embeddings for Detecting Vulnerable Smart Contracts — Awarjana Perera, Anand S. Rao, et al. · (2025) | TGRS Research Map | TGRS