You are on page 1of 5

Paper No: SC 16 Smart Computing

A Blockchain-based decentralized system to ensure the transparency of organic


food supply chain

B. M. A L. Basnayake C. Rajapakse
Department o f Industrial Management, Department o f Industrial Management,
University o f Kelaniya, Sri Lanka University o f Kelaniya, Sri Lanka
basnayake.bmal@gmail.com chathura@kln.ac.lk

Abstract
1. Introduction
Low quality agricultural products are added to the
The applicability of Blockchain concept to the
market daily. Over usage o f chemicals in the production
agricultural supply chain to verify the origin and quality
process, use of uncertified chemicals and mechanisms for
of the agricultural products was considered for this study.
preservation and ripening processes, are the major
The Customers are not satisfied with the quality of the
issues that impact on agricultural product’s quality as
agricultural products that they are consuming due to the
well as overall health o f the consumers. Mechanisms to
presence of synthetic agricultural chemicals in the agro
identify the quality o f the agricultural products are
products.
highly demanded due to the lack o f transparency in the
Production of the organic foods is adequate to fulfill
current process. Blockchain technology is emerging as a
market demand [1] and a mechanism for product
decentralized and secure infrastructure which can
certification is required. Thus demand for the carbonic
replace involvement o f a third party to verify the
foods and products with health certifications are
transactions within the system. The purpose o f the
increasing due to the current global health issues. Due to
research was to implement a Blockchain based solution
lack of transparency of existing certification mechanisms,
to verify the food quality and the origin o f the
consumers are reluctant to trust these mechanisms.
agricultural supply chain. A public Blockchain concept
Hence preparing a transparent and efficient
was selected instead o f a private Blockchain in this study
architecture for food certification was the purpose of the
to ensure transparency by allowing any person to access
study, by combining trusted certification system utilizing
the network. Instances o f the smart contract were created
Blockchain concept and other technologies. A proof-of-
fo r each physical product and deployed to Blockchain
concept has been constructed and tested in this paper.
network. A Quick Response code which contained the
address o f the instance, was a reference to the virtual
1.1. Organic agriculture industry
product. All the actors who are involved in the supply
chain must be able to interact with the system to achieve With the drastic environmental pollution due to
the transparency. Each transaction and events related to agrochemicals and their effect on human health, demand
a product is validated by peers o f the Blockchain system. for the organic products is increased. Incensement of
Product ownership was changed fo r each relevant global demand and new market, premium price in local
transaction. A token-based mechanism was used to and export market and increment of farmers’ income by
indicate the farmers ’ reputation with their products. 30-100% are the inspiring factors for the farmers to
Farmers could place a certification request regarding involve in the organic food industry [2].
their products and, they can gain reputation tokens fo r Sri Lanka has introduced a vast variety of organic
each certification done by peers. A unique Quick products such as organically certified tea, spices,
Response code was used to identify each product within essential oils, herbs, desiccated coconut, oil seeds, pulses,
the supply chain. The proposed system has been cashew, rubber, tropical fruits and vegetables [3].
implemented as a prototype and validated within the
study. 1.2. Agricultural supply chain
Keywords: Agriculture, Supply chains, Food security Agricultural supply chain varies for each product.
Each product/crop has a unique flow within the process.
Value addition or formation processes may be taken
place within the supply chain. Lot of waste, damage,

Smart Computing and Systems Engineering, 2019


Department of Industrial Management, Faculty of Science, University of Kelaniya, Sri Lanka. 103
being unable to verify origin can be occurred when currency was solved. Later on, Blockchain concept
products reach the customer end point derived to other areas more than implementation as a
currency in Bitcoin. With the emergence of second

--- λ
^
Surplus/ low quality
farmer/producer
generation, Blockchain applications were derived to
many fields. Supply chain is a key area where
Blockchain concept is widely applied.
The Danish shipping company Maersk the world’s
V
largest container carrier, tested the use of Blockchain
t applications in the international logistics to reduce the
><t------------------------- 1 supplier/ mediator paper work in shipping and container tracking [8].
Surplus/ low quality14- 1

Consumer
2.1. Flaws in centralized systems
Consumer trust, supply chain transparency, product
quality, logistic issues, environmental impact, personal
consumer data, fraud, food safety, etc. are the reliability
issues which are faced by current supply chains.
Consumers request greater transparency and information
but current systems cannot provide such data. Most of the
cases, information is audited by third parties, and records
are stored in paper or centralized databases. This
approach causes some problems mentioned below.
Figure 1. Current Food supply chain in Sri Lanka.
Figure 1 describes the agricultural supply chain in • High cost and inefficiency of paper based processes.
brief. Damaged or low quality products are issued to the • Frauds, security errors in IT systems
local market at low price or same price, in relation to • Integrity of digital records
non-organic products [4]. • Misuse of paper certifications

1.3. Food certification These problems result in low transparency and trust.
With the usage of Blockchain based platform,
Organic farmers are certified under several mechanisms such as smart contracts, decentralized
certifications within Sri Lanka. SLGAP (Agricultural database and proof-of-works ensured the security and
Department, Sri Lanka), Control Union (Netherlands), transparency of supply chain [9].
IMO (Switzerland), NASAA (Australia), EcoCert
(Germany), etc.[5] 2.2. Food tracking
Agro land details, soil, water supply, seeds, history of
the land, crop, disease and control etc. are considered Tracking mechanisms are dependent on the
when issuing the certification [6]. These certifications are products/items which were exchanged within the supply
updated seasonally. Certifications can be misused to sell chain. Customers were willing to pay additional costs to
products from third parties or low quality products attach IoT devices to track the location of the product
because only the farmers are certified, not the products. when they are high cost products. Heavy vehicles and
Most of the regular relationships between farmers and high cost machines were attached with IoT devices to
consumers, farmers and mediators depended on pre­ track locations. Product types like pharmaceutical items,
experience and trust. foods, etc. were tracked in bulk. In most cases, containers
were tracked instead of each item. In South Africa,
2. Literature review Blockchain was applied to grape supply chains to interact
between farmers, certifiers, auditors and grape traders
In 2008, [7] published a white-paper on use of Bitcoin through the assistance of digital certified grape boxes.
as a peer to peer Electronic Cash System. Initially, the Each box was identified by a unique barcode number and
Blockchain concept was applied in financial services. the ownership of the box was changed for each
With the invention of first digital currency Bitcoin as transaction [9].
the first Blockchain platform, requirement of trusted
authority or central server to avoid double spending1 of

1 Double-spending is a problem unique to digital currencies because


digital information can be reproduced relatively easily [10]

Smart Computing and Systems Engineering, 2019


Department of Industrial Management, Faculty of Science, University of Kelaniya, Sri Lanka. 104
3. Methodology

Figure 2. Overview of user interaction.


Figure 4. Overview architecture for Blockchain based
In the development process of the DApp described in supply chain.
Figure 2, Token model, Solidity based smart transaction
model and QR code generation model to validate Ethereum smart contracts were used to develop DApp
products were developed. Based on the developed which was connected to the Blockchain system. Only
DApp, applicability of Blockchain concept in the farmers were eligible to deploy “product” contract to
indicate physical product. Farmers should have sufficient
agricultural supply chain was tested. QR codes were used
as the link layer between digital and physical world. amount of reputation level to issue a product contract to
control the quality of each product. For each deployment
of the “product” contract, it will return an address which
was used to generate the QR code to identify the physical
product. Figure 4 depicts how virtual product was
validated with physical product using QR code. For each
transaction within the supply chain, user’s address has
been added to the “product” solidity contract as product
owners. Consumers could scan the QR code using a
mobile application that enables access to the Blockchain
system. Consumers are also eligible to rate the product
quality to ensure the trust.

4. Implementation
Solidity classes were compiled into two parts as
Application Binary Interface (ABI) and Byte Code by
solidity compiler. Encoding and decoding solidity smart
contract calls into data and machine code were used in
Application Binary Interface. Compiled smart contracts
were deployed to Blockchain network using web3.js and
Figure 3. Production process validation. a hexadecimal address was returned when deployment
Food production process and events such as water occurs.
supply source, land history, pest control, fertilizer usage, Business logic and the user actions were governed by
packaging, etc. were identified in data collection and solidity smart contracts. A new season was created by
systematic review of literature. Furthermore, persons farmers to the network and they were governed by
who can validate each process/event were identified. For ‘Campaign’ class. Issuing of products was governed by
each event/process, farmer can place a request, and peer ‘Products’ Solidity class and products were deployed
farmers, agricultural officers or related persons should only by the farmers. Only a product owner was given the
validate the request to gain reputation. Each event was authority to end the transaction at any point of the supply
recorded in Blockchain after the validation process. chain. Products would not be sold which contain its
Figure 3 describes the certification/validation process for transaction state as 'true'.
each event.

Smart Computing and Systems Engineering, 2019


Department of Industrial Management, Faculty of Science, University of Kelaniya, Sri Lanka. 105
System generated Quick Response (QR) code contains
the address of the product, returned from the network
when a product was deployed to the system by the
farmer.

Process Summary

0x90b45 If 31032ADc 36eB3f0d 0


A$4Cc5b573928681B
Addrsss o'Fermer You mu*t contrbut· et leettthii muchw«l
The men*··» treated tlWtcofnpetgnand to bvwm tm approver
a n create requests to withdrew money

Figure 5. Implemented system.


Figure 7. Summary of the season.
Ganache test client was run on port 8545. MetaMask
extensions were connected to Ganache test client using Summary of a particular season has been generated
Remote Procedure Calls (RPC). Application was run on from data which was fetched from deployed smart
port 3000 and users could connect to application on contracts as shown in Figure 7.
http://172.16.44.225:3000. Figure 5 describes the
implemented system architecture.

5. Testing and validation


Product history could be identified by owner’s data
which was added to smart contracts within each
transaction. Smart contract was updated with new owners
and its state whether it was sold out or not. Smart
contracts were publicly available in the network and data
was available to everyone. User interface to view product Figure 8. Event/ production process validation.
details is displayed in Figure 6.
Events/procresses were publicly available to the peers
for approval. Events/processes would be finalized when
0x5306d6a07DcCaa32B5e0257272F5C719aDC773a9
O w ners 1 accepted by peers. Event/process was open to anyone to
be accepted, till it was finalized by the farmer. These
0x5306d6a07DcCaa32B5e0257272F5C719aDC773a9 functionalities were shown in Figure 8. Block creation
Owners 2
can be identified in Figure 9 and Figure 10.

0x99A445bc88Dd3ed 126c7166972A2DB 15557E32ba Tra n s a c tio n : 0xb99fd081df52c41640a7432382fe870d475b3fe292e62a737-F817818c884f264


Owners 3 C ontract c re a te d : 0xdd5f7245e691536017dll8300349f5728767b8-Fb
Gas usage: 1522522
B lock Number: 1

0xaAc8b2AFc253EeAD9d5a6236bB77B6461Ee90d0F Figure 9. Block creation.


Owners 4

Prducts New trasaction has been deployed to the network and


thesse data were added to new block.

Transaction: 0x582c5aa88afB12e9389c8a8f2cee6e9cleldbaî7ff3e2f4673b6539670f40a56
Gas usage: 1101828
Block Number: 2

FigurelO. Blockcreation.
Trat Action

Figure 6. Product description.

Smart Computing and Systems Engineering, 2019


Department of Industrial Management, Faculty of Science, University of Kelaniya, Sri Lanka. 106
6. Conclusion 7. References
This study is based on the applicability of Blockchain [1] Rosairo, H. S. R., “ARE ORGANIC VEGETABLES A
concept to improving transparency and validity of MARKETING FAILURE IN SRI LANKA?,” no. September,
agricultural supply chain and its process. Since recent pp. 15-25,2006.
past, there has been a rapid change in the production of [2] OTA, “Organic Industry Survey in U.S,” May 19, 2016,
food and its raw materials. An efficient method to bridge 2016. [Online], Available: https://www.ota.com/news/press-
the gap between the farmer producing commodities in the releases/19031
market and the end customer was studied. Blockchain [3] “Organic Products in Sri Lanka|Organic Agriculture.”
based architecture and its concepts were taken for [Online], Available: http://www.srilankabusiness.com/organic/.
implanting trustworthiness and transparency within the [Accessed: 09-Jul-2018],
users and their transactions.
[4] “ôgO ô œ aaa® ç © Srf
Identified business logic in literature review were
implemented using smart contracts. It was sufficient to [5] “Sri Lankan Organic Products Certification|Organic
control business logic within the transactions and other Agricultural Product Standards.” [Online], Available:
events which were related to food production. Quick http://www.srilankabusiness.com/organic/organic-certification-
Response (QR) code was identified as a cost effective in-sri-lanka.html. [Accessed: 09-Jul-2018],
and practical solution to identify each food product [6] “GAP.” [Online], Available: http://slgap.lk/. [Accessed: 09-
within the supply chain from farm to end consumer. Jul-2018],
Quick Response codes were generated including the
[7] Nakamoto, S., “Bitcoin: A Peer-to-Peer Electronic Cash
address of the product, returned by the Blockchain System.”
network when products were deployed to the network.
Smart contract's address can be given by scanning QR [8] Groenfeldt, T., “IBM And Maersk Apply Blockchain To
code. Address could be used to fetch data directly from Container Shipping,” Forbes, 2017. [Online], Available:
https://www.forbes.com/sites/tomgroenfeldt/2017/03/05/ibm-
the Blockchain network without depending on the
and-maersk-apply-blockchain-to-container-
application layer. High availability of data was ensured shipping/#7652eccb3f05. [Accessed: 13-Jun-2018],
using this approach.
In a typical transaction, trust was built by involving a [9] Ge, L., Brewster, C., Spek, J., Smeenk, A., and Top, J.,
third party to regulate the rules between users. Trust was Findings from the pilot study Blockchain fo r Agriculture and
Food. 2017.
decentralized among all peers in the network by
Blockchain network. Money was received to smart [10] “Double-Spending Definition | Investopedia.” [Online],
contracts by farmers when farmers deployed a new Available:
season. Approvers were given money when events and https://www.investopedia.eom/terms/d/doublespending.asp.
processes were being validated. Each process and event [Accessed: 13-Jun-2018],
were validated by a participant of the network. All the
transactions were tested within Ganache test network and
data were stored in a Blockchain. Thus, trust and
transparency were successfully ensured by the proposed
mechanism.

6.1 Recommendation

Ethereum Geth client should be used for


implementing a local private network and establishing a
peer-to-peer network with each nodes. It is possible to
connect Geth client to online Ethereum network such as
ropsten, kovan Rinkeby main network etc. but with low
computational power and storage limitations, it is not
recommended. Connecting web3.js to third party
provider like Infura is recommended to avoid these
limitations.

Smart Computing and Systems Engineering, 2019


Department of Industrial Management, Faculty of Science, University of Kelaniya, Sri Lanka. 107

You might also like