Skip to main content

ORIGINAL RESEARCH article

Front. Sustain. Food Syst., 23 November 2023
Sec. Sustainable Food Processing
This article is part of the Research Topic Technological Advancements for Processing and Preservation of Fruits and Vegetables View all 15 articles

A secure food supply chain solution: blockchain and IoT-enabled container to enhance the efficiency of shipment for strawberry supply chain

\r\nMuhammad Usman Abbas GondalMuhammad Usman Abbas Gondal1Muhammad Attique Khan,Muhammad Attique Khan1,2Abdul HaseebAbdul Haseeb1Hussain Mobarak AlbarakatiHussain Mobarak Albarakati3Mohammad Shabaz
Mohammad Shabaz4*
  • 1Department of CS, HITEC University, Taxila, Pakistan
  • 2Department of CS and Mathematics, Lebanese American University, Beirut, Lebanon
  • 3Department of Computer Engineering, College of Computer and Information Systems, Umm Al-Qura University, Makkah, Saudi Arabia
  • 4Department of Computer Science & Engineering, Model Institute of Engineering and Technology, Jammu, Jammu and Kashmir, India

The supply chain systems in the food industry are complex, including manufacturers, dealers, and customers located in different areas. Currently, there is a lack of transparency in the distribution and transaction processes of online food trade. The global food supply chain industry has enormous hurdles because of this problem, as well as a lack of trust among individuals in the sector and a reluctance to share information. This study aims to develop a blockchain-based strawberry supply chain (SSC) framework to create a transparent and secure system for tracking the movement of strawberries from the farm to the consumer. Using Ethereum smart contracts, the proposed solution monitors participant interactions, triggers events, and logs transactions to promote transparency and informed decision-making. The smart contracts also govern interactions between vendors and consumers, such as monitoring the status of Internet of Things (IoT) containers for food supply chains and notifying consumers. The proposed framework can be extended to other supply chain industries in the future to increase transparency and immutability.

1 Introduction

From the agricultural area to the consumer's table, the food supply chain (FSC) describes how food is grown, processed, refined, transported, sold, consumed, and discarded. It involves interdependent activities and parties, such as producers, manufacturers, distributors, retailers, and consumers, as shown in Figure 1. To ensure the availability of goods, efficient supply chain management is needed for reliability and food safety for consumers, enhancing the efficiency and sustainability of the food system (Kamble et al., 2020). In developing countries, the supply chain for food faces numerous obstacles. These include the need for trust among stakeholders, which is contingent upon the demands of the end users for credibility and traceability. Insufficient or missing information can make it difficult to manage risks, delays, or disruptions in supply chain operations (Kittipanya-Ngam and Tan, 2020). However, blockchain technology is recognized as one of the most effective solutions to tackle these challenges (Niu and Li, 2019).

FIGURE 1
www.frontiersin.org

Figure 1. Traditional Strawberry Food Supply Chain (SFSC).

The food systems are complicated and continually evolving. These days, consumers place a greater emphasis on food safety, quality, and nutrition than on quantity alone (Yakovleva, 2007; Manning, 2018). Given the hazards associated with food spoilage and potential harm, the FSC is essential in assuring the safety of products. As a result, improving traceability is becoming increasingly important in the agriculture sector. The safety, nutritional value, and quality of agricultural foods and goods, which are extremely susceptible to these dangers, are of particular concern to consumers. It is crucial that supply chain authorities provide information promptly and properly if they want to win the trust of end users. Consumers are particularly concerned about the safety, nutritional value, and quality of agricultural foods and products, which are highly susceptible to these risks (Dabbene and Gay, 2011).

For supply chain authorities to acquire the trust of end users, it is essential that they deliver information quickly and accurately. Strategies for ensuring food security place equal emphasis on food quality and quantity. Since organic farming methods are expected to produce food with greater nutritional content and higher quality than traditional farming systems, the relevance of food quality and safety is rising day by day in these systems. To sustain life and advance good health, it is essential to have access to adequate quantities of safe and nourishing food. Furthermore, it is crucial to maintain adherence to standards of quality, integrity, and credibility throughout the supply chain process. Several regulatory agencies have implemented standards to improve transparency, security, and quality of the supply chain traceability system bar codes for identifying the origin of products (Turri et al., 2017). The Chinese Government employs a comparable enforcement system. These regulations seek to increase the transparency of the product tracing system and guarantee high product quality (Mastilović et al., 2023).

Additionally, more cutting-edge technologies are used in modern supply chain management (SCM) to give businesses more flexibility. Integrations aid businesses in protecting their products while facilitating the movement of commodities backward. SCM also highlights the importance of creating alliances, partnerships, and collaborations. Modern food supply channels have the potential to be revolutionized by blockchain technology (Kouhizadeh and Sarkis, 2018; Queiroz et al., 2020). Transactions between peers are supported in this decentralized system, which also validates transactions by eliminating middlemen. Scholars have looked into how the use of blockchain technology might improve supply chain efficiency and address issues such as information inequity and decency in food recalls. Researchers have investigated how the utilization of blockchain technology contributes to the enhancement of supply chain performance and resolves problems such as information inequality and food recall indecency (Zhao G. et al., 2019). Blockchain technology enables users and suppliers to instantaneously check transaction information by gathering data on all transactions within a given timeframe. This results in the creation of a digital record for verification and confirmation. Currently, a trustworthy blockchain-powered traceability system for fruits and vegetables distributes necessary traceability information along the supply chain. Furthermore, a reputation-driven smart contract was established to stimulate network nodes to contribute to traceability data. In a recent study, the authors evaluated and executed the system, determining that it increases query efficiency, safeguards personal data, guarantees the integrity and trustworthiness of supply chain data, and fulfills the necessities of relevant applications (Rünzel et al., 2021).

The application of IoT technology in the FSC has enabled real-time monitoring, data acquisition, and data transfer capabilities (Coronado Mondragon et al., 2021), while blockchain technology provides improved dependability, product/service security, and traceability (Behnke and Janssen, 2020). The integration of IoT and BLC can provide FSC with simultaneous capabilities for data security, trust, visibility, dependability, and real-time data sharing (Lezoche et al., 2020). Implementing blockchain and IoT in agriculture can facilitate the monitoring and tracing of various aspects to guarantee the safety and quality of food products. The development of an FSC tracking system for halal livestock supply chains utilizing hazard analysis and critical control points (HACCP), blockchain-based technology, and IoT devices is one example. A supply chain is made up of all the steps used to deliver a finished good or service to the customer. The process may involve collecting raw materials, delivering them to the production site, and then transferring the final goods to a warehouse or retail location where they may be distributed to the customer. This system collects data from IoT devices at various stages of the supply chain and archives it securely on a blockchain-based platform for immutable record-keeping. In addition, the study examines the implementation of the system and evaluates its efficacy in enhancing supply chain transparency and quality control (Rejeb, 2018).

The primary advantage of utilizing blockchain technology during a pandemic is that it eliminates trust issues among all supply chain participants. This is achieved by sequentially documenting all transactions on the blockchain and broadcasting the events to all authorized parties, including consumers. Many researchers have demonstrated FSC and blockchain combinations with developing technologies, such as the Internet of Things, the cloud, smart contracts (Srivastava and Wood, 2015), big data, analysis through case studies (Verhoeven et al., 2018), and survey techniques (Hackius and Petersen, 2017). These methods have resulted in significant developments, such as enhanced traceability effectiveness, supply chain transparency for users, and specific challenges, such as scalability restrictions, emerging technologies, and the absence of regulatory frameworks (Wang et al., 2019).

It is crucial that supply chain authorities provide information promptly and properly if they want to win the trust of end users. The main goal of this research is to address the strawberry supply chain (SSC)-related issues and create a blockchain-based management system for secure FSC that can track and manage data for each supply chain node. Second, research on how IoT and blockchain might enhance supply chain management to have a better grasp of information management systems. Blockchain-based SSC management system incorporates blockchain technology and Internet of Things-enabled smart containers. Smart containers can transmit precise sensory data to cloud storage, enabling efficient supply chain management. Moreover, if any violation occurs, the containers can send out notifications that are recorded on the blockchain ledger. Furthermore, the objective of the study is to assist other supply chains in addressing their management and safety supervision concerns. This inquiry seeks to provide answers to the following research queries.

RQ1: What are the various challenges of blockchain adoption in FSC?

RQ2: How can IoT-enabled containers facilitate the transportation of food from its source to its destination?

RQ3: How does blockchain provide food traceability and end-to-end visibility?

• An innovative blockchain-based solution is introduced for all participants in the supply chain that eliminates the need for third-party involvement.

• A novel solution is presented for the IoT-enabled container transportation of FSC products from the source to the destination. This solution involves detecting any violations within the supply chain and logging the corresponding events using a smart contract.

• The proposed solution ensures transparency and provides end-to-end visibility of the product from its source to the destination.

For the FSC sector, we suggested a blockchain-based FSC solution. To guarantee the delivery of strawberry products of the greatest quality to end users, our suggested methodology combines IoT and blockchain technology, notably smart contracts. The ecological sustainability of the strawberry supply chain is evaluated.

The rest of the study is structured as follows.

Section 1 presents the introduction, Section 2 covers the conceptual context and literature review, and Section 3 provides a thorough explanation of the proposed methodology. In Section 4, the results and analysis are presented, followed by a discussion of the results in Section 5. Finally, Section 6 discusses the conclusion, implications, and limitations.

2 Related work

The food supply chain refers to the complex network of activities involved in producing, processing, distributing, and delivering food products from the point of origin to the end users. It encompasses various stages, including production, processing, packaging, storage, transportation, and retailing. In this section, we discuss the related work of FSC and its challenges, problems, and state-of-the-art work.

The author (Zhao X. et al., 2019) discusses a consolidated cold and modified atmosphere packaging system for fresh strawberries in supply chains. The term “supply chain performance” refers to the actions taken by the extended supply chain to meet end-user demands. This includes making sure that products are available, deliveries are made on time, and the supply chain has all the inventory and capacity it needs to do so in a timely manner. The proposed system aims to improve the shelf life and quality of strawberries during transportation and storage by reducing the rate of respiration and controlling temperature and humidity levels. The study also addresses the challenges related to supply chain management and safety supervision in the strawberry industry. The research aims to provide solutions to these issues and assist other supply chains in dealing with their management and safety concerns.

This article (Kelly et al., 2019) introduces a novel approach for evaluating the impact level of each step in the SSC on fruit quality. Throughout the whole supply chain process, strict adherence to norms of trust, honesty, and quality is essential. Several regulatory bodies have put regulations into place to increase the openness, safety, and quality of the supply chain traceability system. This system uses bar codes to identify the country of origin of products. The study focuses on physical, chemical, and microbial factors that affect strawberry quality during transportation and storage. By analyzing the data collected from different steps in the supply chain, the researchers developed a comprehensive evaluation framework to identify the critical stages that have the most significant impact on strawberry quality. The proposed approach can assist supply chain managers in making informed decisions to improve fruit quality and reduce waste. The author (Duan et al., 2020) presents the possibility of the blockchain system to address supply chain problems, including food fraud, food safety, and transparency. The authors identify three main themes in the literature: (1) the advantages of implementing blockchain technology in the FSC; (2) the problems for the adoption of blockchain in the food supply chain; and (3) the outlook of blockchain usage in the food supply chain. The study suggests that blockchain technology possesses the ability to offer benefits including increased transparency, trust, and safety, in addition to improved FSC tracking and accountability. Nevertheless, the authors find a number of adoption barriers, such as high expenses for implementation, regulatory ambiguity, and a lack of compatibility between blockchain systems. The authors (Kaur et al., 2022) examine the existing status of studies on the combination of blockchain and IoT within the management of food supply chains. The study highlights the potential advantages of integrating blockchain and IoT, such as increased FSC transparency, transparency, security, and efficiency. The authors identify a number of obstacles facing the food supply chain, including security of food, accountability, and transparency, and propose that blockchain and IoT can help overcome these obstacles. The authors provide a comprehensive overview of the theory of evolution, advantages, and potential applications of blockchain and IoT in the administration of the food supply chain. They indicate that more study is necessary to fully comprehend the challenges and opportunities of integrating protocol standards and the resolution of data security and privacy concerns. Using the IoT, the authors (Bhat et al., 2021) propose a solution to enhance the interoperability of blockchain networks in agricultural and FSC supervision. The authors argue that the use of blockchain-based technologies in food and agricultural supply chain management can improve supply chain transparency, traceability, and stakeholder trust. The researchers suggest that their suggested approach can contribute to the development of a more effective and transparent agriculture and FSC management system. To fully realize the potential of blockchain technology and IoT devices in supply chains and to address the difficulties of interoperability and data privacy, they propose that further research is necessary.

This study (Saurabh and Dey, 2021) explores the advantages of utilizing blockchain technology, such as increased transparency, traceability, and efficacy, the challenges associated with its adoption, such as security and confidentiality of data concerns, and the need for standardization. The authors conclude that blockchain technology has substantial potential for promoting sustainable food and agriculture supply chains. They suggest that additional research is required to resolve the challenges related to blockchain's acceptance and to develop standard protocols and frameworks that facilitate the interoperability of different blockchain networks. The study (Kumar et al., 2022) details the examination of the IoT and blockchain in the food supply chain, identifying the main adoption barriers, such as the absence of standard processes and security and confidentiality of data concerns. The authors also discuss potential solutions to these challenges, such as the implementation of standardization for automating transactions, the integration of artificial intelligence and machine learning into processes, and the collaboration between diverse stakeholders in the food supply chain. The authors argue that additional research is required to comprehend the difficulties and possibilities presented by the approach and develop standard protocols that facilitate interaction among blockchain networks. Moreover, the authors contend that cooperation among FSC stakeholders is essential for the effective execution of blockchain and IoT.

In this context (Abdallah and Nizamuddin, 2023), the current research presents blockchain technology within the pharmaceutical supply chain. Increased transparency, accountability, and efficiency are just some of the benefits discussed, and the authors also delve into the difficulties of implementing blockchain technology, such as data privacy and security concerns and the need for standardization. Data, blockchain, middleware, and applications are the four tiers of a blockchain architecture proposed by the authors. They show that this layout has the potential to be a flexible and scalable answer to the problem of incorporating blockchain technology into the pharmaceutical supply chain. Their findings imply that more investigation is required to address adoption issues and provide standardized protocols and frameworks for blockchain networks to communicate with one another. The proposed approach in Hasan et al. (2019), uses the smart contracts and the logistics industry with a more trustworthy, cost-effective, and transparent system for managing cargo procedures. The article also explores the ways in which smart contract technology might be used to improve logistics operations in areas including real-time cargo tracking, automated payment processing, and risk management. According to the authors, smart contract technology can improve logistics efficiency and security by standardizing procedures, cutting costs, and boosting confidence in the business. The authors argue that there is a significant opportunity for smart contract technology to revolutionize the logistics sector. They imply more studies are required to remove the barriers to adopting and providing standardized protocols and frameworks that can make different smart contract networks interoperable.

3 Proposed framework

Using a blockchain-based system that includes sensor data from IoT-enabled shipments and Ethereum smart contract technology is central to our proposal for enhancing the integrity of the strawberry supply chain. These crucial components in the process of triggering warnings are smart contracts that provide all parties involved with the ability to continuously monitor and trace during shipment. The sender, receiver of the shipment, an IoT-enabled container, an Ethereum network that runs the smart contract, and a cloud-based Message Queue Telemetry Transport (MQTT) server that stores, retrieves, and publishes sensor data generated by IoT sensors are some of the components that make up the proposed system. Figure 2 illustrates various components that make up the proposed system. This solution involves four major entities, namely, the sender, the receiver, the IoT device included within the shipment container, and the smart contract. The proposed approach addresses the most important design aspects of our solution, which involve four major participants. In Ethereum, one-of-a-kind Ethereum Addresses (EA) and key pairs can be generated instantly, and there is no centralized authority that is responsible for administering the distribution of keys. The sender is responsible for constructing the smart contract that contains the terms of the sale, which may include variables such as temperature, route, and payment terms.

FIGURE 2
www.frontiersin.org

Figure 2. Proposed methodology of SFSC.

3.1 Blockchain-based SSC

The proposed system utilizes smart contracts and blockchain to retain all transactions and data in blocks. Its implementation in the SSC can yield significant food safety benefits. Various formats for product transparency exist: Ingredients are listed clearly on the label. Safety Data Sheets for the product that are exhaustive and list all substances that are added knowingly. Attestation forms demand complete material disclosure. The principle of transparency mandates that any information aimed at the public or the data subject should be brief, publicly available, and understandable. It also mandates the use of plain language and, when applicable, visuals. This system unites diverse stakeholders in a decentralized supply chain, assuring food safety by providing a transparent and immutable ledger of transactions. With its ability to readily trace the origin of food items, blockchain technology can assist the food industry in improving overall quality and streamlining transportation. In the food sector, there are numerous manufacturers, distributors, and customers who are spread out across the supply chain systems. Industrial procedures that transform fresh produce into consumable food products are referred to as food manufacturing. It entails several procedures, including sourcing, preparing, producing, packaging, and distributing food. Many components used in the production of food are also used in the production of apparel and automobiles. In addition to enhancing food safety, implementing blockchain in FSC can also increase manufacturer and supplier accountability.

3.2 Smart contracts between trading partners

A smart contract can increase supply chain transparency and accountability, allowing consumers to readily identify and avoid unethical practices. This can ultimately result in improved product safety and increased profits for all involved parties. Real-time updates and a digital record of all food transactions can also facilitate traceability and enhance supply chain management processes. In the proposed system, a distinct smart contract is created for each IoT-enabled shipment container, and all entities are linked to the blockchain-based smart contract. Smart contract for self-check is shown in Figure 3, and smart contract for deposit money is shown in Figure 4.

FIGURE 3
www.frontiersin.org

Figure 3. Smart contract for self-check (success scenario).

FIGURE 4
www.frontiersin.org

Figure 4. Smart contract for deposit money.

3.2.1 Variables

Smart contract uses variables that represent numbers and states that reflect specific circumstances and variables, which can be set to private or public. The addresses of the parties involved are also saved as variables in the smart contract, along with the state of the package and the category of violation.

3.2.2 Methods

Methods are essential smart contract functions that enable the contract to carry out specific actions. The methods of the proposed smart contract are intended to generate notifications for violations. The functionality of these methods is directly related to the purpose of the contract, and they may be made public or restricted to specific parties.

3.2.3 Modifiers

Modifiers are used to introduce additional requirements or conditions to a function or method. Before executing a function, they can be used to restrict access to specific methods or verify that certain conditions are met.

3.2.4 Events

Events are a method for logging and tracking essential data within a smart contract, as well as notifying all relevant parties of significant changes or updates. In the context of the proposed system, events can be used to record and disseminate information about supply chain violations, ensuring that all relevant stakeholders are aware of potential problems in real time. This can aid in enhancing supply chain transparency and accountability, thereby helping to ensure the safety and quality of food products for consumers.

3.3 Role of supply chain nodes

Supply chain nodes play a crucial role in the movement and management of goods and information throughout the supply chain. They are the key points where various activities such as sourcing, production, storage, transportation, and distribution take place. Supply chain entities with smart contracts are shown in Figure 5.

FIGURE 5
www.frontiersin.org

Figure 5. Blockchain platform for supply chain entities.

3.3.1 Manufacture

Accepting raw materials, supervising the manufacturing process, conducting quality control checks, and administering packaging are all responsibilities of the supply chain manager. In addition, it is essential for the manager of the supply chain to ensure high levels of production, quality, and worker efficiency.

3.3.2 Supplier

The company establishes a network of contacts and employs suppliers for the necessary raw materials to manufacture its product. During this phase, supply chain administrators are responsible for maintaining company–supplier relationships. In this component, a supply chain manager is primarily responsible for sending products safely to the supply chain.

3.3.3 Container

IoT-enabled containers in the supply chain are cargo containers equipped with IoT technology. These containers are outfitted with sensors and devices that can capture and transmit real-time data such as location, temperature, humidity, pressure, and other environmental factors that impact the condition of the transported goods. The IoT platform collects and analyzes data from these sensors in order to monitor the condition of transported products. In the event of any deviations from the desirable conditions, alerts are generated so that the necessary steps can be taken to prevent any potential damage to the goods.

3.3.4 Sender

The sender initiates a smart contract which is referred to as the seller, who conducts a package inspection of the IoT container to ensure the condition of the freight. On the other hand, the consumer is responsible for the deposit payment (in Ether), and payment will only be made to the vendor if the shipment is delivered to the consumer without damage or violation.

3.3.5 Receiver

When a consumer requests a return, the company arranges for the collection of any defective, excess, or unwanted items. It is essential to have an efficient and effective return management system. If a product is damaged, the manufacturer either repairs it or disposes it in a responsible manner. Nevertheless, if a returned product is still in excellent condition, the company may decide to return it to the warehouse for resale.

3.4 Transport practices for SSC

Fresh fruits, such as strawberries, must be transported and stored with great care to preserve their quality and extend their expiration life. Due to their sensitivity to temperature, it is essential to adhere to specific transportation requirements and conditions to ensure their marketability. The proposed method is designed particularly for handling perishable fruits, and the cold chain principle is utilized to maintain their quality during transport. Strawberries are especially delicate and necessitate refrigerated transport and cautious route planning to ensure prompt and secure delivery. During the transfer of food products from warehouses to refrigerated trucks, temperature fluctuations can cause condensation on the surface of the product, resulting in premature spoilage. Refrigerated vehicles with air circulation devices are used to ensure that the containers are properly ventilated and that ethylene and heat generated by the supply chain process are removed. To confirm ventilation, the distance between the top surface of the container and the roof of the cooler must be between 30 and 50 cm, and 3 to 5 cm should be maintained between the rows of boxes. Before loading, strawberries must be chilled to 32°F. During the summer months, strawberries tend to warm up during transport, so it is essential to avoid loading damaged containers and cool them to 32°F before loading. Some food items1 with the temperature modes during the transportation of fruits are shown in Table 1.

TABLE 1
www.frontiersin.org

Table 1. Temperature modes of different fruits.

3.5 IoT enable container

IoT can enable container supply chain management by providing real-time visibility, tracking, and monitoring of containers throughout their journey from the starting to the ending point. This allows for better management of the container supply chain, including improved tracking of the containers' location, temperature, humidity, and other environmental conditions. IoT devices can also provide information on container conditions, such as whether the container has been damaged or tampered with, and if it has been opened during transit. This allows for early identification of potential problems and enables the container supply chain to take corrective actions in a timely manner. Furthermore, IoT-enabled containers can provide data that can be used to optimize the supply chain and reduce costs. By tracking the location and status of containers, shipping companies can improve their delivery times, reduce fuel costs, and optimize their routes. Overall, IoT can provide a significant improvement in container supply chain management, offering better visibility, increased efficiency, and cost savings.

All sensors are linked with A Raspberry Pi 3 inside the container, which serves as the onboard IoT processing hardware. For periodic data transmission to the MQTT server and communication with the Ethereum-based blockchain network, 4G or 5G connectivity is needed. Both the sender and the destination automatically receive push warnings and notifications when specific requirements are not satisfied or violations take place while being transported. On the Raspberry Pi, a rule-based engine that requires specific rules to be specified for each sensor reading is used to find violations. The criteria and their thresholds may be altered in accordance with the nature of the cargo with the approval of the sender and receiver. Failure to comply with the rules constitutes a violation. The cargo container closely monitors the sensor data and starts particular processes when they diverge.

3.6 MQTT server

A broker is a server that facilitates communication between clients within an MQTT system. MQTT is frequently implemented in IoT-based initiatives. Using specific rules for each sensor input, the Raspberry Pi's rule-based engine identifies infractions. Any deviation from these guidelines constitutes a rule violation. All data collected by IoT sensors are installed in the container and published on an MQTT server hosted in the cloud. IoT-enabled container, cloud-hosted MQTT server, sensors, Raspberry Pi, and the contract on the Ethereum blockchain are all interconnected, as shown in Figure 6. Whenever any violation occurs, the readings are sent to the smart contract, which communicates with the seller and the consumer.

FIGURE 6
www.frontiersin.org

Figure 6. Interaction of MQTT server with IoT and blockchain.

3.7 Solution for FSC industry

The SSC is susceptible to a number of industrial obstacles. As strawberries are a seasonal crop, their highest production occurs in many regions during the spring and early summer. Growers and distributors must coordinate their efforts to ensure the year-round availability of fresh strawberries, which can complicate the supply chain. In addition, strawberries are highly perishable and require cautious transportation to preserve their quality; therefore, delays or insufficient temperature control during shipping can result in spoilage or a shorter shelf life. As with any other food item, it is essential to guarantee the safety of strawberries by preventing their contamination with harmful substances. This necessitates caution on the part of growers and processors, as well as the maintenance of appropriate storage and handling procedures by distributors, in order to minimize the risk of spoilage or contamination. The FSC industry must continue to address issues such as labor, transportation, food safety, and sustainability and collaborate to ensure a reliable and sustainable strawberry supply chain. The proposed methodology intends to address these issues.

Transparency and visibility of products are improved using blockchain technology and IoT devices. IoT enables tracking of the movement of strawberry containers from the source to the destination. Each step in the supply chain can be recorded on the blockchain, and IoT devices monitor the temperature and humidity of the strawberries during transport, ensuring that they remain fresh and of high quality. MQTT server publishes data of sensors to Ethereum-based smart contract. The safety of strawberries can be ensured by utilizing blockchain technology to create an immutable record of their origin, processing, and distribution. This aids in the prompt identification of any food safety issues, and the source of the problem can be readily identified. The transactions are perpetually recorded in a distributed ledger, ensuring the immutability of the product. In addition, the journey of the container is monitored by IoT sensors that measure crucial parameters such as temperature and humidity. The optimal SSC can be achieved by integrating blockchain and IoT technology, enabling supply chain-wide transparency. The automation of specific aspects of the strawberry supply chain, such as quality control and payment processing, is also dependent on smart contracts. For instance, a smart contract could be designed to release payment to the farmer only after the strawberries have been delivered to the distributor and have passed quality control. Overall, blockchain technology and IoT devices present various potential solutions to the supply chain issues encountered by the strawberry industry. These technologies can enhance traceability, food safety, sustainability, and automation, assuring consumers of a reliable, high-quality supply of fresh strawberries.

4 Implementation details

The Solidity code for the smart contract was created using the online Remix IDE. Three parties are involved in a contract, namely, the owner of the contract, the IoT-enabled container, and the receiver. All of these parties have a unique Ethereum address and can interact with the contract in different ways at different times. The smart contract was created with modifiers that limit access to particular supply chain processes, preventing any of the parties from calling unauthorized functions. A complete success scenario of the proposed system that is provided for the stakeholders is discussed in Figure 7.

FIGURE 7
www.frontiersin.org

Figure 7. Complete flowchart of success scenario SFSC.

For instance, checkContainer () and checkRequirements () can only be accessed by the sender, and all supply chain nodes are linked to the smart contract. The blockchain network has assigned each node a distinct EA. IoT makes it possible for containers to attach various sensors to the Raspberry Pi and for the MQTT server to continuously harvest sensor data and send it to the smart contract. For IoT devices to communicate with one another via the MQTT protocol, an MQTT server serves as a central hub. It controls the message flow between devices, ensuring that only the intended receivers receive messages. A cloud-based server of MQTT has a communication protocol for smart contracts and sensors. The contract will first be available on a blockchain network; only the owner can make it available.

By employing modifiers, different roles have been assigned to each node. A modifier in Solidity is a piece of reusable code that can be added to a function to alter its behavior. Modifiers frequently enforce limits or conditions on a function, for example, by verifying that the caller of the function has the proper permissions to run it or that a particular need has been satisfied before running the function. In Solidity, modifiers are a specific function for enhancing flexibility and security in your contracts. Following the deployment owner's call to the method “checkContainer,” The container's state is changed from “Not Ready” to “Ready State” via this function. Following that, the “performSelfCheck” function will be called. All prerequisites will be verified, such as the sensor being installed, all the objects being loaded, sensor status, and operating conditions. The okay message will be issued if all the requirements are met. If not, the container will once more be examined. Following that, only the receiver can call sendMoney (), as shown in Figure 8, which displays the attributes used in the contract code. Money will flow to the contract owner once the payment procedure is complete, and the invoice will be returned to the sender. The status of the container is updated to “PreparedforDispatch” once the shipment is prepared to begin. The shipment is delivered after the contract owner makes the “StartShippment” call. The receiver will examine the invoice to confirm that the user is valid when the package arrives at its destination. The sender will open the package to inspect the contents after verifying the invoice. The recipient checks the item given to see if it meets all standards, including temperature, food item quality, and timely arrival. The goods will be provided to the purchaser once they are satisfied.

FIGURE 8
www.frontiersin.org

Figure 8. Sequence diagram of SFSC.

If any violations associated with the enable container are detected after the checkContainer () function has been completed, the shipping container will activate the violationOccurred () function in the smart contract. This function accepts three parameters: a string representing the event's message, an enum representing the type of violation, and the message presenting the violation. This function, when invoked, transforms the status of the package to aborted and refunds the recipient. The sender creates a smart contract to eliminate a third-party role between the source and destination. The Raspberry Pi board then conducts a self-check and invokes the checkContainer () function in the smart contract to continue shipment. If the self-check fails, the container must be checked again, as shown in Figure 8, to ensure that both the sender and the receiver have belief in the source of the container and that it functions without flaws before shipping. Upon shipment delivery, the receiver presents the invoice; after verification, the container will unlock and the shipment can be taken by the customer.

5 Result and testing

In this section, we will describe the testing strategy for validating the proper operation of three essential features. As shown in Figure 9, we will initially deploy the smart contract on a blockchain network. Once the contract has been effectively implemented, we will confirm that the status of the package has been accurately updated to reflect the flow of the shipment. During testing, we will set the gas limit for sender deposits to 3,000,000 and the transaction value to Ether. After the deployment of the smart contract function checkContainer () will be called, successful execution of this function is shown in Figure 10.

FIGURE 9
www.frontiersin.org

Figure 9. Smart contract deployment.

FIGURE 10
www.frontiersin.org

Figure 10. Smart contract function of check container.

The second component of our testing strategy involves initiating and logging relevant events. We used three unique Ethereum addresses, each with an initial balance of 100 Ether, to conduct these experiments in Remix. Before executing specific functions, one of the primary focuses of testing was to ensure that the state of the package had been updated accurately. This was essential to ensure the correct execution of flow and order. As shown in Figure 11, an error would be displayed if the proprietor attempted to execute the performSelfCheck () function without the correct state. As shown in Figure 12, if the container address called this function, it would be successfully executed.

FIGURE 11
www.frontiersin.org

Figure 11. Smart contract function for performing self-check (failure).

FIGURE 12
www.frontiersin.org

Figure 12. Smart contract function for performing self-check (successful).

A same type of error will occur if a function is called by the incorrect entity, such as instead of calling the recipient, the IoT-enabled shipment container is called. For testing purposes, the price of the shipment is set at 5 Ether. The function sendMoney (address) will always be called by the sender, and Ether will be transferred to the receiver. After effectively executing this function, the log will indicate that “Money deposited and invoice sent to the recipient.” This message will only appear in the log if the deposited funds are equal to 5 Ether, and the recipient has also sent an invoice. Once the event is activated, the recipient's address will have 5 less Ether. After the shipment has arrived at its destination, the authorized recipient should verify the correct invoice, examining factors such as temperature, humidity, arrival time, and the freshness of the food. In the event of a violation, the shipment will be rejected, and the user's payment will be refunded via the refundPayment (address) method.

5.1 Function testing

Testing the execution of a smart contract in Ethereum incurs gas costs, which are fees paid to miners for executing the code on the network. To ensure an efficient and cost-effective Solidity code, it is essential to consider the gas costs of various operations. Before deploying the code to the live network, testing it with tools such as Remix and Ganache can help identify potential gas cost issues. The total quantity of gas required to execute a particular transaction is the transaction cost. When evaluating an Ethereum smart contract, it is essential to consider the execution cost of the contract. The cost of execution is the quantity of petroleum required to carry out the contract. Gas is a measurement of the computational effort required to execute the contract, and it is paid in Ether by the contract initiator. To evaluate the cost of a contract's execution, an individual can use the Remix IDE's built-in gas estimator. This tool estimates the quantity of gas required to execute a contract based on the contract's code and input parameters. A contract's execution cost must be evaluated to ensure efficiency and cost-effectiveness. A contract that requires excessive gas to execute may be too costly for users to interact with, resulting in low adoption and utilization.

Remix-Ethereum IDE was used to find out the execution cost, transaction cost, and gas used for testing an Ethereum smart contract. These tools provide information regarding the amount of gas consumed by each function call and the entire transaction cost. A smart contract can be compiled using the Solidity compiler in Remix, then it can be deployed and tested in the Deploy & Run Transactions tab. After each function call, the console will display the amount of petroleum consumed and the transaction cost. Similarly, we write test cases for each smart contract function and execute them via the Remix console. After each test, the console will display the amount of gas consumed and the transaction cost.

In the Ethereum platform and Solidity programming language context, gas cost calculation refers to the amount of computational resources required to execute a specific operation on the Ethereum blockchain. Each operation or transaction on the Ethereum blockchain requires a certain amount of gas to be executed. Gas is a unit of measurement for the computational effort required to complete a transaction. The gas cost of various functions is determined for testing purposes while transporting different shipments. Here, only two smart contract functions of gas cost have been discussed. First, at the initial invocation of the checkContainer () function, the gas cost is “31,095.” The average gas cost of a particular operation or transaction can vary depending on factors such as network congestion and the complexity of the operation. Subsequently, after calling this function five times, the average gas cost is “28197.2.” After 10 calls, it is 35746.6, and after 20 calls, it is “34722.6,” as shown in Figure 13.

FIGURE 13
www.frontiersin.org

Figure 13. Gas cost of smart contract function of check container.

The average gas cost of a performeSelfCheck () function has been calculated. After calling this function the first time, the gas cost is “13,843.” After calling this function five times, the average gas cost is estimated to be “13,166.” After 10 calls, the average gas cost increased to “14,563”; after 20 calls, it decreased to “11,045,” as shown in Figure 14.

FIGURE 14
www.frontiersin.org

Figure 14. Gas cost of smart contract function perform self-check.

It is essential to keep in mind that the time execution can change based on the input parameters and the condition of the contract at the time that the execution takes place. Because of this, it is a good idea to test the function with various input parameters to obtain a more accurate estimate of the amount of time it will take to carry out the function.

For the time calculation of functions of a smart contract, two functions have been tested, namely, checkContainer () and performSelfCheck (). Different parameters are used for function testing; for the first time, the checkContainer () function takes “80.4 ms” to execute the function. The average of 5-time execution is “120.7 ms,” 10-time execution is “239.5 ms,” and 20-time execution of function is “420.6 ms,” as shown in Figure 15.

FIGURE 15
www.frontiersin.org

Figure 15. Execution time of smart contract function check container.

Different parameters are also used for the second function testing; for the first time, the performSelfCheck () function takes “109.7 ms” to execute the function. The average of 5-time execution is “150.4 ms,” 10-time execution is “285.6 ms,” and 20-time execution of function is “415.3 ms,” as shown in Figure 16.

FIGURE 16
www.frontiersin.org

Figure 16. Execution time of smart contract function perform self-check.

6 Conclusion and future work

In this study, we proposed a blockchain-based FSC solution for the FSC industry. Our proposed methodology is the combination of IoT and blockchain technology, specifically smart contracts, to ensure the delivery of strawberry products of the highest quality to end users. The IoT-enabled container ensures the quality of the strawberry, temperature, humidity, and location of shipment. MQTT cloud-based server continuously fetches all the information from sensors and transfers it to the blockchain network. While our framework emphasizes the SFSC, blockchain-based smart contracts are developed for generic purposes and are also applicable for other fresh good-transporting supply chain networks. Implementation conducted using Remix IDE, the functionality of the smart contract code, concentrating on the cases involving delivery trustworthiness, breach detection throughout transportation. Furthermore, the proposed system can be modified by deploying our smart contracts on the Hyperledger platform and developing Decentralized Applications (dApps) that integrate real-world entities in a supply chain.

Data availability statement

The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

Author contributions

MG: Data curation, Formal analysis, Methodology, Resources, Validation, Visualization, Writing—original draft. MK: Conceptualization, Data curation, Formal analysis, Investigation, Writing—original draft. AH: Formal analysis, Investigation, Methodology, Validation, Writing—original draft. HA: Investigation, Methodology, Software, Visualization, Writing—original draft. MS: Conceptualization, Methodology, Supervision, Writing—review & editing.

Funding

The author(s) declare that no financial support was received for the research, authorship, and/or publication of this article.

Acknowledgments

The authors would like to thank the Deanship of Scientific Research at Umm Al-Qura University for supporting this work.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Publisher's note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

Footnotes

References

Abdallah, S., and Nizamuddin, N. (2023). Blockchain based solution for pharma supply chain industry. Comput. Ind. Eng. 177, 108997. doi: 10.1016/j.cie.2023.108997

CrossRef Full Text | Google Scholar

Behnke, K., and Janssen, M. (2020). Boundary conditions for traceability in food supply chains using blockchain technology. Int. J. Inf. Manag. 52, 101969. doi: 10.1016/j.ijinfomgt.2019.05.025

CrossRef Full Text | Google Scholar

Bhat, S. A., Huang, N. -F., Sofi, I. B., and Sultan, M. (2021). Agriculture-food supply chain management based on blockchain and IoT: a narrative on enterprise blockchain interoperability. Agriculture 12, 40. doi: 10.3390/agriculture12010040

CrossRef Full Text | Google Scholar

Coronado Mondragon, A. E., Coronado Mondragon, C. E., and Coronado, E. S. (2021). Managing the food supply chain in the age of digitalisation: a conceptual approach in the fisheries sector. Prod. Plan. Control 32, 242–255. doi: 10.1080/09537287.2020.1733123

CrossRef Full Text | Google Scholar

Dabbene, F., and Gay, P. (2011). Food traceability systems: performance evaluation and optimization. Comput. Electron. Agric. 75, 139–146. doi: 10.1016/j.compag.2010.10.009

CrossRef Full Text | Google Scholar

Duan, J., Zhang, C., Gong, Y., Brown, S., and Li, Z. (2020). A content-analysis based literature review in blockchain adoption within food supply chain. Int. J. Environ. Res. Public Health 17, 1784. doi: 10.3390/ijerph17051784

PubMed Abstract | CrossRef Full Text | Google Scholar

Hackius, N., and Petersen, M. (2017). “Blockchain in logistics and supply chain: trick or treat?,” in Digitalization in Supply Chain Management and Logistics: Smart and Digital Solutions for an Industry 4.0 Environment. Proceedings of the Hamburg International Conference of Logistics (HICL), Vol. 23 (Berlin: epubli GmbH), 3–18.

Google Scholar

Hasan, H., AlHadhrami, E., AlDhaheri, A., Salah, K., and Jayaraman, R. (2019). Smart contract-based approach for efficient shipment management. Comput. Indus. Eng. 136, 149–159. doi: 10.1016/j.cie.2019.07.022

CrossRef Full Text | Google Scholar

Kamble, S. S., Gunasekaran, A., and Gawankar, S. A. (2020). Achieving sustainable performance in a data-driven agriculture supply chain: a review for research and applications. Int. J. Prod. Econ. 219, 179–194. doi: 10.1016/j.ijpe.2019.05.022

CrossRef Full Text | Google Scholar

Kaur, A., Singh, G., Kukreja, V., Sharma, S., Singh, S., and Yoon, B. (2022). Adaptation of IoT with blockchain in food supply chain management: an analysis-based review in development, benefits and potential applications. Sensors 22, 8174. doi: 10.3390/s22218174

PubMed Abstract | CrossRef Full Text | Google Scholar

Kelly, K., Madden, R., Emond, J. P., and do Nascimento Nunes, M. C. (2019). A novel approach to determine the impact level of each step along the supply chain on strawberry quality. Postharvest Biol. Technol. 147, 78–88. doi: 10.1016/j.postharvbio.2018.09.012

CrossRef Full Text | Google Scholar

Kittipanya-Ngam, P., and Tan, K. H. (2020). A framework for food supply chain digitalization: lessons from Thailand. Prod. Plann. Control 31, 158–172. doi: 10.1080/09537287.2019.1631462

CrossRef Full Text | Google Scholar

Kouhizadeh, M., and Sarkis, J. (2018). Blockchain practices, potentials, and perspectives in greening supply chains. Sustainability 10, 3652. doi: 10.3390/su10103652

CrossRef Full Text | Google Scholar

Kumar, S., Raut, R. D., Agrawal, N., Cheikhrouhou, N., Sharma, M., and Daim, T. (2022). Integrated blockchain and Internet of Things in the food supply chain: adoption barriers. Technovation 118, 102589. doi: 10.1016/j.technovation.2022.102589

CrossRef Full Text | Google Scholar

Lezoche, M., Hernandez, J. E., Alemany, M. M. E., Panetto, H., and Kacprzyk, J. (2020). Agri-food 4.0: a survey of the supply chains and technologies for the future agriculture. Comput. Ind. 117, 103187. doi: 10.1016/j.compind.2020.103187

CrossRef Full Text | Google Scholar

Manning, L. (2018). “Systems for sustainability and transparency of food supply chains,” in Sustainable Food Systems From Agriculture to Industry, ed C. M. Galanakis (London: Elsevier), 153–187. doi: 10.1016/B978-0-12-811935-8.00005-6

CrossRef Full Text | Google Scholar

Mastilović, J., Kukolj, D., Kevrešan, Ž., Ostojić, G., Kovač, R., Derić, M., et al. (2023). Emerging perspectives of blockchains in food supply chain traceability based on patent analysis. Foods 12, 1036. doi: 10.3390/foods12051036

PubMed Abstract | CrossRef Full Text | Google Scholar

Niu, X., and Li, Z. (2019). “Research on supply chain management based on blockchain technology,” in Journal of Physics: Conference Series (Shanghai: IOP Publishing). doi: 10.1088/1742-6596/1176/4/042039

CrossRef Full Text | Google Scholar

Queiroz, M. M., Telles, R., and Bonilla, S. H. (2020). Blockchain and supply chain management integration: a systematic review of the literature. Supply Chain Manag. Int. J. 25, 241–254. doi: 10.1108/SCM-03-2018-0143

CrossRef Full Text | Google Scholar

Rejeb, A. (2018). Halal meat supply chain traceability based on HACCP, blockchain and Internet of Things. Acta Technica Jaurinensis 11, 218–247. doi: 10.14513/actatechjaur.v11.n4.467

CrossRef Full Text | Google Scholar

Rünzel, M. A., Hassler, E. E., Rogers, R. E., Formato, G., and Cazier, J. A. (2021). Designing a smart honey supply chain for sustainable development. IEEE Consum. Electron. Mag. 10, 69–78. doi: 10.1109/MCE.2021.3059955

CrossRef Full Text | Google Scholar

Saurabh, S., and Dey, K. (2021). Blockchain technology adoption, architecture, and sustainable agri-food supply chains. J. Clean. Prod. 284, 124731. doi: 10.1016/j.jclepro.2020.124731

CrossRef Full Text | Google Scholar

Srivastava, H. S., and Wood, L. C. (2015). “Cloud computing to improve agri-supply chains in developing countries,” in Encyclopedia of Information Science and Technology, Third Edition, ed M. Khosrow-Pour (Hershey, PA: IGI Global), 1059–1069. doi: 10.4018/978-1-4666-5888-2.ch101

CrossRef Full Text | Google Scholar

Turri, A. M., Smith, R. J., and Kopp, S. W. (2017). Privacy and RFID technology: a review of regulatory efforts. J. Consum. Aff. 51, 329–354. doi: 10.1111/joca.12133

CrossRef Full Text | Google Scholar

Verhoeven, P., Sinn, F., and Herden, T. T. (2018). Examples from blockchain implementations in logistics and supply chain management: exploring the mindful use of a new technology. Logistics 2, 20. doi: 10.3390/logistics2030020

CrossRef Full Text | Google Scholar

Wang, Y., Han, J. H., and Beynon-Davies, P. (2019). Understanding blockchain technology for future supply chains: a systematic literature review and research agenda. Supply Chain Manag. Int. J. 24, 62–84. doi: 10.1108/SCM-03-2018-0148

CrossRef Full Text | Google Scholar

Yakovleva, N. (2007). Measuring the sustainability of the food supply chain: a case study of the UK. J. Environ. Policy Plann. 9, 75–100. doi: 10.1080/15239080701255005

CrossRef Full Text | Google Scholar

Zhao, G., Liu, S., Lopez, C., Lu, H., Elgueta, S., Chen, H., et al. (2019). Blockchain technology in agri-food value chain management: a synthesis of applications, challenges and future research directions. Comput. Ind. 109, 83–99. doi: 10.1016/j.compind.2019.04.002

CrossRef Full Text | Google Scholar

Zhao, X., Xia, M., Wei, X., Xu, C., Luo, Z., and Mao, L. (2019). Consolidated cold and modified atmosphere package system for fresh strawberry supply chains. Lwt 109, 207–215. doi: 10.1016/j.lwt.2019.04.032

CrossRef Full Text | Google Scholar

Keywords: strawberry supply chain management, smart contract, Ethereum blockchain, Internet of Things, food supply chain

Citation: Gondal MUA, Khan MA, Haseeb A, Albarakati HM and Shabaz M (2023) A secure food supply chain solution: blockchain and IoT-enabled container to enhance the efficiency of shipment for strawberry supply chain. Front. Sustain. Food Syst. 7:1294829. doi: 10.3389/fsufs.2023.1294829

Received: 15 September 2023; Accepted: 24 October 2023;
Published: 23 November 2023.

Edited by:

Muhammad Faisal Manzoor, Foshan University, China

Reviewed by:

Azeem Irshad, International Islamic University, Islamabad, Pakistan
Rubal Jeet, CGC College of Engineering, India

Copyright © 2023 Gondal, Khan, Haseeb, Albarakati and Shabaz. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Mohammad Shabaz, bhatsab4@gmail.com

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.