Logistics & Supply Chain Management Using the Power of Blockchain

: A large portion of supply chain networks have experienced hardships when attempting to incorporate all parts and partners, which make supply chain management network the board framework experiencing an absence of effectiveness and straightforwardness that make a consistent expansion in product misrepresentation and customer's mistake. All data about product creation, stockpiling and transportation should stream obviously during all phases of the production network by following and validating to keep away from item's tampering in the organization. Current software is based on top of brought together engineering and this leaves a hole for altering and bogus data particularly in metropolitan region, yet additionally the current arrangements can't permit the data to be imparted to authorities or buyers to successfully survey and guarantee recognizability and straightforwardness. This paper proposes use of blockchain to store details of product and logistics level to provide assurance to consumer regarding authenticity of product.


Introduction
Throughout the last many years, supply chain and logistics have significantly developed, excused and become a critical variable of seriousness and monetary accomplishment for practically all organizations. Supply chain has not exclusively been put at the focal point of market analysts' consideration, yet organizations spend an ever-increasing number of measures of their turnover on logistics and particularly transportation.
The worldwide exchange and store network, deluged by a developing intricacy of data and actual exchanges, face basic difficulties like consistence, discernibility, administration, higher exchange expenses, and security. In spite of the great money related valuation of the exchanges and the administrative investigation, the center information foundation is at present unfit to stay up with digitalization patterns. Accomplishing greatness in logistics includes working cooperatively with others to advance the progression of actual products just as the complicated progression of data and monetary exchanges. However, today there is a lot of caught esteem in logistics, generally coming from the divided and serious nature of the logistics business. For instance, in the USA alone, it is assessed that there are more than 500,000 individual shipping organizations. With such countless partners associated with the supply chain, this frequently makes low straightforwardness, unstandardized processes, information storehouses and different degrees of innovation reception.
Many pieces of the logistics esteem tie are likewise bound to manual cycles commanded by administrative specialists. For instance, organizations should frequently depend on manual information section and paper-based documentation to hold fast to customs processes. This makes it hard to follow the provenance of merchandise and the situation with shipments as they move along the supply chain, causing grating in worldwide exchange.
Blockchain might conceivably assist with beating these grindings in logistics and acknowledge considerable increases in logistics process effectiveness. This innovation can likewise empower information straightforwardness and access among applicable supply chain partners, making a solitary wellspring of truth. Also, the trust that is needed between partners to share data is upgraded by the inherent security instruments of blockchain innovation. Besides, blockchain can accomplish cost investment funds by fueling more slender, more computerized, and mistake free cycles. Just as adding perceivability and consistency to logistics tasks, it can speed up the actual progression of products. Provenance following of merchandise can empower capable and manageable supply chains at scale and help to handle item falsifying. Also, blockchain-based arrangements offer potential for new logistics administrations and more creative plans of action. One of the innovations that emerged from this interest was blockchain, a DLT (Decentralized Ledger Technology) that was originally created in 2008 by Satoshi Nakamoto [1], and serves as the basis of Bitcoin and all other cryptocurrencies.
The rest of this paper is coordinated as follows. Section II presents the related work. Section III describes the proposed blockchain Ethereum solution implementation. Section IV gives the testing details and a discussion on the security and testing. Section V finishes up the paper and examines future work.

Existing System
Presently, the current frameworks / systems for overseeing records of production network and operations are centralized. A solitary database comprises of the multitude of information and following data of the item. Centralization alludes to an arrangement where whole data and information are put away at the highest point of the organizational structure. There are a couple of drawbacks of the concentrated framework referenced here. You want to enlist an accomplished and technical executive for keeping up with the database administration framework. We really want to purchase costly equipment, programming and generously compensated technical associates. At first, data set size isn't enormous size yet when we store a lot of information, then, at that point, the size of the database increments. Some particularly noteworthy academic studies on system proposals for blockchain and logistics have been done. Hasan and Salah [2] created an Ethereum application for a Proof of Delivery system. A major database can make a ton of issues. For instance, when the data of the database increases too much then the delay time of the result of the database queries can be increased. Other disadvantages of centralized system in Supply chain use case:  There are multiple handovers in the current system which leads to error in delivery time estimation.  There are chances of wrong product delivery due to error in the system.  A lot of paperwork is involved in the existing system.  Sometimes, counterfeit products are delivered to the customer.  Lack of proper authentication across different stages.  Execution errors-such as mistakes in inventory data, missing shipments, and duplicate payments-are often impossible to detect in real time.
The authors in [3] proposed a simple scheme based on Ethereum blockchain which involves transporting a product between two parties. The scheme depends on a single key that is given to the transporter by the seller [3].
The key is transported along with the item and is handed over to the receiver who is the buyer. The buyer then needs to enter the key for verification. The key hash would already be available in the smart contract which acts as an escrow and holds the buyer's Ether. The Ether would only be placed in the seller's account if the hash of the key entered by the buyer matches the existing hash in the smart contract. A successful verification leads to the transfer of the Ether to the seller [3]. This solution is easy to implement as it is simple and depends on only one key. The method however, depends on trusting the transporter completely that no manipulation of the key would take place before reaching the buyer.

Blockchain
The Blockchain is another innovation that tries to make data storage and transmission safer, straightforward, and decentralized. It's an appropriated information base, or public/private shared record of every advanced event, that has been run and shared by the blockchain's representatives. As far as innovation, Blockchain is a circulated framework that stores all exchanges as squares from its initiation. These are comprised of information that clients send in. Cryptographic calculations protect these information moves. Blockchains can be summed up and used to build a bunch of settled upon decides that nobody can break, including clients and framework administrators. For multi-part applications requiring minimal common trust, they depend on a solitary framework compositional stage. The decentralization of information is a critical component of blockchain innovation, which likewise gives a more significant level of information assurance. While the blockchain isn't the main type of appropriated record innovation, it is the most normal structure among digital currencies from which the modern applications talked about in this article are drawn. The conveyed design of the blockchain gives extra security looked at conventional "client server" models. Blockchains can possibly assemble another age of transactional applications that set up trust, responsibility, and straightforwardness at their center while smoothing out business processes and legitimate requirements [4] [5].

Application of Blockchain:
The mechanical insurgency, just as the expansion of information assortment parts, has raised worries about information security and correspondence dependability. The capacity, unwavering quality, recognizability, and realness of data gave by blockchain, just as insightful authoritative arrangements for a trust less climate, predict a key change in production network the executives. Moreover, pursuing the direction toward savvy coordinated operations and the utilization of correspondence and data innovation at all levels of the worth chain, the Blockchain offers critical potential for upgrading the strategies cycle. Quite possibly the most urgent part of a blockchain application is its connection with this present reality, which requires the utilization of pertinent apparatuses and advances. Blockchain uses decentralized, conveyed record to work with the development of products, data and funds. It incorporates utilization of smart contracts to automate the supply chain capacities. Blockchain Technology may not replace legacy systems or old applications soon. However, Blockchain can certainly be a complementary application to legacy systems and may even lead to the development of new systems in the near future [6].

Ethereum
The Ethereum Network gives an adaptable improvement environment. It is a P2P network that can interaction any sort of smart contract, which can be handily made with a couple of lines of code, and without the need of making your own unique reason blockchain foundation. Instead of Bitcoin and other single-reason blockchains, Ethereum decoupled this savvy contract layer, which presently runs on top of the fundamental Ethereum blockchain, making it simple to make smart contracts with only a couple of lines of code. As indicated by Dr. Gavin Wood, prime supporter of Ethereum association, Ethereum, taken overall, can be considered a transaction-based state machine: we start with a beginning state and steadily execute exchanges to transform it into some last state. It is this last state which we acknowledge as the canonical "version" of the world of Ethereum [7]. It permits everybody to set their own guidelines in exchanges and state progress capacities. This is finished by including shrewd agreements, a bunch of cryptographic guidelines that are executed under the conditions that the maker of the agreement has set up.

Smart Contracts
The idea of "Smart Contracts" was presented by N. Szabo in 1994 in an unpublished composition and afterward officially in 1997 [8]. Smart Contracts are basically blockchain-based applications, briefly, self-executing programs which contain the terms and arrangements between the parties involved. A smart contract is addressed by its 20-byte address, like an EOA address, and it tends to be created in high level languages, like Solidity. At the point when the contract is conveyed on the organization, the code is assembled as bytecode. The component that separates Smart Contracts is that they consequently check whether or not the particulars of the understanding have been satisfied. Furthermore, to guarantee unwavering quality, adaptation to internal failure, and straightforwardness, the codes (Smart Contracts) are recreated on numerous hubs in the blockchain. There is an endless measure of contracts that can be made in the organization. Nonetheless, there are some "layouts" that are ordinarily utilized, as they give a few primary functionalities to gets that need to accomplish comparative practices. These are token norms that characterize a typical rundown of rules and are called ERC (Ethereum Request for Comments). Ethereum smart contracts empowered blockchain by allowing the execution of code [9].

Proposed blockchain solution
In this section we describe our Ethereum blockchain solution that makes use of security provided by this technology to create a solution between different levels of supply chain and logistics. Our solution can handle multiple entities at the same time. Our solution can be extended to multiple products and multiple levels of supply chain. Product details are also included in this solution which can be verified before the transaction.

System Overview
The proposed blockchain solution prioritizes proof-ofdelivery of physical commodities being transferred across different entities in supply chain. Figure 1 represents multiple entities interacting with smart contract.

Fig. 1. Different Entities and their interaction with Smart Contracts stored in Blockchain
Each entity can interact with smart contracts stored in blockchain if they have required permissions. All the data of product is stored in smart contracts. The roles of the participants can be summarized as follows:  Owner: Owner is the one who deploys the contract to the blockchain network.  Manufacturer: The manufacturer manufactures the product and add the details of product to the contract in the chain. He can put the product on sale.  Distributor: The distributor buys the product from Manufacturer and gains ownership of the product to sale it to next level of people on supply chain.  Retailer/Seller: Seller buys the product from distributor and then passes it to customer finally to complete the transaction process.  Customer: Customer gains the ownership of the product and is free to pass on the product through resale as well.
Blockchain provides transparency and the ability to log the events on public ledger. Ethereum provides ability to store and fetch events which helps in tracking the product across the supply chain and helps to know the current owner of product easily. To provide verification of product across the supply chain product details are hashed and stored along with it. This helps in transfer of product across the chain easily and validation is provided. Blockchain is used to store details of products and transaction details between any two entities. In order to fulfill these requirements of transparency and traceability of the product, smart contracts consist the following Hence, any work that is executed makes an event that refreshes all entities about the status of product.  Variables: Variables are used to store data that can be updated as they move across the chain. In this project variables are used to store product details and hash of the product.

System Design
The process of supply product from manufacturer and consumer consists of various entities. This contract is designed to store data of product across the entities and provide details of current and previous owners. To avoid the handling multiple contracts across different entities single contract was designed to store the entire information of supply chain. In multiple contracts are used to store data which makes the ecosystem confined to a particular product. Contracts are designed in such a way that all the data is stored in single contract and only the owner of product can transfer the product to next entity. Once the manufacturer adds the details of product in contract the data is encrypted to create a hash will be used later during transfer of ownership between any two entities. During the process the buyer will have to verify the product details and hash of details to get the complete ownership. In this the system relies on buyer to make sure he verifies the details properly before making payments through ether. The general view and code structure of the smart contract was developed using Truffle [11], a testing tool for smart contracts, and Ganache-cli [11], an Ethereum blockchain simulator. Fig 2 gives clarity about the use of blockchain to store information of transaction and details of products in smart contracts.

Implementation Details
In a Software, where blockchain is one of the parts, they may have to utilize the information put away on blockchain and the shrewd agreements running on blockchain to really take a look at specific conditions. ID of the exchanges or blocks on blockchain is a piece of information that can be effortlessly incorporated into the current information.
Approval of the information can be executed by smart contracts running on blockchain. The application layer provides the user interface, and the service layer provides Node.js Web services needed by the system. The contract layer completes business logic control and access control of blockchain data and database data by smart contracts. The data layer is responsible for storage of blockchain data and database data. The invocational connection between service layer and contract layer is realized through RPC interface exposed by Ethereum. Fig 4 gives information about the working and coordination between smart contracts across levels to generate a data layer for information to be stored in blockchain. The main working routine of the distributed network is as follows: The node for every substance produces new exchange information, and engenders the information through the shared organization. Every one of the hubs create the new squares as per the Ethereum agreement instrument. Every one of the hubs compute the mark and hash, and the principal that completes the estimation and broadcasts the outcome can get the option to record this exchange. The exchange data, past hash, timestamp, difficulty and different fields would be stored with the new block; The hub that gets the option to record the exchange communicates the new square to the whole organization. The wide range of various hubs that get the new block will do the data check and put the new block to the tail of the blockchain. The contracts are made and tried utilizing the Remix IDE which gives the fundamental devices to testing and investigating. Thus, making it simpler to change the code on a case-by-case basis while programming. This segment centers around the execution calculations utilized in the savvy contracts. The language utilized for composing the savvy contracts is Solidity. Three sorts of agreements are made as referenced in the Design segment which are the fundamental contract, CS gets that rely upon the quantity of carriers and the BT end of chain contract. One of the fundamentals viewpoints in the execution is that each agreement across the chain has the agreement locations of both the parent and the youngster contract. Figure 5 gives information about the details to be stored regarding the product in the blockchain. Some set of details will be used for creating of product hash which will be constant throughout the supply chain. Refer figure 6 for flow of contract between 2 entities.

Add Product to Supply chain
Only the manufacturer can add the product to supply chain. Figure 8 shows that the product is successfully added to chain.
Once the product is successfully added to the chain the contract returns a unique identification number for the product which remains constant throughout the chain. Logs are generated which gives information about the transaction. Event is emitted in blockchain.

Sale product by Manufacturer:
Once the state of product is updated to "For sale by manufacturer" event in emitted in blockchain. Manufacturer depending upon his convenience he can add the product to sell at the specific price. Figure 9 shows how the product can be updated for sale purpose.

Ship Product to Next Entity (Distributor)
Off chain communication takes place between two parties for sale of product. Once the product is sold and shipped the event is emitted in blockchain. Sender will add the address of the receiver which will be encrypted in product hash. Figure 10 shows that the product state is updated and is currently in shipping state to receiver.

Delivery of Product to Wrong Address
During the process of process of shipping the product can get delivered to wrong address. In such scenario during verification if would be found and transaction won't be completed. Since the new hash generated during receiving purpose, will be compared to product hash added during shipping.

Delivery of Product to Correct Address
Once the product is received by correct recipient of product the transfer of funds from receivers account are automatically transferred to the previous owner resulting in transfer of funds and ownership of product refer Figure 12.

Conclusion
The developed method works for both multiple and single transporters, and includes a punishment and incentive mechanism to encourage all players to act honestly. The system also does away with the requirement for a trusted third party, instead using smart contracts as an escrow to automatically settle payments and distribute each participant's agreed-upon share once the item is delivered to the buyer. To meet the demand of delivering across multiple transporters, our decentralized solution uses a chain of contracts with no cyclic dependencies. For future work, depending on the product of application changes can make it compatible for multiple products. E.g., Vaccine, Agriculture products, Medicines 8 References