Keywords

1 Introduction

India is known for its agricultural sector. Nowadays, food safety has become a most important issue for all of us. Are we aware of the food we consume? Is it safe or not? Can we trace back the food product to its originating farm? In the food supply chain, a lot of food products are found and among these food products in the supply chain, many food frauds take place like food tampering, adulteration, etc. Every one in ten people is affected by consuming contaminated food worldwide, of which the highest risk is with children, especially under the age of five according to WHO [1]. Hence, tracking the journey of food has become essential. Traceability means the ability to trace the food product instantly in the entire lifecycle from its origin through every stage in its journey to the consumer. The consumer can acquire a detailed journey of the food product by just scanning the QR code, which increases transparency and trust for food markets.

This paper covers the use of blockchain to implement a decentralized food tracing and tracking system. The paper is more focused on the following points:

  1. 1.

    Proposal of blockchain-based food traceability system that uses “permissioned blockchain.”

  2. 2.

    Review of existing blockchain framework suited for constructing blockchain-based food traceability system [2].

2 Related Work

Along with living standards improved, food spices and additives result in varied manufactured food in the market. Some ignorant manufacturers that want to lower the cost and increase yield may lead to more uncertainty about food safety. Since food safety scandals continued to happen, food traceability has been highlighted as an important measure to get rid of the impact on the industry. In terms of current existing supply chain technologies, fundamental technologies for tracking physical goods have been around for years, such as bar codes, radio frequency identification (RFID) tags, and other data collecting sensors. Several other researchers consider the application of advanced technology, especially RFID technology, in supply chain. Sari builded a simulation model for supply chain firm to find out under what kinds of conditions the investing in RFID technology is more beneficial for the firm. The study results depicted that using RFID technology in supply chain will provide more benefits when the collaboration among supply chain participants is more intensive [3].

Wang et al. proposed a rule-based decision support system to fulfill the real-time monitoring of agri-food products during their distribution process. Based on the information transmitted by sensor-RFID equipment from the refrigerated containers, this system calculated the remaining value and shelf-life time of agri-food products in transmission [4]. Ustundaga and Tanyasb presented a simulation model to obtain the expected profits of using an RFID-based system in supply chain by calculating the performance increase in efficiency, security, accuracy, and visibility [5].

Proposed by Vatalik Buterin in 2014, Ethereum is a permissionless blockchain network optimized for smart contracts that uses its own crypto currency called Ether. Ethereum supports various functions, including smart contracts, decentralized transactions. It is believed that Ethereum is the first application of decentralized autonomous organizations. Ethereum provides an infrastructure to blockchain with a fully developed Turing complete programming language that provides an environment to create smart contracts by writing the logic with less code. This allows users to create systems they want, as well as other applications that are not related to crypto currency [6].

3 Introduction to Blockchain Technology

3.1 Basic Concepts of Blockchain

Blockchain consist of record as block associated with each other using cryptography. Each block in the blockchain contains data, hash, and hash of the previous block [7]. It provides a feature where data is saved in a distributed ledger in such a way that it cannot be changed or erased. This feature of blockchain makes it immutable. Tampering is difficult in blockchain as each block is connected to the previous block. Blockchain can be classified as public blockchain and private blockchain. Public blockchain provides access to anybody without any restriction, on the other hand, private blockchain has a restriction where only specific people can read and interact with it. Blockchain also provides the feature of building a decentralized application where you can build or add blockchain to your personal application.

3.2 Distributed Ledger

Distributed ledger is like a database that is replicated, synchronized, and distributed within the members or nodes of the network [8]. The distributed ledger consists of records of exchange of data in the network. Distributed ledger is independent of third-party administration functionality like traditional databases [9]. The advantage of the distributed ledger is the absence of central authority. Distributed ledger technology could significantly change the supply chain structure, making it more reliable. Distributed ledger technology application can change or replace the manual and inefficient work in the industry of supply chain.

3.3 Smart Contract

Smart contract is similar to a real-world contracts. The only significant difference is that they are completely digital. Smart contracts are immutable modular programs that are integrated into the blockchain system.

3.3.1 Smart Contract in Food Traceability System

Smart contract can enhance transparency in supply chain by recording these sources of goods by storing information such as date, location, and quality on a blockchain. The origin of the product can be easily verified, which will provide assurance to manufacturing that their raw materials are coming from reliable sources and the consumer has more confidence that they are purchasing a legitimate product by allowing the digital form of verification to be created by the blockchain. The smart contract can also help with transparent authorization across the network parties which will help to easily verify that other parties have the requisite certification to carry out their duties for which reliability can be recorded and managed on a blockchain as well, which will allow supply chain managers to make a more informed decision when selecting suppliers. And spur suppliers to work hard to maintain a good track record. Smart contract can provide traceability within the supply chain by tracking the inventory at every stage along the way from its raw material source to end-user delivery.

3.4 Ethereum

Ethereum is public blockchain such as distributed computing system containing smart contract features. The centralized approach has single entity control that can lead to single point failure, making the system more vulnerable to attacks. Single point failure is not possible in Ethereum due to its architecture. It is run by a lot of people all over the world so it cannot go offline. Ethereum uses peer-to-peer architecture. Ethereum network is protected by decentralized network and cryptography [10].

3.5 Consensus

Consensus mechanism is the rule or algorithm where all the members should agree on certain terms and conditions that would be standard for all nodes on the network. Some of the consensus algorithms are as follows:

3.5.1 Proof-of-Stake

In proof-of-stake (PoS), the block producers are called validators instead of miners. Validators must provide a deposit or stake in order to participate in the process of block creation. In proof-of-stake, validators are chosen based on some selection algorithm that takes their stake into account. Once the validator is selected, they have the right to create a block. The other validators are not wasting energy doing any computation work since they are not selected.

3.5.2 Proof-of-Authority

The proof-of-authority (PoA) has the independent pre-selected authorized validators. Validators can validate the PoA-based network, block, and transaction. The validators can have authorities to insert the transaction in the blocks and do not require to monitor their computer system. Validators are service authorities who secure the network and seal the blocks (Fig. 1; Table 1).

Fig. 1
figure 1

Flow diagram of food traceability system

Table 1 Significant difference between PoS and PoA

4 Proposed System Methodology

4.1 Various Roles Involved in Food Traceability System

4.1.1 Farmer

Farmers will cultivate the crops and request farm inspector for inspections.

4.1.2 Farm Inspector

Farm inspectors are responsible for inspecting farms and updating the information like crop family, type of seeds, and fertilizers used for growing the crops.

Farm inspector will visit the farm and do the necessary inspections. After inspecting the farm, the farm inspector will generate the detailed report of the inspection and keep it as a record for future purpose.

4.1.3 Processor

Processors are the organizations who process raw food materials by maintaining them at particular temperature and humidity and make it ready for packaging and to sell into markets. Processor adds the information like quantity, temperature, packaging date and time, processor name, and processor address.

Processors will send quotations to the farmers. The farmers will accept the quotation if it is feasible for the farmers to sell it to the processor.

4.1.4 Distributor

Distributors accept orders from retailers and deliver food product to them. If product is not sufficient in the warehouse, then distributor places order to processors to fill their warehouse.

4.1.5 Retailer

Retailers will sell the products to the actual end-user, i.e., to the consumers.

4.2 Overall Working of the Food Traceability System

Figure 2 shows the overall working of the proposed system.

Fig. 2
figure 2

System workflow diagram

All details shared between participants on the network will be verified using smart contracts. First, the farmer will register himself into the system. After cultivating the crops, farmer will request batch creation to admin. Admin will create the batch with new batch id and will allocate farm inspector based on nearby location for the inspection to the requesting farmer and will update the blocks. Farm inspector will inspect the crops and update and store the details such as crop id, fertilizers used, types of seeds, estimated date of expiry, and farm address on the blockchain which will be hashed data. After inspection stage, farmer will request for selling his crops to the processor with crop details like quantity, crop types, estimated selling price, etc. Respective processors who want to buy the crops will send quotation to the farmer. Farmer will select the best price suitable for him/her and even proposed system will recommend the best price to the farmer. Crops will be transported to the processor with crop details such as crop id, quantity, and farm inspector details. The processor will verify the details provided by the farmer with a farm inspector with smart contract and if details are verified, the processor will release the payment to the farmer. The processor will maintain the temperature, humidity, will roast the coffee, and update the details on the blockchain with packaging date and time, estimated expiry date, and the batch id. Batch will be transported to the warehouse by the distributor and all quality parameters will be verified with a smart contract with temperature, humidity, quantity, etc. Finally, the product will be transported to the retailer where he/she can trace all the required details about the product.

All data on the system will be hash data which is immutable and provides openness which increases the trust of the consumer.

5 Advantages and Disadvantages of Food Traceability System Using Blockchain and QR Code

5.1 Advantages

5.1.1 Tracking and Traceability Management

Food supply chain traceability builds a kind of information chain which would provide the information on food safety, processing of food, sales of the food, customer information, etc. Blockchain system makes the supply chain transparent and open; so, tracking becomes easy. Defective product could be easily caught within the supply chain with the support of tracking and transparency in the system [11].

5.1.2 Fake Products Can Be Caught

Applying the QR code allows the traceability of the product. The manual operation is not needed so the mistakes caused by human factors are avoided. The members in the blockchain cannot modify the data, which will increase the safety and quality of the product [11].

5.2 Disadvantages

5.2.1 High Cost

The system requirements for running the blockchain are high. Establishing of a traceability system needs huge investment in types of equipment and updating old equipment [11].

5.2.2 Changes in Blockchain Technology

Blockchain technology is still in the developing phase, and there are some obstacles to expanding it. The transaction capacity of blockchain is seven transactions per second due to the restricted block size. Another problem is increasing the size of the blockchain for storage and synchronization [11].

5.3 Benefits for Participants

Figure 3 shows the benefits of participants in the proposed system which are listed below

Fig. 3
figure 3

Benefits for members in food traceability system

5.3.1 Farmer

Farmer would get various choices for quotations from processor and can select best profitable quotation.

5.3.2 Processor

Processor would be able to determine any kind of food tampering done by farmer as the processor will verify the quality of the food with farm inspector using smart contract.

5.3.3 Retailer

If there is any hazardous product present, stores can identify and remove only the hazardous items. This eliminates the need for costly batch recalls.

5.3.4 Consumer

The consumer could traceback the food product which provides transparency which increases the trust toward supply chain.

6 Conclusion and Future Scope

The study transforms the traditional supply chain management system into a decentralized food traceability system. The proposed system will track the item moving through every stage, which will be transparent throughout the chain and status of the chain will be displayed, i.e., what details are updated by every participant on the chain will be visible in timeline flow. In the future, information about sales can be provided to the farmer, which can motivate them to grow more efficient crops in large number. Blockchain and IoT together can drastically change supply chain. IoT can provide real-time monitoring support shared with distributed ledgers, which can make supply chain more accurate and scalable.