Source-linked AI summary

Blockchain and smart contract for IoT enabled smart agriculture

Tahmid Hasan Pranto, Abdulla All Noman, Atik Mahmud, AKM Bahalul Haque

arXiv:2104.00632v1cs.CYcs.NI

TL;DR

Farmers face production and pricing risks, consumers seek verifiable product information, and the paper identifies a need to monitor agricultural data from storage through distribution. It proposes blockchain-based traceability with IoT data collection and smart-contract regulation, and demonstrates event logging for temperature violations and product distribution. The authors note that blockchain still requires optimization for real-world systems and that verified transactions cannot be modified.

  • Problem

    Agricultural monitoring and traceability are needed from seed storage through cultivation and distribution, amid farmer risks, variable prices, and consumer demand for verifiable product information.

    Source: INTRODUCTION · pp. 2–3
  • Method

    The proposed system combines blockchain traceability with IoT data collection and smart contracts to regulate interactions across agricultural processes.

    Source: INTRODUCTION · p. 3, PROPOSED BLOCKCHAIN-BASED MODEL · p. 16
  • Results

    Implementation testing demonstrates blockchain event logging for temperature violations and product information as distribution begins and proceeds across stages.

    Source: IMPLEMENTATION AND TESTING · pp. 21–22
  • Takeaways & Limitations

    The system is intended to make agricultural product origins and distribution histories available for consumer verification.

    Source: IMPLEMENTATION AND TESTING · pp. 18, 22

    Blockchain remains in an early stage requiring real-world optimization, and verified transactions cannot be modified.

    Source: ANALYSIS · p. 22, B. Challenges · p. 24

Abstract

from arXiv · show

The agricultural sector is still lagging behind from all other sectors in terms of using the newest technologies. For production, the latest machines are being introduced and adopted. However, pre-harvest and post-harvest processing are still done by following traditional methodologies while tracing, storing, and publishing agricultural data. As a result, farmers are not getting deserved payment, consumers are not getting enough information before buying their product, and intermediate person/processors are increasing retail prices. Using blockchain, smart contracts, and IoT devices, we can fully automate the process while establishing absolute trust among all these parties. In this research, we explored the different aspects of using blockchain and smart contracts with the integration of IoT devices in pre-harvesting and post-harvesting segments of agriculture. We proposed a system that uses blockchain as the backbone while IoT devices collect data from the field level, and smart contracts regulate the interaction among all these contributing parties. The system implementation has been shown in diagrams and with proper explanations. Gas costs of every operation have also been attached for a better understanding of the costs. We also analyzed the system in terms of challenges and advantages. The overall impact of this research was to show the immutable, available, transparent, and robustly secure characteristics of blockchain in the field of agriculture while also emphasizing the vigorous mechanism that the collaboration of blockchain, smart contract, and IoT presents.

INTRODUCTION

Agriculture depends on connected pre- and post-harvest processes, yet monitoring storage, cultivation, distribution, and market prices remains important. The paper proposes blockchain, IoT, and smart contracts to support traceability, tamper-proof data collection, and automated process regulation.

INTRODUCTION

  • Farmers face production risks from factors including soil quality, low-grade inputs, drought, and floods, while retail prices can be two or three times the prices farmers receive.The paper also reports that farmers were the lowest-paid workers among several categories, citing Fayer (2014).Source: INTRODUCTION · p. 2
  • Consumers seek identification and verification of agricultural products, while prices vary across distribution layers and the appropriate price for each actor remains an open question.Food hazards, diverse cultivation locations, and GMOs contribute to consumer demand for evidence that products are safe and nutritious (Opara, 2003).Source: INTRODUCTION · p. 2
  • Poor seed maintenance can cause losses of approximately 50–60% of cereal grain, underscoring the need to monitor storage conditions and trace products from storage to consumers.The paper argues that verifiable product data can support transparency and market-price monitoring.Source: INTRODUCTION · p. 3
  • IoT devices monitor seed and fertilizer quality and can trigger blockchain events when problems occur, while smart contracts regulate transactions through immutable terms.The paper also presents automation and removal of intermediate third-party processors as contributions.Source: INTRODUCTION · p. 3
  • The proposed system aims to trace products from storage through cultivation and distribution to retail, while ensuring tamper-proof data acquisition across these stages.Its stated contributions also include removing intermediate processors and controlling market prices.Source: INTRODUCTION · p. 3

LITERATURE REVIEW

The review presents blockchain as a tamper-resistant, transparent record system and smart contracts as a way to automate rules. It surveys their combination with IoT for monitoring and traceability, including agricultural and food-supply applications.

Blockchain

  • Blockchain links verified blocks containing transaction data, prior-block hashes, and timestamps; distributed consensus validates transactions and makes stored information difficult to falsify.The review describes each transaction as validated by most network users and each new block as carrying a cryptographic footprint and timestamp.Source: LITERATURE REVIEW · p. 4

Blockchain, IoT, and smart contract for traceability and process development

  • Prior work applies blockchain and IoT to agri-food traceability, with reported benefits including transparent, fault-tolerant, immutable tracing and food-quality monitoring.The review also surveys applications in supply-chain management, food safety, and food security.Source: LITERATURE REVIEW · pp. 6, 9, 10

Smart contract

  • Smart contracts encode parties’ agreed rules and automate system logic, while blockchain secures the contracts and their records.The review describes Ethereum as providing a practical environment for implementing smart contracts.Source: LITERATURE REVIEW · p. 7

Blockchain, IoT, and smart contract for traceability and process development

  • IoT devices collect and send monitoring data, while blockchain is presented as a secured backbone for addressing IoT information-security issues.The review notes that IoT devices have information-security issues and cites blockchain use to address them.Source: LITERATURE REVIEW · p. 9

PROPOSED BLOCKCHAIN-BASED MODEL

The proposed model connects agricultural actors through IoT monitoring, MQTT data sharing, blockchain records, and smart contracts. Separate contracts support storage monitoring and post-production distribution tracking.

System interaction with blockchain

  • General data is stored and shared through MQTT, while selected sophisticated data is stored on blockchain and smart contracts periodically check security, traceability, and quality.The paper cites blockchain storage limits as the reason not to store every data item on-chain.Source: PROPOSED BLOCKCHAIN-BASED MODEL · p. 12

System design

  • The model connects seed storage, supply shops, producers, distributors, wholesalers, and retailers to improve agricultural-product traceability.The contract deployer is also identified as an actor in the system design.Source: PROPOSED BLOCKCHAIN-BASED MODEL · pp. 12–13

A. Blockchain

  • Blockchain is used to tamper-proof historical data because MQTT lacks security in some steps, and logged events cannot be changed without breaking the block chain.The paper describes this as securing traceable data.Source: PROPOSED BLOCKCHAIN-BASED MODEL · p. 13

B. Smart contract

  • The system uses two Solidity smart contracts on Ethereum: one automates storage-data checks and event logging, while the other tracks distribution dates, prices, and quantities.The storage contract compares measurements with optimum values; the distribution contract monitors pricing along the route from producer to customer.Source: PROPOSED BLOCKCHAIN-BASED MODEL · pp. 13–14

D. MQTT network protocol

  • Low-power IoT sensors collect environmental readings, and MQTT shares them through topic-based publishing and subscriptions.The listed readings include temperature, humidity, and light exposure; MQTT is described as requiring minimal bandwidth and memory.Source: PROPOSED BLOCKCHAIN-BASED MODEL · pp. 14, 16

IMPLEMENTATION AND TESTING

The implementation demonstrates blockchain-backed monitoring of seed-storage conditions and product traceability from production through retail. Ethereum smart contracts perform self-checks, record violations, and log distribution information at each stage.

Implementation

  • The paper demonstrates an architecture rather than building the whole system, using Ethereum, Solidity, and Remix for implementation and testing.Its stated objective is to trace products from field-level production to consumers while monitoring prices along the way.Source: IMPLEMENTATION AND TESTING · pp. 16–18

Pre-harvest

  • IoT sensors provide periodic storage readings, which contract self-checks compare with predefined optima before recording favorable conditions or violations.The checks cover temperature, humidity, and light exposure; violation events encode the type and whether the value is under, over, or optimum.Source: IMPLEMENTATION AND TESTING · pp. 17–19

Post-harvest

  • Distribution begins at the producer, with product details and the block timestamp logged before the same tracing process continues through retail.The recorded details include product ID, name, price, and quantity; later distribution steps update information for the product’s current trace.Source: IMPLEMENTATION AND TESTING · pp. 17, 18, 21, 22, Figure 9 · p. 20

Testing

ANALYSIS

The analysis describes a blockchain-centered agricultural system combining IoT monitoring with smart-contract checks. It reports operational benefits alongside constraints involving real-world optimization, data correction, deployment, and IoT devices.

ANALYSIS

  • The authors note unresolved real-world blockchain optimization issues, and verified transactions cannot be modified after an erroneous change.Source: ANALYSIS · p. 22, B. Challenges · p. 24
  • Smart contracts limit task execution to people authorized by the contract.Source: A. Advantages · p. 22
  • IoT devices push monitored data to an MQTT server, while the blockchain periodically checks the data through smart contracts and logs events and violations.Source: A. Advantages · p. 22
  • Gas-cost entries separate transaction and execution costs, including addSeed() at 168,402 and 144,314 and lightExpoSelfCheck() at 35,503 and 14,039.Source: A. Advantages · p. 23
  • Blockchain stores pre- and post-harvest data against tampering, while smart contracts check values across segments and save the results on-chain.Source: A. Advantages · p. 23
  • A central blockchain information source is available for checking, and stored dates, times, and product IDs support tracing product origin.Source: A. Advantages · pp. 23–24
  • Smart contracts are described as removing intermediate processors while monitoring prices and product flow between levels.Source: A. Advantages · p. 23
  • Deployed smart contracts cannot be changed, initial blockchain settings cost money, and damaged or vulnerable IoT devices constrain data collection and checks.Source: B. Challenges · p. 24

C. Cost estimations

The section identifies a table reporting gas costs for different system operations.

C. Cost estimations

CONCLUSION

The conclusion presents blockchain as a means to support availability, security, immutability, and trust in agricultural processes. It describes a generalized implementation and outlines future tracking and application plans.

CONCLUSION

  • The work aims to demonstrate blockchain's capability to support data availability, security, immutability, and trust between producers and consumers in agricultural process development.Source: CONCLUSION · p. 24
  • The authors describe the implementation as generalized and applicable to tracing, developing, and enhancing processes, and provide gas costs for running the system.Source: CONCLUSION · p. 24
  • Future work targets a permissioned blockchain, barcode or QR tracking from storage to retail, and a web application.Source: CONCLUSION · p. 24

ADDITIONAL INFORMATION AND DECLARATIONS

The declarations report funding and competing-interest status, author contributions, and data and supplemental-information availability.

ADDITIONAL INFORMATION AND DECLARATIONS

Loading 2104.00632v1…