I. INTRODUCTION
According to the society is becoming more consuming, and most people in the developed countries have high consumer power and standard of living. Consumer goods, from essentials to entertainment goods, are continuously produced and ordered in large quantities. There are multiple "stakeholders" acting as crucial business participants such as farmers, manufacturing plants, distributors, retailers, and consumers in the food supply chain. These traders prefer to selectively provide the food information, which is beneficial to them in the trading process to make a high profit. This concern is quickly leading to food fraud and food safety problems. Any document that is difficult to check because of the information providers’ inaccurate in the supply chain, regulatory agencies find it difficult to gather reliable and accurate information to implement oversight.
The digital world has changed the way people buy and consume things. Consumers want customizable and tailored products to meet their needs, a streamlined shopping experience, and transparency in product cost. These needs have created new opportunities and new challenges in existing supply chains. The challenges are managing expectations, improving operations, building a better network of suppliers, and tracking or investigating an asset or product in geographically dispersed supply chains that are becoming separate and more complex. A supply chain refers to a network of all the resources, activities, and technologies of the individual organizations involved in creating and selling a product. These include multiple processes, from sourcing and raw materials by suppliers, through design and production by manufacturers, to shipment of the final product to consumers. It also includes logistical support after delivering a discount. Supply Chain Management (SCM) arranges all these steps and organize the personnel, processes, and technologies required for smooth operation. Due to the multiple supply chain networks, there are many challenges combined with managing supply chains [1].
In the rice supply chain, there are different kinds of parties involved in the data flow, from the farmer to millers, wholesalers, retailers, consumers, and exporter. Each of these parties shares information about the rice product that sits in their local server. This information is not accessible to other participants, so there is an increased chance of food fraud in the system. By using blockchain technology we can ensure audibility, authentication, availability, and immutability of data. Moreover, blockchain is a decentralized peer-to-peer network without the need for a trusted third party blockchain to act as a distributed ledger. Customers can read, write, and broadcast information to their peers on the networks. It is derived from the cryptocurrency Bitcoin [2].
Therefore, blockchain technology provides a secure environment [3] where each of the parties in the blockchain network has access to each data and these data, once entered and verified, cannot be modified. For example, a farmer that provides a seed certificate, which is verified by the Myanmar Government Ministry of Industry, cannot have that certificate tampered with at later data.
In terms of Ethereum, a smart contract can be written powerfully through Ethereum Virtual Machine (EVM) using Go, or Python and Java programming language. In short, smart contract is self-executing, verifiable, and tamper-proof, and requires no third-party control [4]. The research of this purpose is to analyze the Ethereum blockchain and supply chain. Also, ensure food safety in the supply chain and some opportunities to forward it by adopting blockchain technology. This study helps to notice the chance of nowadays blockchain technology and the demand that accompanies these probabilities. Moreover, our contribution is to establish a framework trustable and traceability in the Myanmar rice cycle supply chain throughout the blockchain and smart contracts. It helps to figure out the drivers of mainstream blockchain adoption in the Myanmar rice cycle supply chain, possible business models, and strategic considerations.
The paper is organized as follows: Section II investigates the current system of the Myanmar rice cycle. We describe the platforms used in Section III. Section IV presents the proposed approach. Section V illustrated the results and discussion. Finally, we conclude this paper in Section VI.
II. RELATED WORK
In Supply Chain Management (SCM), the life cycle of a product can be roughly divided into the many phases that the product goes through, from raw material until the product ends up in the consumer’s hands. Most products undergo iterations of processing and shipping, starting with raw materials, traveling from place to place while being transformed into successively more refined versions and changing owners. Blockchain is a distributed ledger that is used to record the transaction across many computers[5]. Blockchain technology can be applied any domain such as banking, healthcare, real estate, travel, food, and supply chain. The blockchain is usable in medicine, economics, energy, and resource management. It is usable for exchanging almost everything that has digital representation.
Blockchain technology starts adapting to the Thailand rice supply chain. The blockchain system will provide to trace the process of growing rice, and the camera is installed in the rice fields to check where it was grown and whether it is an organic rice, while the production or packaging process can verify where it was produced. The certification process checks the department that serves as the inspector and issues the certificate, while the financial institutions who act as the payment intermediary after the rice are sold provide the information on the buyer and the country of export. The system will help instill confidence in Thai organic rice, reducing problems of buyer’s rejection, product adulteration, and license subrogation in order to increase the bargaining power and add more value to the product, as well as creating opportunities for expanding export markets. The buyers can check the source of organic rice. If they have a problem such as finding that it is not organic rice, they will be able to reject it [6].
Rice cycle information should be valid for any product in any industry, and even the simplest of products that may not require any processing must be shipped from their place of origin to the place where they will be sold [5-6].
Weak link 1: Input supplies need to be improved, especially seeds and fertilizers. It needs Purchasing Power Parity (PPP) certification in production. Insufficient existing local production need to invite Foreign Direct Investment (FDI) in this area.
Weak link 2: Regarding rice quality, rice mills face high fractures due to proper post-harvest technologies. Likewise, the purity of the rice varieties was a constraint for the rice mills interviewed. Suitable drying, grinding, and storage facilities are required.
Weak link 3: Internal price and supply volatility problems require adequate rice stocks to be doubled as a buffer. Border trade is not adequately monitored and managed.
Weak link 4: Lack of quality, consistency, and transparency even in basic data and information along the rice supply chain. It is challenging for policy makers and investors.
Weak links 1 and 2 are out of the scope of our research. Our scheme can recover problems of weak links 3 and 4. In weak link 3 quality and supply for exports, this is important when transporting rice products to the end-users. Our scheme supported blockchain technology to enhance rice quality and safe products when transfer to the consumer. Moreover, border trade is not properly monitored and managed to rice products. Therefore, we used a blockchain platform to monitor rice products.
For weak link 4, our rice product’s quality, consistency, and transparency are essential when selling to the consumers. If problem appears in the rice product, the consumer can check and trace by own self. Transparency is generated by design since blockchain technology is adopted. In our scheme, every party can see the information along the rice supply chain. Therefore, our scheme is consistent, and every party can trust each other about our rice product’s quality to achieve transparency toward building a trustiness system.
In the conventional supply chain system, most data are recorded by each company in a centralized ledger that is stored locally. When general ledger information is not conducive to the development of the business itself, it can be falsified privately. As a result, mistrust between companies has become increasingly prominent, due to the high possibility of altering the data within the company, the information between the nodes of the supply chain is inconsistent, leading to the process traceability of the product is easily interrupted [8].
In this paper, we proposed an extended scheme based on predecessor work in [8]. In this paper, the parties’ rice supply chain is used without blockchain. In this scheme, we considered the authentication process of the parties is managed by the government (beyond the scope of this paper). The rice supply chain involves the parties’ activities to bring rice products from the farm to the final consumer. Supply chain activities link inputs from suppliers, farmers, processors, retailers, and consumers and establish relationships that allow the supply chain to function effectively. The agricultural supply chain includes all functions, such as input supply, production, post-harvest, storage, processing, marketing and distribution, foodservice, and specific agricultural products.
The rice supply chain in Myanmar has been studied by Wong and Wai [8]. The authors illustrate the structure of the rice supply chain, as can be seen in Fig. 2. Farmers purchase inputs such as seeds, credit, etc., from suppliers of inputs for paddy production. Most collectors buy paddy from farmers with financial support from millers. The miller buys rice and grinds it into the rice. They carry out different activities such as transportation, processing, grading, and packaging. The millers store and distribute the rice mainly to wholesalers. The wholesalers deliver the rice and retailers to supply domestic consumers or to exporters who supply consumers in foreign countries. The rice cycle chain is fragmented because there are too many different parties at different stages, including several inconvenient stages between the farmer and the end consumer [9].
III. PLATFORMS USED
Adopting the Ethereum smart contract in the Myanmar rice cycle system offers better transparency and product tracking. In the Ethereum, at least there are two types of accounts as follows:
-
External Accounts (EOAs): EOAs have an Ethereum address that is controlled by a private key. A person can open EOA at will. EOAs can not only send and receive Ether, but also create and activate contracts.
-
Contract Accounts: These are accounts to which code is assigned. Each contract provided for the Ether and the network has its own account containing a unique Ethereum address. However, unlike an external account, a contract account does not have a private key with which it is contracted. A fundamental concept in Ethereum is the concept of fees. A fee is charged for every calculation made because of a transaction on the Ethereum network.
This fee is paid in a denomination called “gas.” The Ethereum blockchain requires Ethereum gas to run the way a car uses gasoline to store the lights on. All transactions on the Ethereum network cost a certain amount of gas, depending on the current appeal for gas and the size and speed of the contract you want to execute. Performing transactions over the Ethereum network is like driving a car that needs gasoline. If we do not use sufficient gas, the transaction will not find its way from one party to another. Gas is an essential innovation in the Ethereum. Each line of code that the network must implement takes gas. Specifically speaking, if gas is running out, and the code has stopped working. Therefore, we have to consider the amount of gas that we used in transaction. The developer predefines gas amounts for every action that will be taken through the smart contract’s code. For instance, sending ether from one address to another requires 21,000 units of gas [10].
Blockchain wallets can store the user’s private key, not just manage the blockchain account balance, and create transactions on behalf of the user. In this sense, wallets are the most straightforward approach to the general user blockchain network. Metamask is the representative web wallet extension program that runs in the browser and currently supports Chrome, Firefox, Opera, and Brave Browser and supports the creation and linking of Ethereum accounts, electronic signature, and the generation of transactions. Users can easily access smart contracts on the blockchain by using Metamask in the browser [11].
In order for users to access the Ethereum network, they must participate in the network as a blockchain node via the Ethereum client. Because this approach reduces user access, Metamask uses the Infura API, a cloud service that allows wallet users to access the network. This allows users to connect to the Ethereum network, enter smart contracts, and get results without running the contract themselves. Ethereum supports the standard web3.JS API for communicating with the Ethereum network using JSON-RPC in web applications [11].
Ganache allows the developer to create a private and public Ethereum blockchain to run tests, execute commands and inspect the status by checking the operation of the chain. It gives the possibility to perform all the actions on the main chain without using the Ether. Many developers use it to test their smart contacts during development. It provides useful tools such as advanced mining controls and a built-in block explorer [13].
Fig. 4 presents an overview of communication with a local blockchain network. Our smart contract has two main functions, namely the update function and revenue function. The update function is updating rice information to the smart contract, as well as the revenue function is that the government gives the reward the same ether to every party. Additionally, contract ABI is when user Truffle the easiest way to get a contract ABI, that just to read JSON files. Then, in the Ganache, we can see a list of transactions completely. Then, Metamask manages the party’s entities wallets public and private key, that came from Ganache.
Truffle is a development environment, test framework, and deployment pipeline for Ethereum Decentralized Applications (DApps) or any blockchain that uses the EVM to make task as a developer easier. Truffle is operated in the terminal and therefore has a number of useful commands that we can use in different phases of the development of a DApp. In other words, Truffle is a kind of development environment, test framework, and asset pipeline rolled into one. It is based on Ethereum Blockchain and was developed to enable the smooth and seamless development of DApps. With Truffle, we can compile and deploy smart contracts, insert them into web apps, and develop front-end for DApps. Today, Truffle is one of the most widely used IDEs for the Ethereum blockchain [14]. The Truffle suite consists of two core elements:
-
■ Truffle – The actual development environment that integrates compilation, testing, and deployment of Smart Contracts.
-
■ Ganache – It is a locally deployed blockchain simulator. Ganache has a graphical user interface that can simulate blockchain networks and test smart contracts live without requiring us to set up real test networks or use a remote network.
IV. PROPOSED APPROACH
The Ethereum smart contract has the potential to transform safety of rice product into an integrated smart system that guarantees the quality of rice product delivered to the end consumer. Our proposed scheme and solution focus on the usage of smart contracts executed autonomously on the public Ethereum blockchain platform. The smart contract functions are implemented by multiple mining nodes that are globally distributed, and the execution outcome is agreed upon by all mining nodes. It is worth nothing that it is the mining nodes that make up the blockchain network.
In our proposed system, we used the Ethereum platform with following 3 facts:
-
Differences between Ethereum and any other platforms such as Hyperledger Fabric. Ethereum is more suitable for our scheme in terms of architecture, types of transaction, visibility, and to name a few.
-
We use Ethereum to provide a reward for the parties when they successfully submit a transaction.
-
Ethereum platform provides immutable incentive that can solve dispute between parties.
Ethereum platform is public and private. Ethereum blockchain has no transaction privacy and data flows are transparent and consistent. All transactions are posted to the public ledger visible to all participants. Ethereum platform is based on cryptocurrency and to give decentralized incentive for every party involved whenever they submit the transaction through a smart contract. Blockchain smart contracts to provide secure data provenance from multiple parties. Additionally, blockchain smart contract is no relying on a third party so it has no single point of failure and automatically eliminates the bottleneck issues.
A mining node can be any computer machine that collects, validates, and executes transactions [15]. The nodes also store the data and results of these transactions in a ledger that is replicated and synchronized by all mining nodes. In the blockchain, smart contracts receive transactions in the form of function calls and trigger events to allow participating entities to continuously monitor, track and receive alerts when violations occur. Thereby, it eventually helps restore optimal conditions and respond to violations that occur within the rice cycle chain. Our solution focuses on the rice supply chain to be in this case.
In Fig. 5, illustrates an overview of the system architecture of the proposed rice supply chain. The main participating parties include Farmer, Miller, Wholesalers, Retailer, Consumer, and Exporter. The blockchain has the EVM executing the smart contract and every parties must update the information to the Ethereum Smart Contract. The Ethereum account basically consists of the Ethereum account (EA) with public and private keys which are used to cryptographically and digitally signed. It validates the integrity of the data within a transaction and associate each transaction with a specific EA.
In our scheme, the whole system is assumed generated by the Ministry of Industry of the Government of Myanmar. The Ministry of Industry of the Government of Myanmar has full access to blockchain on/off-Chain and government can revoke, update/change smart contract. Meanwhile, Farmers, Millers, Wholesalers, Retailers, and Exporters use smart contracts based on Ethereum and have access to the on-chain database.
The consumer only has access to the chain database. In our scheme, we use public Ethereum with a fixed number of parties.
-
Farmer: The farmer updated the rice information (see Fig. 6) in the Ethereum-based smart contract (Smart Contract - Rice Cycle Myanmar) and on-chain database.
-
Miller: The miller determines the rice’s type and quality and buys the rice from the farmer. Also, all information is stored on-chain database.
-
Wholesalers: A wholesaler is generally a store that buys end-products from miller. It is an entity that is involved in the process of distributing rice products to the general population.
-
Retailer: The retailer purchases finished rice products from the wholesaler, usually in batches with traceable identifiers, and sells them to consumers in small quantities. In our scheme, we have divided the wholesaler branches, the first entity is the retailer, and the second entity is the exporter. A local lot of the retailer and exporter is a foreign lot.
-
Consumer: The consumer is the end-user who buys and consumes the product from the retailer. The consumer checks the rice information publicly.
-
Exporter: The exporter also buys finished rice products from wholesalers and then transports them overseas.
The first algorithm in Fig. 7 is for adding a new user, it can only be executed by the owner of the contract (Government). It is embedded by government account address, which is used for authentication every time the user invokes the function within the contract.
The second algorithm in Fig. 8 is for creating rice information. It is invoked only with the owner of the contract allowed to add the items listed in the algorithm, such as rice type, rice grade, weight, quantity, and cost. The first argument is to check the address of the owner, if indeed exist. The last argument is to add data to the blockchain using a mapping that will allow us to look up a specific item and retrieve necessary information.
The third algorithm as can be seen in Fig. 9 is for searching the rice information stored on the blockchain. The first argument checks the valid user address, then do the looping of all records by using Ids created in the second function and returns the searched results.
The last algorithm as can be shown in Fig. 10 is for the revenue mechanism that have been uploaded onto the blockchain. In terms of the input, we have to update the ids, names, and descriptions. The revenue mechanism sends 0.25 Ether by authorized parties (the amount of Ether is adjustable, and it can set freely by the Government).
V. RESULTS AND DISCUSSION
This section is constructed based on several evaluation of the predecessor works. We performed the simulation of our proposed scheme regarding the transaction, the gas used, and the total ether spent in the transaction. We analyze the cost of the contract from the moment of the transaction fee implemented, as well as the cost of the invoked functions. We used the Metamask plugin that is integrated with remix IDE online to estimate the data transaction fee.
The government, the farmer, the millers, the retailer, the wholesalers, and the exporter, these actors are getting the private keys from Ganache. Then, the default setting balance has100 ETH (Ether) and we can see the gas price, gas limit as well through the Ganache user interface. The gas price is ‘20000000000’ and the gas limit is ‘6721975’. Metamask manages a wallet of the parties, and the entities are derived from the Ganache. Conclusory, Metamask manage the entire wallet of party entities.
Fig. 11 illustrates the migrating process of the smart contract. The first line is ‘transaction hash’, second is blocks ‘0’ that is genesis block and the next one is ‘contract address’. In order to migrate the smart contract into blockchain network, the gas is also required. Hence, in the Fig we see ‘gas used’ and ‘gas price’ and the ‘total cost’ is ‘0.00450474 ETH’. The transaction and data (farmer’s data) are described in Fig. 6. To submit the transaction, the party requires around ‘0.00042’ Ether.
Fig. 12 and Fig. 13 describe the transaction view and the block information (hash value, block number, and to name a few). The smart contract is migrated into the blockchain system, which is mined in block 2. The farmer’s transaction with data shown in Figure 6 is mined in block 5.
The overall performance results are depicted in Table 1. Every party has its own data with a specific data size. The size of the data is related to the input string that is being stored in the blockchain. In our research, the largest data is held by the farmer with 936-bit data size. The total Ether ETH and gas used are automatically calculated by the system. The table showed that the gas limit, gas used, and total (ETH) of the government are the same because the government gave the same amount of Ether to every party.
Fig. 14 is for the gas used comparison between authorized parties and the government. The gas used (Units) depends on the data input size. If the data input sizes are bigger, the gas used by authorized parties is also will be higher, but the gas used (Units) of government are stable because there is no significant changes made in the smart contract.
As shown in Fig. 15, the comparison of the total Ether (ETH) between the authorized parties and government is significantly distinct. Total Ethereum of authorized parties is different because they depend on data size.
In the following Table 2, we compare our proposed scheme with the previous research papers. We use eight major issues and compare to each previous research article based on the following facts.
Variables | Conventional Approaches | Our Proposed Scheme | |
---|---|---|---|
Oo, S, P., and Usami, K. (2020) [14] | Thuzar Linn and Broos Maenhou (2019) [8] | ||
Data Provenance | |||
Quality Control | |||
Traceability for Public | N/D | ||
Immutable Rice Cycle Information | |||
Relying on Third-Party in Managing Every Transaction | |||
Information Transparency | N/D | ||
Process Consistency | |||
Party Reputation (Recorded) |
-
Data provenance: to keep track of original data from current data.
-
Quality control: to maintain the quality of the rice.
-
Traceability for public: the process of tracking the origin and route of rice products and their inputs from the raw product of the supply chain to the final consumption.
-
Immutable rice cycle information: the observer cannot change the information of the rice data.
-
Relying on third-party in managing every transaction: all informational data is controlled by the middleman.
-
Information transparency: transactions are transparent and rice information can be updated and validated in real time. All transactions can see the parties involved in the data flow.
-
Process consistency: allow the government to know when the parties are doing the right things and make changes when they are not.
-
Party reputation (recorded): as the government gives each party the reward, the party’s reputation increases. The above facts are the main problem when we considered and compared with the research papers of our proposed scheme.
Our proposed scheme is based on Ethereum blockchain technology to trace the rice cycle information from the current data down to the original data. About the quality control, all the previous research papers and our proposed scheme are supposed to maintain the rice quality. Our proposed scheme is possible to track the process one by one but the previous result paper in [12] is not available to track the process. While the research paper in [6] is not mentioned in their research. Another benefit of using blockchain is the observer cannot change the rice data information since blockchain is immutable by design.
The previous research papers mentioned the data flows are controlled by a single entity, so the administrator can change the rice data information. Our proposed scheme is in decentralized form, and the observer cannot control the data flow. Our proposed scheme and the paper in [6] provided the transparency of rice information. Every party can see the rice data information since the data stored are transparent, disregarding the paper in [12] is not mentioned the transparency.
Process consistency is the important processing in the rice cycle. The whole of our proposed scheme is supervised by the government, for this reason the government knows the parties are doing the thing rights. Moreover, the paper in [12] is also the same processing as our proposed scheme. Nevertheless, the paper in [6] has not described the process consistency. Finally, our proposed scheme can cover most of the essential points of the rice cycle management system empowered by the Ethereum smart contract, as outlined in Table 2.
VI. CONCLUSION
Our research is inspired by the drawbacks points of the existing conventional Myanmar rice cycle system. There are different types of parties in the rice value chain, i.e., farmers, millers, wholesalers, retailers, consumers, and exporters, and we build trust between the parties. In the current Myanmar rice cycle, we found some problems: the flow of data is controlled by a single entity, which means they are dependent on third parties. Intentionally they can change everything on the web, so the public cannot fully trust the rice quality information stored by the administrator. Therefore, we have solved these issues using blockchain technology through the Ethereum smart contract.
Blockchain technology provides immutability data on Myanmar rice cycle information. In this case, rice information stored on the on-chain in unchangeable. In addition, the transparency of the data flow allows everyone to see the information in which the party is involved.
Ethereum blockchain as our solution to provide an immutable data record for the current Myanmar rice cycle system. Decentralized revenue is provided successfully, and it can motivate authorized parties to act honestly. Authorized entities can only update information, but the stored data is available for the parties and consumers. Eventually, our proposed scheme can be gradually adapted to address the Myanmar rice cycle’s current issues.