# A Survey of Blockchain Applications for Management in Agriculture and Livestock Internet of Things
## 4 Applications of Blockchain in Agricultural and Animal Husbandry IoT
### Ensuring System Security and Privacy
For example, attackers can exploit security vulnerabilities in IoT devices to turn them into a \"botnet\" for launching DDoS attacks. The characteristics of the IoT environment, including the large number of devices, diversity, and strong connectivity, make IoT devices prone to being tools for DDoS attacks. Numerous IoT devices are deficient in robust security protocols, including encryption and authentication measures, because they were not adequately considered in the design phase. Existing solutions to DDoS attacks often focus on traditional network environments rather than being specifically designed for IoT. These solutions may not be suitable for the unique environment of IoT, such as performance challenges encountered when managing a vast array of devices and data volumes. Papers [128; 129] suggest that blockchain is a decentralized, tamper-proof, and transparent data management mechanism, which has potential value in enhancing security in IoT environments. For instance, blockchain can be used to strengthen device authentication and data integrity verification and provide distributed security defense mechanisms. Future research can focus on how to integrate blockchain technology more effectively into IoT environments to improve defenses against DDoS attacks. Additionally, research can explore how to use machine learning and AI technologies to predict and identify DDoS attack patterns and how to implement lightweight security measures in IoT devices. IoT technology has significantly improved agricultural production efficiency and resource utilization with smart agriculture, yet it also introduces challenges related to security and privacy. Existing security solutions, mainly based on cloud computing and IoT, have certain limitations, particularly concerning data storage and the security of communications. IoT devices themselves also present security risks and can be used for cyber-attacks and data breaches, issues that urgently need to be addressed. Paper [130] introduced an intelligent agricultural safety monitoring framework that combines cloud technology with blockchain technology, enhancing the system's reliability and security. While the application of IoT in agriculture has enhanced efficiency and resource utilization, it has concurrently presented challenges regarding security and privacy. Traditional security methods rely on cloud computing and the IoT, with limitations in data protection and communication security. Data leakage and network attacks are risks associated with IoT devices, which urgently need to be addressed. To strengthen the monitoring and security of intelligent agriculture, the paper proposes combining blockchain, cloud servers, and smart farms. Figure 10 illustrates the multi-layered structure of the smart agriculture application framework. Initially, the smart farm layer encompasses a variety of sensor apparatuses with distinct functionalities within the agricultural domain. This layer is constituted by IoT sensor equipment deployed across each parcel of land, incessantly generating data related to device condition and operational metrics. Such data are conveyed to cloud services via edge gateways or intermediary devices linked to these sensors. Subsequently, the cloud layer is equipped with systems designed to perpetually monitor and process data from sensors to distill relevant insights. MQTT serves as a prevalent method for data transmission in discrete packets from source to destination. This paper introduces a lambda function within the AWS ecosystem, devised to interpret AWS IoT Core data, extracting pertinent information from connected agricultural sensors. The AWS IoT Core serves as a nexus for a multitude of IoT sensors within this smart agricultural setup. An efficient IoT messaging framework is imperative to accommodate various IoT  
Figure 10: Blockchain cloud-based smart-agriculture application in [130]. communication protocols, like MQTT, ensuring data collection from a vast array of devices while optimizing for network throughput.