The increasing proliferation of Internet of Things (IoT) nodes poses significant security challenges for their network's communication. Blockchain technology, with its decentralized and distributed nature, has the potential to address these security concerns within IoT networks. LEACH (Low blockchain technology enhance IoT network security, enabling energy-efficient data management and transaction integrity, enhancing network lifespan and protection. This paper presents a security model that combines the LEACH algorithm and blockchain technology to improve IoT networks' security. The LEACH algorithm forms clusters of IoT devices, with a designated cluster head (CH) responsible for data aggregation and forwarding. Our model incorporates blockchain technology's core principles and cryptographic foundations, providing additional security measures. It consists of two main layers: the LEACH clustering-based routing protocol, which forms clusters and layers, and a blockchain simulator module. The LEACH algorithm enhances energy consumption, enables efficient data management within clusters, and ensures the integrity, transparency, and immutability of transactions. Our model is implemented on a simulator, allowing for experimentation and modification to evaluate the performance and effectiveness of the security enhanced IoT network model. Our results demonstrate the effectiveness of the proposed enhanced LEACH algorithm compared to previous algorithms, in which the last node died after 1868 transactions. As well as the results of the pro-posed framework, which record 0.058% of the state rate and 2.75 Throughput. Simulation results are validated with respect to previous algorithms, and it obtained higher accuracy compared to them.