Agrichain: A Trust Layer of the Agriculture.

Rishabh Bansal, Nimish Niret Soren, and Amritpal Singh Bacher

Whitepaper

1 Acknowledgment

This pilot study was supported by IBM . We thank our mentors from JIMS who provided insight and expertise that greatly assisted the study, although they may not agree with all of the interpretations/conclusions of this paper.

We thank Mr. Devesh Lowe for assistance with a blueprint for this report, and Mr. Sanjive Saxena for his valuable comments, that greatly improved the manuscript.

We would also like to show our gratitude to the Mr. Neeraj Gupta, GTS Risk & Compliance Leader, IBM INDIA for sharing his pearls of wisdom with us during the course of this study. We are also immensely grateful to him for his comments on an earlier version of the manuscript, although any errors are our own and should not tarnish the reputations of this esteemed person.

Rishabh Bansal Nimish Niret Soren Amritpal Singh

Date: 9th August 2018

Whitepaper

2 Preview 1 Agrichain, my dream project which was an impossible task without the help of my teammates and our mentor Mr. Neeraj Gupta. I always wanted to work with IBM, when I virtually attended the THINK’18 I got 100% sure about my future in Blockchain Technology and my dream came true in April’18, when Mr. Gupta contact me regarding a GRM program under which I can register a team and work on my idea to implement such a system which would disrupt the agriculture sector in India and globally as well. On 2nd June 2018, after our first meeting with our mentor, we started on a journey of determination. Agrichain isn’t just a project, it’s a hope for the upcoming INDIA. During the development of the whitepaper, we had many brainstorming sessions among ourselves and faced many conflicts of ideas & interests too. On 9th Aug 2018, we finally showcased this document which includes all the elements for a successful nationwide- agribusiness. According to me, the most important thing I have learned from this project is how to lead a team, successfully, which was mostly hanging by a thin thread of fear of losing. But our determination lead us to win over our fear. I have no words, no quotes to thank my teammates and Mr. Neeraj Gupta without whose support Agrichain was never possible.

Thankyou Nimish, Thankyou Amritpal.

RISHABH BANSAL

Whitepaper

3 Preview 2 This was one of the greatest experiences I ever had. It was such a wonderful experience for me to be a part of this team. I got to learn so many things like leadership, teamwork, new technologies etc. At first, it was kind of difficult for me to adjust with my teammates as it was my first-time experience working on a such a big project. As the days past by we are getting along with each other, we face many ups and downs but still, in the end, we achieved what we wanted and that is working as a team not thinking about the end result. The thing which we learned together is made us completely different persons was “Hard work and determination plays a huge role in a person’s life, always thinking about the end result will make the work bad, keep working without thinking of result because hard work always pays off”. I want to thank Mr. Neeraj Gupta for giving us this opportunity and I also thank all the teachers who helped us. Thank You.

NIMISH NIRET SOREN

Whitepaper

4 Preview 3 I Amritpal Singh, today feel so excited while sharing my personal experience on the project titled “ Agrichain “. This white paper has been submitted to IBM India. I would first like to thank Mr. Neeraj Gupta, GTS Risk & compliance, IBM India. Whose constant support and guidance helped me and my team reach this goal. I got familiar with Blockchain technology around April 2018 and by August 2018, I was able to contribute to this project. Within 4 months my team could work on this project from scratch and finished it. Those four months duration taught me more than I had expected. I didn’t only get to learn about the trending technology but also about the team spirit. I can still remember there were always different opinions and it was really hard to figure the best one out. Moreover, the credit for this success also goes to my college Jagan Institute of Management Studies (JIMS). Their support and vision was something that any team seeks to complete a project. I also want to thanks IBM India for giving me such an opportunity to be a part of such a great project and my team without whom it was not possible to finish it.

Amritpal Singh Bacher Whitepaper

5 Abstract

India is known as an “Agricultural Land” with around 65% of the agricultural land. Yet the sector faces issues such as hoarding, food scarcity, inflations. This report tries to highlight the problems that lead to the problems faced by the consumer and as well as the farmers. The project aims to contribute to a better understanding of the blockchain technology (BCT) and its implications for agri-food, especially how it can impact specific aspects of trading and supply chains, what is needed to apply BCT in agri- food chains. Moreover, also ensuring that farmers get the real worth of their crops without any intermediary. Furthermore, the project explored issues regarding the relevance, applicability, and implications of BCT for the agrifood sector through literature study and seller-buyer consultation. The main focus was on obtaining hands-on experience with the development of blockchain applications in agrifood and insight into perspectives of key actors.

Whitepaper

6 INTRODUCTION

Understanding Blockchain Technology Blockchain uses a combination of technologies that have a considerable history in computer science and in commercial applications. These component technologies include public/private key cryptography, cryptographic hash functions, database technologies especially distributed databases, consensus algorithms, and decentralized processing. The fundamental purpose is to achieve database consistency and integrity in a context of a distributed decentralized database. This technique was originally described in 1991 by a group of researchers. It was originally intended to time stamp digital documents to make it impossible to backdate them just like a notary. However, it mostly went by unused until 2009 when Satoshi Nakamoto Adapted it to create a digital cryptocurrency called “BITCOIN”. Now a Blockchain is a Distributed Ledger which is completely open to anyone. There is an interesting property of blockchain that once a data is recorded inside a block, it is very difficult to change it.

Whitepaper

7 The relevance of BCT for the agriculture sector An increasing demand in society for greater information about food reflects the need for more transparency and the lack of trust. As per trading concepts, the involvement of middlemen in the trade hinders the sale-purchase mechanism. At the same time, more and more food products, branded and accompanied by a variety of certification schemes, with an increasing risk of fraud (selling an unqualified product with high-quality labels or claims) and adulteration is damaging the system with a high rate. In the current situation, the system works either offline or online. But lack of knowledge has made the offline system win over online every time hence increasing the fraud rate too much. The major losses are incurred on both the sides hence resulting in empty pockets and unreasonable rates at the consumer end. The issue doesn’t stop here, the data stored on “a third party”, “centralized” system increases the failure rate leading to informational problems such as the high cost and inefficiency of paper-based processes and fraud, corruption, and error both on paper and in IT systems. Blockchain technology provides a means to ensure the permanence of records and potentially to facilitate the sharing of data between disparate actors in a trade-chain. This potential may lead to an exciting paradigm shift facilitating transparency and trust in food chains that ensures food integrity. In Blockchain, the architecture is completely different. Each participant maintains and calculates the data. So, all the nodes have to work simultaneously so that everyone works together to reach a common goal.

Whitepaper

8 Why decentralized? Because in a centralized structure database anyone with very limited access can get easy access to complete information. making a user dependent on the administrator. Blockchain allows sharing of info between different systems without any centralized admin. They are ideal for the transaction-based platforms. they are very capable of creating a history of themselves (ledger). Although they are quite slow in comparison to the traditional database but its decentralized nature i.e. different systems working to achieve a common goal (transaction). They do not their resources and maintain different records which are compared to the last stage.

Background of the Project A number of researchers have proposed the agriculture sector as a fruitful area for the BCT to be implemented and especially in a country like India. BCT was considered of great relevance to the agrifood sector because agrifood transactions are fraught with a number of information management problems. BCT provides immutable permanent transactions and distributed data access which has the potential to facilitate data exchange and reduce the opportunities for fraud. Other potential areas of application may include tracking and tracing, improving trust in data sharing, and ensuring proper pricing of the cultivation. More generally, many questions have to be asked such as ‘What problems does BCT solve?’, ‘What problems does BCT create?’ and closely related to these questions ‘Who

Whitepaper

9 benefits?’. What impact will this new technology have on the digital ecosystems for transparency and trust in agrifood? Will this new kind of trust and transparency revolutionize the way agrifood chains are organized? What knowledge and expertise are needed in order to blockchain? These questions can only be answered by the joint exploration of key sellers-buyers with a pilot use case.

Whitepaper

10 Issues explored in the pilot study 1. How to implement BCT in digital transactions? 2. Determining chaincodes’ constraints for both farmer and customer end. 3. Cope up with Byzantine Fault. 4. Direct payment gateway between customer and farmer. 5. Choosing a suitable framework from hyperledger fabric, sawtooth, and burrow. 6. Does the technology impose specific requirements on the hosting infrastructure? 7. Concern related to performance (speed, reliability) and scalability (capacity of the blockchain). 8. Integration of “ “APIs for supply chain management and weather alerts. 9. Issues with the generation of new cryptocurrency for ease of transactions.

WORKING OF THE TECHNOLOGY

Let's take a Block from a Blockchain. Each block contains Hash of the block, a hash of the previous block and data. Whitepaper

11 For example, Bitcoin blockchain stores the data of the sender, the receiver, and the number of bitcoins. A Block also has a Hash. We can compare hash with a fingerprint. Hash Identifies the block and all of its content. Hash always unique just like a fingerprint. Once the block is being created its hash is being calculated. Changing inside something in the block will cause the hash to be changed. Every Bock Contains the hash of the block, a hash of the previous block. Hash of the previous block creates a chain of blocks which makes it secure. Example Each Block has hash and hash of the previous block. The 2nd block will point 1st block, 1st block is called genesis block because it cannot point to previous as it is the starting block. Security Changing hash in a single block will cause other blocks to be invalid because blocks contain hashes of the previous block. Computers these days are very fast and can calculate hashes at a very fast pace. We can tamper with the block and change t 90wsx.h[e hash of the block but we need to recalculate all the hashes of the other blocks also in order to make our blockchain valid again. To Mitigate these blockchains have something which is called “Proof of work”. It is the mechanism which slows down the creation on new blocks. In Bitcoins Case, it takes about 10 mins to calculate the required proof of work and add a new block to the chain. This mechanism

Whitepaper

12 makes it very hard to tamper with it because if one block is tempered then all the blocks in the chain needed to be recalculated for proof of work. So, the security of blockchain comes from its creative use of hashing and proof of work mechanism. Issues of digital transaction

• Double-spending: With digital currency, there is a risk that the holder could make a copy of the digital token and send it to a merchant or another party while retaining the original. • Third Party interference • The authenticity of a transaction Buying and selling goods over the internet rely on financial institutions acting as 3rd parties to process financial transactions. These processes are therefore based upon the 2 parties trusting a 3rd party to process their transaction. Since the financial institutions are acting as a trusted party to facilitate the transaction, they often spend time resolving disputes which increase the cost of performing a transaction over the internet and makes transactions relatively expensive. Working of The Weather Company APIs

The APIs work with a mesh network technology. The mesh network technology links other nearby phones to extend the signal to help keep citizens connected and informed, and in the most severe conditions, might even help save a life. Mesh Network Alerts technology is particularly crucial in emerging markets, as well as in developed countries where cellular networks are congested, connectivity is intermittent and data access is often limited. As a

Whitepaper

13 result, the ability to alert and inform people during emergency situations is unreliable, which can have dire consequences.

Peer-to-peer technology converts mobile devices into links within the mesh network, allowing devices to “talk” directly to each other without using tower infrastructure. Each smartphone becomes a node that stores the message and securely passes it to the next nearest device, creating a daisy chain to reach more devices and remove the need for a cellular network. While other mesh networks use hot spotting, IBM and The Weather Company chose not to turn devices into individual access points to avoid excessive battery drain.

Today, India has the second largest smartphone market in terms of active smartphone users but low-speed Internet connections and expensive data plans have hindered the pace of Internet connectivity. Mesh Network Alerts technology is so appropriately designed to address these challenges and to notify of potential severe weather events or disasters -- even in areas with a limited Internet connection, or cellular networks are disrupted due to an outage.

The Weather Company Data REST API Packages

• Seasonal and Sub-seasonal Forecasts - More precise predictions and data analytics for extended timeframes.

• Weather and Location Data Packages - Integrate weather data into your operations for better business outcomes.

• Weather Alerts for Worker Safety - Keep field workers safe from weather dangers.

Whitepaper

14 Frameworks (Plethora of key designs)

Hyperledger Fabric (https://hyperledgerfabric.readthedocs.io/en/latest/) Application: Smart contract, Execution: Dockers, Languages: Golang, Consensus: Java Pluggable (default PBFT)

Hyperledger Sawtooth (https://intelledger.github.io/) Application: Smart contract, Execution: TEE, Languages: Python, Consensus: Proof of Elapsed Time

Whitepaper

15 Proposed Solution As we all now know the important features of blockchain i.e., ➢ Transparency ➢ Tracking and tracing ➢ Timestamp-based ledger ➢ Smart contracts

I. Cooperate pooling Cooperate pooling is not a problem but more of a solution that will help in generating more revenue the farmers currently don’t trust each other. Therefore, they prefer to harvest their crops. If farmers tend to cooperate with each other more than doing separately, we can create such a method like a grouping of small farmlands to make one large farm their income can be distributed among farmers which depends on the factors like

II. Auction This is more like an issue, in all the current systems, whether online or offline, trading happens by bidding of the cultivation in the markets with an involvement of middlemen, whose presence leads to increase in price at the consumer end. With the help of blockchain, we are aiming at bringing all the small farmers under one platform where they can get some important features to trade their cultivation.

Whitepaper

16 ➢ We are proposing to pool the lands of poor farmers (with land <= 5 acres) under one cooperative platform where all the revenue generated can be equally divided between the farmers ➢ With blockchain, the customers can easily and directly interact with farmers and know that from where their product is coming. Hence bringing more transparency and traceability to the existing system. ➢ Providing a platform where we can easily classify the different types of lands and grouping them according to their soil type. Hence categorizing them according to the different Mandi’s (Markets). ➢ They can easily do their secured and trusted transactions with the help of BCT. ➢ It allows us to incorporate e-commerce in the agriculture department. ➢ With the help of Smart Contracts, farmers would get the correct and full MSP of their cultivation. Also, smart contracts would fix/remove the unreasonable quoting of prices being added to the MSPs. ➢ Incorporate facility of loans and other services under the same application. ➢ Assigning an inspector to check the quality of the food item so that food integrity is maintained. ➢ Moreover, with the help of quality checking here we are introducing Quality Parameter Passed Percentage (QPPP). ➢ QPPP is going to support the price quoting and will help to form different price slabs according to the quality.

Whitepaper

17 Cooperative pooling (before harvest)

➢ We are proposing this new concept in the agricultural sector. ➢ It basically means virtually pooling of lands into a single. ➢ Comparisons with the current scenario: o Currently, farmers work individually at different rates. o This leads to many issues like less profit for farmers, irregularity of prices at consumer side. ➢ We are trying to make farmers work together. Under single “crop-type”. Moreover, they will be dealing with a single dealer who would help them to get better wholesale-discounts.

Current System

Transport

Farmer Enam-Center

Cash up- Auction front

Whitepaper

18 The drawbacks of the Auction System

➢ The biggest drawback of the auction system is “Not getting the expected value”. ➢ Auction system starts with MSP as the bidding price. ➢ For an example, a farmer knows the worth of his crop i.e. around 550 per quintal (After MSP) ➢ In an auction, the price can go in his favor i.e. 570 per quintal or against him i.e. 530 per quintal. ➢ If farmer faces loss in it they won't be able to sow their crops for the next season. ➢ In our proposed system we have tried to completely eradicate the auction system and compensate maximum losses from both ends i.e. farmer and customer.

Virtual Mandi

➢ We are aiming to eradicate the Auction system completely by giving the farmers a full and complete right to quote their price to the customers. ➢ We have classified customers into three categories, as it is difficult for a normal customer like us to buy crops from the farmers directly and the categories are o Traders (local mandis & state Mandis) o Major Firms o Govt organizations (FCI & NAFED) ➢ Under our platform we are focusing on avoiding farmers to go to Mandi, now farmers can offer their selling price online and customers can view it online

Whitepaper

19 ➢ Since all the transactions are cashless. This won't let Middlemen manipulate the prices ➢ As soon as the payments are made, the customers can now transport the crops to their location with the help of logistics firms. ➢ Meanwhile, farmers can store their crops in the warehouses. Warehouses can be of 2 types • Govt. Based warehouses • Private warehouses ➢ Depending on the conditions for crops the farmer can store their crops i.e. if a crop needs cold storage or not.

Keeping a check on Selling Price

➢ As we have been focusing on farmers to quote the price of their wish. Now the problem is what the maximum price can be offered? ➢ We are introducing PRICE SLABS. Price slabs can be formed with the help of the QPPP. We are letting the quality to decide the cost of the crops, which will fix an amount for each parameter and act as a quality cost. ➢ The Govt. Inspector would prescribe a Quality Parameter Passed Percentage (QPPP) which would tell the system the total increase in the price of the crop and fix the maximum selling price and won’t let the farmers quote an unreasonable price.

Whitepaper

20 INSTANT SALE AND DEMAND SYSTEM (ISDS)

DEMAND α PRICE

➢ Let’s assume a farmer is allotted >50% Quality Parameter Passed Percentage (QPPP), he would get an option to increase the allotted price slab to a certain amount according to the demand and supply of his cultivation. ➢ The range would be increased to a certain extent so that other slabs aren’t affected due to the prices. ➢ E.g., MSP of a crop is Rs. 500. & Quality Cost is Rs. 50 per quality. Therefore, the slabs formed are 550,600,650,700,750,800. The farmer will get an option of adding some Quality Incentive to his crop value (Let’s say by Rs. 20).

STOPPING THE PRICE HIKE ➢ With the help of ISDS, the price hike can stop and remove their intentional monopoly. ➢ We get to know at what price the crop is being sold. Hence, we can track at what increased the price the local mandi’s or other traders are selling the purchase. ➢ This also lead to the tracking of hoarded crops. Let’s assume a trader purchased 50 quintals of rabi crops but further sells only 45 quintals of them, with the help of tracking mechanism the remaining 5 quintals can also be recovered to maintain the flow of the crops

Whitepaper

21 in the markets. ➢ This system will also maintain the anonymity of the seller and buyer from others which let them easy dealing among themselves.

Our Virtual Mandi

State Mandi’s local Major Mandi’s Firms

FARMER

Whitepaper

22 Roles in this use-case

1) Farmer • Contract Farmer • Normal Farmer 2) Customers • Local Mandi • State Mandi • Organizations like Reliance Fresh • Government Organizations like FCI & NAFED 3) Warehouse Operators 4) The government appointed Quality Inspector 5) Logistics Manager 6) Government

Whitepaper

23

Whitepaper

24

Whitepaper

25

Whitepaper

26