Abstract The rapid proliferation of Internet of Things devices has intensified the demand for security, privacy-preserving, and scalable machine learning solutions. Federated Learning (FL) supports the decentralized training of models across distributed devices without transporting raw data, whereas blockchain provides a trusted, transparent mechanism for integrity and reaching consensus. The paper explains an FL framework that incorporates blockchain technology, based on the GSR-C2N model for identifying crypto-mining malware. It is demonstrated that the system’s feature extraction and optimization processes are optimized to address security problems in IoT by utilizing blockchain to verify model updates and build trust and privacy. The given structure has demonstrated superiority to the current practices. This model was 96.85% accurate and 97.51% specific on the crypto-mining malware data set using 10-fold cross-validation, making it applicable to smart healthcare and smart city applications with IoT-based systems. In addition, when combined with regulatory compliance, homomorphic encryption can strengthen data and privacy management, underscoring the model’s effectiveness in advanced IoT systems. Similar content being viewed by others Funding Open access funding provided by Manipal University Jaipur. Author information Authors and Affiliations Corresponding author Ethics declarations Competing interests The authors declare no competing interests. Additional information Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Rights and permissions Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If