Keywords

1 Introduction

Blockchain is an efficient technology that has pioneered solutions in many domains. India is an agrarian country and yet the conditions and arduous struggles of our farmers required immediate solutions. As of 2018, in Maharashtra alone, more than 60,000 suicides had taken place, with an average of 10 suicides every day [1]. This catastrophe needs rectification. Blockchain can really improve the tracking of crops and eliminate any wastage of resources (monetary or crops), while transferring from farmer to customers. The system is like a ledger record, having every transaction, monetary and process, at every stage of movement of the crop. It begins with recording, which farmer harvests and sends the crop to a storage facility including a timestamp. The blockchain is public, allowing new farmers to assimilate easily. The system would be operating in real time and accessible to all. Currently, the project aims to tackle only one crop, i.e. grapes. The attributes it factors in are, cost, time and to some extent quality. This can be scaled up to crop management, soil management and extend to other crops as well. The input data used is primarily from the state of Maharashtra, since grapes are predominantly cultivated in the state of Maharashtra. The system can be used for the entire country. The ease of utility for farmers, so that they can independently get on the blockchain and utilize tools to understand the market prices, mark up on their crops and the profit margins they can get. This can be achieved using a mobile application.

2 Literature Survey

The study is aimed to guarantee optimized income for farmers from a supply chain management perspective. The key issue is building a decentralized information system which is transparent for the whole agricultural supply chain. By using blockchain technology, this new decentralized information system could prove to be an innovation, providing openness, transparency, neutrality, reliability and security [2]. The proposed an information system for food safety monitoring in supply chains, based on HACCP for China’s food supply chain market. He suggested a system using blockchain and Internet of things technologies, which establishes a food supply chain traceability system for real-time food tracing, in order to realize the traceability with trusted information in the entire food supply chain and effectively guarantee food safety by gathering, transferring and sharing authentic data of food products in production, processing, warehousing and distribution. Finally, the logistics capability of the cold-chain logistics enterprise could influence the quality and safety of food products directly. All of these will ultimately enhance the safety assurance of a food supply chain. The author also discussed how this new information system could improve the performance of a cold-chain logistics enterprise and demonstrated a performance evaluation research for a Chinese agri-food cold-chain logistics enterprise by using improved analytic hierarchy process (AHP) and fuzzy comprehensive evaluation methods. His research provided some ideas, methods and management suggestions from a supply chain management perspective for improving the quality and safety of food products [3] and discussed the future challenges on the use of blockchain for food traceability. The steady increase in food falsification, which has caused large economic losses and eroded consumers’ trust, has become a pressing issue for producers, researchers, governments, consumers and other stakeholders. Tracking and authenticating the food supply chain to understand provenance are critical with a view to identifying and addressing sources of contamination in the food supply chain worldwide. One way of solving traceability issues and ensuring transparency is by using blockchain technology to store data from chemical analysis in chronological order so that they are impossible to manipulate afterwards. This review examines the potential of blockchain technology for assuring traceability and authenticity in the food supply chain. It is thus considered to be a relevant approach to assure the quality of the third step of the analytical processes: data acquisition and management.

3 Study of Agricultural Supply Chain Using Blockchain

3.1 Supply Chain

A processing-based and organized agri-supply chain functions as a part of a very complex network. Figure 1 shows a generic supply chain at the organization level within the context of a complete supply chain network. Each firm is positioned in a network layer and belongs to at least one supply chain, i.e. it usually has multiple (varying) suppliers and customers at the same time and overtime.

Fig. 1
figure 1

Schematic diagram of supply chain

3.2 The Traditional Route

The current “Mandi” route is that, first a farmer harvests his crops. Most of them do not have facilities to refrigerate; hence, they have a limited time frame to sell these crops. They loan transportation and pack their crops on, to send to APMCs. APMC is designated centres by the government that are used to assimilate fruits and vegetables from a plethora of farmers. APMCs are self-governed and determine the price of crops depending on various factors. The current price of the crop is then sent across to the farmers. The farmers send forward their crops depending on these prices. These prices, however, may fluctuate due to the demand and supply ratio. During transportation, octroi is usually charged for heavy vehicles while transporting across borders. This marks up the original cost incurred to the farmer. The precise and detailed changes in these prices are unknown to farmers, and this lack of clarity is targeted by the middlemen to avail profits for themselves. The trucks unload at APMC and begin selling. The crops are perishable, and if not sold within a certain time limit, they will rot. Hence in the unfortunate situation that the crop does not fully sell, the crop is sold at dearth cheap prices, which again incurs losses to the farmer. This whole model is flawed since the farmers do not get their deserved profits. They work hard, grow crops and harvest them, and after that they cannot track how they can maximize their profits. They make meagre money; in most cases, they do not make as much as they invest into their farming. This increases their loans and after a point, and they do not find any solution and take their own lives. This helps in preventing the unfortunate catastrophe. The farmers should be encouraged and supported to use blockchain technology so that they can demand more money for their labour.

3.3 Blockchain

A blockchain is, in the simplest of terms, a time-stamped series of immutable record of data that is managed by a cluster of computers not owned by any single entity. Each of these blocks of data (i.e. block) is secured and bound to each other using cryptographic principles (i.e. chain). The blockchain network has no central authority—it is the very definition of a democratized system. Since it is a shared and immutable ledger, the information in it is open for anyone and everyone to see. Hence, anything that is built on the blockchain is by its very nature transparent and everyone involved is accountable for their actions [4]. A blockchain carries no transaction cost (an infrastructure cost yes, but no transaction cost). The blockchain is a simple yet ingenious way of passing information from A to B in a fully automated and safe manner. One party to a transaction initiates the process by creating a block. This block is verified by thousands, perhaps millions of computers distributed around the net. The verified block is added to a chain, which is stored across the net, creating not just a unique record, but a unique record with a unique history. Falsifying a single record would mean falsifying the entire chain in millions of instances. That is virtually impossible. Bitcoin uses this model for monetary transactions, but it can be deployed in many other ways. Picture a spreadsheet that is duplicated thousands of times across a network of computers. Then imagine that this network is designed to regularly update this spreadsheet and you have a basic understanding of the blockchain. Information held on a blockchain exists as a shared and continually reconciled database. This is a way of using the network that has obvious benefits. The blockchain database isn’t stored in any single location, meaning the records it keeps are truly public and easily verifiable. No centralized version of this information exists for a hacker to corrupt. Hosted by millions of computers simultaneously, its data is accessible to anyone on the internet.

The farmer joins the blockchain, and his farming techniques and processes are authenticated using either digital certificates or physical site visits. Once this process is done, the farmer can easily get on the blockchain and start communication with the respective parties. Each farmer inputs the type of crop harvested, date of harvest, quality of the crop (organic or non-organic) and total cost incurred. If the crop further goes to a warehouse for refrigeration and storage, the distributor inputs the date of arrival, storage costs and miscellaneous costs. The transporter inputs transportation costs, octroi charges, date of departure and date of arrival. Like this, every stage that a crop goes through, to reach a customer’s table is documented and can be seen transparently by every participant.

4 System Designs

4.1 Block Diagram

The design aims at tracking three factors, viz. source, cost and quality:

  • Current source of the crops, from which region is they exported, or which places they had been stored.

  • Cost of the crops as it moves through the supply chain from farmer to vendor, how much profit or loss is incurred by each participant.

  • Quality of the commodity, whether they have been grown through organic or inorganic methods, whether they are fresh from harvest or not. As blockchain keeps track of data fed into it with assured integrity, all the above factors can be looked through in the blockchain as and when demanded. Further, a Hyperledger framework for the development of the blockchain application is chosen.

Some of the features provided by Hyperledger framework are:

  • Provisions for ledger control

  • Privacy of ledgers through channels

  • Security provided through membership services

  • Consensus of transaction added to the blockchain.

The traditional agricultural supply chain model involves participants, the business network storing all factors of the supply chain and the transactions. When implemented on Hyperledger, the model involves the agricultural blockchain network executing on the run-time environment and the channels to each ledger. A brief model of the same is described in Fig. 2. Each participant can get a view of the data relevant to their roles and access rights. As the ledgers are separated through channels, an additional level of data privacy is obtained.

Fig. 2
figure 2

Activity diagram for transaction in Hyperledger

The basic components of this architecture are:

  1. 1.

    Participants: The participants involve all actors who are interacting with the blockchain right from the farmer who produces and sells his crops to the distributor, right up to the vendor who sells those crops to the customers, such as supermarkets and vegetable/fruit vendors in markets. Each of these participants interacts with the blockchain for adding transactions on to the ledger as well as tracing those transactions back whenever required.

  2. 2.

    Assets: The assets define the commodities that are going to be exchanged among the participants. These not only include the crops in our project but also the money that is being handed over to the seller. In every transaction, the exchange or transfer of assets takes place, which is then recorded into the ledger and a block gets added in the blockchain. Initially, a certain amount of the assets would be made available to the users. Using these initial asset values, they can perform transactions and exchange the ownership of assets.

  3. 3.

    Transactions: The transactions are not just restricted towards monetary exchanges but also product ownership exchange. In simpler words, when the ownership of a crop is handed over from one participant to another, we do consider that as a transaction; as we need to track when the commodity was handed over to a particular person in a specific point in time. This would not only help us trace the origin of any problems like product defect or mishandling, but would also help us to mitigate those weak and faulty points in the supply chain.

  4. 4.

    Blockchain Network: The agricultural blockchain network involves the main business logic which runs the entire supply chain blockchain. It authenticates users and the transactions, maintains the integrity of those transactions, separates the ledgers through channels and performs and adds transactions on those ledgers. The blockchain network runs on a runtimes environment, which in this case is Hyperledger Fabric. It is accessible to all the participants of the supply chain through a variety of interfaces including desktop and mobile applications.

5 Hyperledger Environment

Hyperledger provides a run-time environment for executing or deploying our blockchain projects. The run-time environment includes a REST server environment, embedded Node.js runtime and the Hyperledger framework. We would be able to access all these through the terminal in CLI mode. It can be manually switched on and off the server environments, add business cards or import the business network to the Hyperledger framework [5].

Activity Diagram

Figure 2 shows the activity diagram for the transactions in hyperledger.

Transactions in Hyperledger take place in the following eight steps:

  1. 1.

    Transaction proposal is created and submitted by the users

  2. 2.

    Transaction proposal is sent by the application to the endorsing peers

  3. 3.

    Endorsing peers send a response by verifying and signing the proposal

  4. 4.

    Verification and integrity check of response takes place

  5. 5.

    Request invocated to blockchain service to add transaction to ledger

  6. 6.

    Invocation response sent to peers

  7. 7.

    Peers validate and commit transactions

  8. 8.

    Ledger is updated to show up-to-date copy.

6 Conclusion and Scope

Complexities of the various stages of an agricultural supply chain were studied. By scaling the supply chain activities, an attempt was made here to improve the output primitives of a supply chain. To enhance transparency in the supply chain, focus was laid on the cost and on tracking its transfer from hand to hand. This promises to give an impetus to the credibility of crops and allow the farmers to understand, how to get right benefit. There are already existing systems that use artificial intelligence to predict prices of crops daily. There are companies using Ethereum tokens to handle transactions. This system aims to improve the transparency of the supply chain, which in turn will improve profit margins for farmers.