Blockchain adoption has significantly expanded in recent years, with the emergence of smart contracts facilitating practical applications in many domains. Since smart contracts can execute cryptocurrency transfers, malicious users have started implementing fraudulent smart contracts to deceive blockchain users and steal their funds. To mitigate this issue, this paper proposes an approach to detect fraudulent smart contracts leveraging Federated Machine Learning. Our approach generates an image representation for each smart contract by extracting the opcodes and assigning a unique RGB pixel. We utilized two publicly available datasets, including malicious and trustworthy smart contracts, to train multiple models on non-independent and Identically Distributed data to better represent a real-world scenario, achieving interesting results in accuracy. To the best of our knowledge, this article represents the first approach in the unique identification of fraudulent smart contracts using opcodes with a specific color, also leveraging a Federated Machine Learning approach in the blockchain environment.
A federated machine learning method for malicious smart contract detection / Ciaramella, Giovanni; Martinelli, Fabio; Mercaldo, Francesco; Mori, Paolo; Santone, Antonella. - (2025), pp. 459-466. ( BCCA 2025 - 7th International Conference on Blockchain Computing and Applications Dubrovnik, HRV 14-17/10/2025) [10.1109/bcca66705.2025.11229791].
A federated machine learning method for malicious smart contract detection
Ciaramella Giovanni
;
2025
Abstract
Blockchain adoption has significantly expanded in recent years, with the emergence of smart contracts facilitating practical applications in many domains. Since smart contracts can execute cryptocurrency transfers, malicious users have started implementing fraudulent smart contracts to deceive blockchain users and steal their funds. To mitigate this issue, this paper proposes an approach to detect fraudulent smart contracts leveraging Federated Machine Learning. Our approach generates an image representation for each smart contract by extracting the opcodes and assigning a unique RGB pixel. We utilized two publicly available datasets, including malicious and trustworthy smart contracts, to train multiple models on non-independent and Identically Distributed data to better represent a real-world scenario, achieving interesting results in accuracy. To the best of our knowledge, this article represents the first approach in the unique identification of fraudulent smart contracts using opcodes with a specific color, also leveraging a Federated Machine Learning approach in the blockchain environment.| File | Dimensione | Formato | |
|---|---|---|---|
|
A_Federated_Machine_Learning_Method_for_Malicious_Smart_Contract_Detection.pdf
non disponibili
Descrizione: A Federated Machine Learning Method for Malicious Smart Contract Detection
Tipologia:
Versione Editoriale (PDF)
Licenza:
Copyright dell'editore
Dimensione
1.04 MB
Formato
Adobe PDF
|
1.04 MB | Adobe PDF | Visualizza/Apri Richiedi una copia |
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

