Journal of Current Research in Blockchain
Vol. 3 No. 4 (2026): Regular Issue: December 2026

Leakage-Safe Proxy Smart Contract Detection with CodeBERT Embeddings, Static Solidity Features, and Classical Machine Learning Models

Rajasree R. (Department of EEE, AMET University, Chennai, India)
Stalin K. (Department of Marine, AMET University, Chennai, India)



Article Info

Publish Date
17 Nov 2026

Abstract

Proxy smart contracts are widely adopted in Ethereum to enable contract upgradeability while preserving deployed contract addresses. However, automatically identifying proxy contracts remains challenging due to the limited availability of labeled datasets, severe class imbalance, and the high prevalence of duplicated source code, which can introduce information leakage during model evaluation. This study proposes a leakage-safe proxy smart contract detection framework by combining pretrained CodeBERT embeddings, handcrafted static Solidity features, and classical machine learning classifiers under a Stratified Group Cross Validation evaluation protocol. The proposed grouping strategy assigns contracts with identical normalized source code to the same cross-validation fold, preventing duplicated contracts from appearing simultaneously in the training and testing sets. Experiments were conducted on a dataset containing 377 Ethereum smart contracts, comprising 360 non-proxy contracts and 17 proxy contracts, which were grouped into 146 unique source-code groups. Three classifiers, namely Logistic Regression, Random Forest, and XGBoost, were evaluated using Accuracy, Balanced Accuracy, Precision, Recall, F1-score, ROC-AUC, Precision–Recall Area Under the Curve (PR-AUC), and Matthews Correlation Coefficient (MCC). Experimental results show that Logistic Regression achieved the best overall performance, obtaining a Balanced Accuracy of 81.38%, Precision of 61.11%, Recall of 64.71%, F1-score of 62.86%, PR-AUC of 0.4977, and MCC of 0.6108. The leakage audit further confirmed zero source-code group overlap between the training and testing partitions across all cross-validation folds. These findings demonstrate that integrating pretrained code embeddings with leakage-safe group-aware evaluation provides a reliable and effective approach for proxy smart contract detection while producing more realistic estimates of model generalization in the presence of duplicated smart contract source code.

Copyrights © 2026






Journal Info

Abbrev

Journal

Publisher

Subject

Computer Science & IT Decision Sciences, Operations Research & Management Economics, Econometrics & Finance

Description

The Journal of Current Research in Blockchain publishes high-quality research on: Blockchain technology Smart Contract Data Privacy Decentralization Data Distributed Ledger Technology Decentralized Applications Our goal is to provide a platform for researchers, practitioners, and policymakers to ...