IMPROVE EFFICIENCY AND RELIABILITY OF SUPPLY CHAINS USING SMART CONTRACTS

Digital transformation of the world economy and the rapid growth of information flows have led to the implementation of innovative technologies in the processes of business management. Data analysis, risk assessment technologies and decision support systems enable companies to adapt to modern challenges.In the process of globalization, a consumer has the priority due to which quality of service and timely delivery of the required products determine the competition among the companies. All participants of the supply process, including logistics service providers, have traditionally focused on optimizing process management and minimizing supply chain costs [1]. The determining factor of supply efficiency from the perspective of procurement and logistics is the uninterrupted supply of raw materials and semi-finished goods that depends on the selection of a reliable supplier, as well as the continuous improvement of the quality of materials and the reliability of the customer-supplier relationship. The purpose of this article is to analyze use of blockchain technology to improve reliability of supply chains, whereas the rationale behind the management of business processes and the contractual obligation between the parties are verified cryptographically, using a smart contract.

Introduction. The management of material flows in the supply chain is related to the management of financial flows. The customer pays the service fee at the time of receipt of the product, but the parties involved in the supply chain may have time delays due to several issues, for example, when cargo is being transported, documents are checked at the several customs points and the original documentation is required, especially such as a certificate of origin (EUR1), export license (EX1), waybill, etc. The waybill is required in original, especially when the cargo arrives at the destination terminal, the change or amend waybill is associated with problems which interrupts the product acceptance process. Due to the variety of waybill, we often find in the process of the air and sea transportation, internal and external bills of lading, HBL / MBL -MAWB / HAWB, which further complicates the product registration process, thus hindering the efficiency of supply chain. Furthermore, the major problems with the parties involved in the supply process remain financial settlement, reliability, security, etc.
Blockchain technology. According to the current situation, countries that do not have the long-term experience in the modern logistics management can't keep up with the technological concepts such as shared platforms, data analytics, or the use of cloud services, this lag hinders the process of optimization, reduces delivery time and increases service costs. Digital transformation enables companies to implement and use innovative technologies that can significantly change delivery management. One such application of scientific knowledge is blockchain technology, which is a chronologically updated decentralized and cryptographically encrypted database, where the authenticity of information is protected by the method of mathematically based data hashing. Blockchain was previously only known as the technology for the operation of cryptocurrency, although its role and purpose in everyday life is gradually increasing. For more than a decade, it has been considered as a sole mean of decentralized, transparent and reliable data management [6]. Blockchain technology significantly increases the speed of money transfers, regardless of geographical location, with maximum protection of confidentiality and reliability. As it is well known, the information that is stored in the blockchain is not stored on one of the specific servers, its copies are shared on millions of computers. Each newly formed block is linked to the previous block by a complex mathematical algorithm that eliminates unauthorized access, data modification, removal and physical damage. The usage of blockchain technology gives a wide range of opportunities to the parties involved in the supply chain, eliminates mistrust, secures and makes the ongoing business processes transparent and puts the parties involved in the supply chain in a superior position, because without the expense of intermediaries and additional financial resources, they can determine the terms of cooperation and security issues based on a smart contract, which on one hand relies on the data stored in the blockchain and on the other hand, participates in updating the blockchain database itself.
Smart contract. A Smart contract is a software code placed in the blockchain which ensures compliance with the terms of the contract. Placing a smart contract on the blockchain means simplifying the difficult process in which several parties are involved due to lack of trust [2]. It is a set of transaction protocols that uses mathematical algorithms to automatically verify compliance with the terms of a contract and store it on a blockchain platform. A working condition of the algorithm and its consistency is determined by the logic of mathematical methods. The logic of a smart contract is established by a chain process presented as blocks on the internet, which is connected to all the operations in the network [3; 5]. It is performed independently, the working principle of which is based on logical operators -if / then. There are included agreements between the parties to the contract, which will be fulfilled only if the established conditions are met [4].
Fulfilment of the obligation of mutual agreement between the parties of the smart contract participating in the supply chain is confirmed by an unique digital signature, which is kept in the decentralized digital transaction register -blockchain. A smart contract can be called a software container, which includes the negotiating parties, the object of the negotiation and the cryptocurrency or any other asset. The terms of the contract are represented by software codes implemented on the blockchain platform, which ensures autonomy, transparency and, most importantly, pre-verification of the terms of the contract concluded between the parties [6][7].
There are several platforms for creating smart-contracts, from which Ethereum stands out. It has developed a special programming language called Solidity, which is focused only on creating smart contracts. To put the smart contract into action, a descent algorithm is used for the initiation, which will be activated as a result of fulfilling the relevant condition of the initial code.
Research methodology. The methodology of given research is about how to study transportation documents which help to define structure of each document and the purpose for their further classification ( fig.1).
By studying above mentioned topics despite we have identified the necessary list of the documents which are important to arrange transportation and every part of this the which should be transported to smart contract, also we have identified the processes of this job and the field of studies that are connected to with the Supply Chain and the complex ruling of it by using the smart contract which will be our further research topic. In the process of researching, we also mentioned the faults that interrupt the identification of the electronic documentation and makes delivery process difficult.
During the process of Studying we develop the method and according to given result we have represented the process of documentation in a structured way. First of all, we identified the list of documents which is enclosed the cargo during the transportation process and which are required by the customs; Secondly, from the documents we separated the main points from the document list, which should be included in the smart contract ( fig. 1).
We have already studied several transport operations and represented documentation by the method of linear regression analysis ( fig.2). We have identified the documentation which enclosed the cargo during the transportation.

Fig. 1. Classification of documents
The below mentioned picture there is represented the main list of documents of transportation.

Fig. 2. The result of a linear regression analysis
As a result, we have done the classification of document into basic/or main and additional documents (Table1). The conducted research helped us to define the request that should be represented in smart contract that should indeed be taken into account in the process of agreement.
Study results. Product delivery is one of the most important processes of a supply chain. As mentioned above, delivery process is often hampered by paper-based processing of documentation that must be certified for authenticity and persuasiveness by a different authorized person and submitted in a hard copy. This process increases the time waste and cost as well as the likelihood of fraudulent transactions [7,9].
Submission above mentioned of such documentation often leads to increased costs and delivery time, delays in the business process, increased inventory opportunity cost, also there is an increased risk of product spoilage or damage in the event of perishable or dangerous shipments.
The way to solve this problem is to use a smart contract in the transportation process, where the information about the authenticity of the suppliers and the carrier will be stored in the blockchain, and the terms of the mutual agreement between them will be determined using the smart contract. Prior to the final confirmation of the contract and the transfer of the service amount, the fulfillment of the conditions stipulated in the contract between the parties will be checked using a logically compiled mathematical algorithm and program code.
We are using the platform called Ethereum decentralized blockchain platform to accomplish the task, where any mathematical function can be used. With the help of a specific address written in the blockchain, we can call the code of the smart contract, and the smart contract itself will be run on one of the knots that are part of the Ethereum platform.
The structural network of the smart contract structure in the Ethereum network is presented in the figure below, where the infrastructure of interconnected external servers, protocols and software in the network are presented for the implementation of the terms of the smart contract ( fig. 3) [10].

Fig. 3. Smart contract structure in Ethereum
A timestamp function can be used to activate the smart contract launch process, which will call the appropriate payment method. It is also possible to check the time directly before calling the payment initiation method in the smart contract.
The above-mentioned problem posed by us can be presented in a simple structure in the form of the following (fig.4).

Condition1 Condition 2 Condition 3
In the process of transportation, there the trust is important factor, both for the supplier (when the amount is paid in advance before the delivery of the product) and the carrier (who should receive partial payment after the delivery of the product is completed). In this process, it is important to increase the confidence factor, especially if the payment is completed electronically. Smart-contract will be completed when digital money transfer is confirmed by the so-called mediator (Escrow). With such scheme, the user transfers the money to Escrow, where the "mediator", software code checks the fulfillment of the terms of the contract [7,8].
The example we have just reviewed verifies both, the quantity and quality of the products received, after which the Ethereum platform plays the role of a mediator, in case of a positive answer, the amount will be transferred to the account.
The software code for the process we initiated during the research is written in Solidity, the Ethereum programming language. The project is a dApp (Decentralized Application) that uses Ethereum computing currency in the form of Gas to perform operations. We used the Token object as a means of accessing a limited resource to implement the software code. It acts like an electronic key to obtain an access.
Each user involved in the system pays a certain number of tokens to the system to process its contract, which is proportional to the workload carried out by the system, and also covers the calculation of gas costs. The payment process is carried out by transferring the ERC-20 tokens ( fig. 5).

Fig. 5. Software Code Fragment -Use of Tokens in a smart contract
We also used the Tokens as a way to repay the amount stipulated in the smart contract, without leaving the Ethereum system, as the Token also has monetary value. This process is illustrated in the program code in the figure below.
We presented the Client as a party to the contract for the realization of the software code ( fig.6). Object Supplier: writing in software code, means the Client must fulfill the terms of the contract in return for payment.
Recipient: is the Client, who is obliged to give the payment to the Supplier in case of fulfillment of the terms of the smart contract. Conclusions. Blockchain technology is a decentralized database that records all the operations performed in the supply chain. The main advantage of the blockchain is that it allows the parties to communicate directly with each other without a third party. In addition to cryptocurrency, a smart contract can be placed in the blockchain, where the terms of the contract between the parties are validated using software codes.
For drafting the smart contracts, we have recorded the documentation required for transportation and implemented them on the Ethereum platform. The result of our research showed that, it is technically possible to submit almost all documents, except the certificate of origin of the product, in the form of smart contracts, whereas these documents will be kept confidential, secure, accurate and the process will be rapid and economically efficient.
Using blockchain and smart-contract technology in the supply chain management is the one of the possible solutions to reduce the costs, speed up business processes, ensure proper and timely financial settlement, guarantee reliability without altering information in both state registries and transactions between the participants of supply chain process. It is also notable that the data is stored in an open decentralized blockchain, which allows for rapid audit and control.