EUVIMEDEUVIMED entdecken
Crossref

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

Rajasree R.

Journal of Current Research in Blockchain · 02.11.2026 · 3 (4) · 279-297

DOI: 10.47738/jcrb.v3i4.85 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Journal of Current Research in Blockchain, online erschienen am 02.11.2026. Verfasst von Rajasree R..

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

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.

Zitieren

APA

R., R. (2026). Leakage-Safe Proxy Smart Contract Detection with CodeBERT Embeddings, Static Solidity Features, and Classical Machine Learning Models. Journal of Current Research in Blockchain, 3(4), 279-297. https://doi.org/10.47738/jcrb.v3i4.85

Vancouver

R. R. Leakage-Safe Proxy Smart Contract Detection with CodeBERT Embeddings, Static Solidity Features, and Classical Machine Learning Models. Journal of Current Research in Blockchain. 2026;3(4):279-297. doi:10.47738/jcrb.v3i4.85

BibTeX
@article{R2026,
  author = {R., Rajasree},
  title = {Leakage-Safe Proxy Smart Contract Detection with CodeBERT Embeddings, Static Solidity Features, and Classical Machine Learning Models},
  journal = {Journal of Current Research in Blockchain},
  year = {2026},
  volume = {3},
  number = {4},
  pages = {279--297},
  doi = {10.47738/jcrb.v3i4.85}
}
Kostenlos starten →