# Evaluating a Blockchain-Based Supply Chain Purchasing Process Through Simulation

Geraldo Martins, Jacqueline Zonichenn Reis, Benedito Petroni, Rodrigo

Franco Gonçalves, Berislav Andrlić

► To cite this version:

Geraldo Martins, Jacqueline Zonichenn Reis, Benedito Petroni, Rodrigo Franco Gonçalves, Berislav Andrlić. Evaluating a Blockchain-Based Supply Chain Purchasing Process Through Simulation. IFIP International Conference on Advances in Production Management Systems (APMS), Aug 2020, Novi Sad, Serbia. pp.325-332, 10.1007/978-3-030-57993-7_37. hal-03630908

HAL Id: hal-03630908

https://inria.hal.science/hal-03630908

Submitted on 5 Apr 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Evaluating a Blockchain-based supply chain purchasing process through simulation

Geraldo Jose Dolce Uzum Martins¹[0000-0003-2579-8525], Jacqueline Zonichenn Reis²[0000-0001-6710-6430], Benedito Cristiano A. Petroni²[0000-0001-9826-1257], Rodrigo Franco Gonçalves¹,²[0000-0003-2206-3136] and Berislav Andrlić³[0000-0002-1345-0241]

¹ Politecnic School, University of Sao Paulo, Brazil

² Graduate Studies in Production Engineering, Universidade Paulista, Sao Paulo, Brazil

³ Polytechnic in Pozega, Croatia
geraldo.martins@gmail.com, zonichenn@hotmail.com, benedito.petroni@docente.unip.br, rofranco212@gmail.com, bandrlic@vup.hr

**Abstract.** Tracking financial data is a task that usually involves intermediaries and this issue has not been totally covered by information systems. Blockchain has been presented as a potential solution though. The aim of this paper is to perform a proof of concept of purchasing management that makes use of blockchain technology in order to track financial data. The adopted methodology was simulation to compare two different scenarios: a traditional purchasing process (As-Is) and another using blockchain (To-Be). The output of the simulations was used to compare the transactional costs of each model measured through two variables: the execution time of placing orders and the number of service stations required. It could be verified that the blockchain network alternative had a superior performance according to the type of architecture employed. In the present study, the private blockchain with proof of work adjusted to seek hashes that begins with two consecutive zeros had the best achievement.

**Keywords:** Blockchain, Purchasing process, Economic decision, Simulation

## 1 Introduction

The financial information sharing frequently requires a trustful intermediary to confirm the transaction. Public authorities, registry offices and banks are the main stakeholders. The transactional costs associated with these intermediaries reduce the operational efficiency of the process. Numerous technologies were developed to solve this confidence issue in order to automate and connect activities executed traditionally by people, in an individual manner or in groups, but without success [1].

Similarly, the purchasing process has many agents to validate transactional data in all stages. These transactions could be tax registrations, accounting and financial records that attribute monetary values to the products or services. Information systems applied to the purchasing process are unable to provide real-time and checked tracking data during the manufacturing and distribution stages. The data privacy is also a strategic issue when the finished products trade is concerned [2].
The blockchain has the potential for application in value chains that demand the record of operational or financial data in an authentic and incorruptible form. It was suggested that automation with blockchain could be viable in workflows that spend considerable time to be executed [3].

Since the blockchain application in the industry is seen as an alternative to increase the process automation and reduce the transactional costs, the performance comparative analyzes between scenarios without and with blockchain are pertinent to evaluate its adoption.

Regarding simulation, Sabounchi and Wei [4] use this approach to evaluate trading of electricity model distributed peer-to-peer in the Ethereum blockchain. Engelmann et al. [5] also use this method to assess the financial performance of adjacent connections between pairs of computers and the blockchain network, with the aim of storing the bilateral payment transactions outside the network.

The objective of this research is to evaluate the blockchain feasibility as a potential substitute of integrated information system applied to a purchasing process among organizations. The effectiveness of this proposition was done through the comparison of transactional costs linked to the operational times measured in the traditional condition and in a scenario which the blockchain is used.

## 2 Background

The blockchain is an architecture of data blocks tied by cryptography. The blocks are organized in a temporal sequence and validated by an algorithm with hash functions. Hash functions are small computer codes that convert any class of data in a string of fixed size, independently of the input data size [6].

Wright [7] suggested a database framework composed with addresses combined to balance amounts, with copies distributed in all nodes of a network, and some nodes could offer computational efforts to record a new block of data in exchange for a fraction of the amount traded. This was the first application of the blockchain, the Bitcoin cryptocurrency. The blockchain can be also used to record, track and control asset transfers as an inventory system. Therefore, any tangible or digital asset could be stored in the blockchain [8].

### 2.1 Blockchain operation

Each block in the blockchain contains all system transactional data since its beginning and the unique fingerprint used to confirm the information. The blocks are connected linear and chronologically through a hash with the next block as a real chain. The creation of a new block depends on proof of work that are mathematical problems which demand the computing power to be solved [6].

The blockchain can be configured in two types of architectures: public or private. In the public blockchain, all users can read, send transactions and cooperate in the proof of work without any authorization. All transactions are public, and the users remain anonymous. On the other hand, private blockchain is run by a single entity that authorizes access to selected users [2].
## 2.2 Proof of Work

The central feature in the block validation is the running of the proof of work that is a resolution of a hash puzzle. Only blocks that hold an accurate solution of a single hash will be processed. This confirmation is an answer to a mathematical problem that makes use of unidirectional hash functions. In a simplified form, the problem is to determine a variable that produces a result whose beginning be a specific sequence pre-determined, when it is combined with data of the former and the actual blocks and processed by a hash function [9]. For example, the effort could be discovering a string value whose result starts with three zeros on the left. Since this function is one-way, this resolution needs to be done by trial and error and as far as the network expands, the blockchain system calibrates the difficulty of finding the answer for the problem by increasing the number of zeros.

## 2.3 Blockchain applications

It can be found in scientific literature, there are researches about potential application of blockchain in several areas of knowledge.

Dujak e Sajter [10] discuss, broadly, the application of blockchain in logistics and supply networks. Petroni et al. [11] present a particular application in this context using Big Data Analytics.

Sikorski, Haughton, and Kraft [12] present an example where blockchain is employed to facilitate M2M interactions and establish a M2M electricity market in the context of the chemical industry.

Huckle et al. [13] explore combining use of smart contracts in the blockchain with IOT for three sharing economy examples: an autonomy vehicle rent system, a foreign exchange contract and automation of royalties payable for the licensing of copyrights.

França et al. [14] present a blockchain application using a social cryptocurrency to improve recycling and solid waste management, with social and environmental benefits in a small municipality. The presented blockchain payment system can provide transaction security among all the stakeholders.

# 3 Method

The adopted methodology was simulation to compare two different scenarios. Simulation is one of the most useful techniques in Operational Research and it facilitates the design of scenarios to orientate the decision-making procedure [15].

The method adopted for the research was:

1) Definition of a purchasing process scenario among organizations:

a. an As-is scenario with manual payment system

b. a To-be scenario using blockchain

2) Simulation program modelling and construction, considering as fundamentals variables the public or private blockchain and proof of work effort.

3) Run simulation to compare the As-is scenario with the To-be scenario
In this sense, four scenarios were simulated:

a) A manual purchasing order;

b) a private blockchain with two zeros proof-of-work;

c) a public blockchain in the Ethereum network;

d) a private blockchain with three zeros proof-of-work.

In the As-Is process, the transaction data are manually recorded in four different databases. Countless inconsistencies during conciliation are identified due to imprecise registers or incomplete integration and it causes delays in manufacturing and erroneous orders executed. In contrast, in the To-Be process, the shop floor data are saved solely in a blockchain which is accessible to the buyer and seller as well. Each agent is responsible for making the consults and executing the required transactions confirmations in the blocks. In this model, it is assumed that agents were the machines themselves and the interactions occurred uniquely in the blockchain.

The transactional cost is the expenses included in the process. In the purchase process As-Is, these costs could be related to these activities: demand identification, preparation of the purchase order, supplier order confirmation, tax invoice issue, manual registration of the product in the inventory system and manual recording of the tax invoice in account books. In the To-Be process, these costs comprise the data recording in blockchain by the buyer and the subsequent blocks query to verify the status of the goods in transit. In both situations, the transactional efforts were statistically analyzed by two variables: the execution time of placing orders and the number of service stations required. The As-Is and To-Be processes are represented through flow charts detailed in Figures 1 and 2.

The historical data of Ethereum block creation time from 11/12/2017 to 11/18/2018 were used to simulate the public blockchain [16]. In the private blockchain, it was necessary to develop a mechanism to measure the time to discover a final hash that began with two and three consecutive zeros.

<figure><img src="image_2.png" /><figcaption>Fig. 1. As-Is process (prepared by the author in Bizagi software)</figcaption></figure>
<figure><img src="image_3.png" /><figcaption>**Fig. 2.** To-Be process (prepared by the author in Bizagi software)</figcaption></figure>

The model's source code and data simulated are available in https://github.com/gdolce/blockchain.

Both models were simulated as discrete events modeling because the objective was exactly the process model, in other words, it is a sequence of operations that agents perform. In this simulation, the agents are the purchase orders and the material in transit along the As-Is and To-Be processes. The operations in the modeling can be delays, multiple resources services, process ramification selections, separations, among others. Once the agents compete for limited resources and they might delay, queue generation is inherent to most of the discrete event models.

The discrete events models are stochastics since the arrival times of the agents and service times are usually stochastics, that is, they have resulted from a probabilistic distribution. It means that the model must be run for a determined time or carry out enough number of replications until an output relevant be generated. The most common outputs in the discrete events are resource utilization, time spent in the whole system or in part of it, waiting times, queues, system performance, and bottlenecks identification. The activities of purchasing process modeled in the AnyLogic software were consolidated in three consecutive steps: purchase order issue, manufacturing, and material receiving. These elements are graphically presented in Figure 3.

<figure><img src="image_4.png" /><figcaption>**Fig. 3.** Simulation graphical model (prepared by the author in AnyLogic software)</figcaption></figure>
Four variables were used in the simulation: demanded quantity, operational time to issue the purchase order, operational time to manufacture and operational time to the material receiving. The parameters are frequently used to represent some characteristics of the modeled object and could express for example time, velocity, quantity, acceleration, size, area, etc. They are appropriate when the objects have the same behavior described in their class and they are usually used to specify the objects statically. Normally, a parameter is a constant in the simulation, and it is modified only when it is necessary to adjust the model behavior. All parameters are visible and oscillating during the model running. Thus, the model could be adjusted merely changing the parameters in the execution time. To evaluate the model functioning, analyses elements were used to collect, visualize and test the outputs data. These elements can store the statistical data of a queueing network such as queue size, queue time, average customer number in the system, average customer number in service, average time spent in the system and service time. The output element was used to store a unique scalar data vector and exhibit after finishing the run.

# 4 Discussion and Results

The summary of the results is presented in Table 1. In the comparison among the four scenarios, it could be observed that the private blockchain, with proof of work adjusted to seek hashes that begins with two consecutive zeros, had the best performance.

The private blockchain with proof of work adjusted to seek hashes that begin with three consecutive zeros had the service level of 100% and it resulted an average queue size and average time in system higher than the other conditions. The As-Is performance was similar to the best To-Be scenario with regard to the variables output quantity, average queue size in the system and average time in the system. However, As-Is needs a service capacity of five units while To-Be needs only one.

<table><caption>Table 1. Summary of the simulation results.</caption><thead><tr><th rowspan="2">Recording type</th><th>As-Is</th><th colspan="3">To-Be (Blockchain)</th></tr><tr><th>Manual</th><th colspan="2">Public</th><th>Private</th></tr></thead><tbody><tr><td>Probability distribution</td><td>Uniform</td><td>2 zeros hashes</td><td>Lognormal</td><td>3 zeros hashes</td></tr><tr><td>Output quantity (thousand)</td><td>718,3</td><td>Exponential</td><td>717,3</td><td>Exponential</td></tr><tr><td>Average queue size in the system (units)</td><td>29,4</td><td>29,1</td><td>1.150</td><td>136.470</td></tr><tr><td>Average time spent in the system (min)</td><td>24</td><td>22,7</td><td>820</td><td>99.828</td></tr><tr><td>The utilization rate of Create Order block</td><td>40,50%</td><td>13,60%</td><td>65,20%</td><td>100,00%</td></tr><tr><td>Service capacity of creating orders (unit)</td><td>5</td><td>1</td><td>1</td><td>1</td></tr></tbody></table>

The different creation time between public and private blockchain can be explained by the hardware used in the processing. In public blockchain, powerful equipment such as dedicated graphics processing unit (GPUs) and application-specific integrated circuit (ASIC) are used and they facilitate the scale gain.
The proof of work demands a growing energetic consumption which limits the scalability of the network and in a certain moment, the transactional cost, that includes the costs of computational infrastructure and energy, will be so high that the network will become so costly to be used. For example, the Bitcoin could consume in a near future, 7.7 GWe of electricity which is comparable to the demand of countries such as Ireland (3.1 GWe) and Austria (8.2 GWe) [17].

Alternative algorithms are being developed at this moment. In contrast to the proof-of-work, the great emphasis is the proof-of-stake that chooses the miner of the block randomly and restricted. Only miners that deposit a guarantee in the network are eligible to participate in the efforts to solve the problem. But, in case that other miners decide that the block validation was not done according to the rules, the miner loses its deposit. By this way, the value in risk is higher than the compensation received by the block validated. So, fraudulent authentications are not attractive which ensure the network security [18].

# 5 Conclusion

This research showed, through simulation, the feasibility of blockchain to be the medium of register and the operator of the purchase orders among companies, considering the limitation of a theoretical study.

Technical conditions at present, as computational capacity and energy consumption, defines the limits of use of the public blockchain or private blockchain scenarios. The core factor of this limitation is the proof of work, adjusted to seek hashes that begins with three consecutive zeros. Therefore, it is unlikely that these two scenarios reach productivities equivalent to the As-Is scenario and to private blockchain with proof of work adjusted to seek hashes that begins with two consecutive zeros.

The blockchain industry is in its initial stages of development and consequently, potential limitations are recognized, but nothing that interferes in the technology diffusion. Thus, this work contributes to revealing the understandability of the technology and its feasibility to a purchasing process among organizations. Future works can apply this simulation at the shop floor level, considering M2M transactions, as well to conduct field studies about real implementations.

# 6 References

1. Glaser, F., Bezzenberger, L.: Beyond cryptocurrencies - A Taxonomy of Decentralized Consensus Systems. Presented at the 23rd European Conference on Information Systems (ECIS), Münster, Germany (2015).

2. Wu, H., Li, Z., King, B., Ben Miled, Z., Wassick, J., Tazelaar, J.: A Distributed Ledger for Supply Chain Physical Distribution Visibility. Information. 8, 137 (2017). https://doi.org/10.3390/info8040137.

3. Christidis, K., Devetsikiotis, M.: Blockchains and Smart Contracts for the Internet of Things. IEEE Access. 4, 2292-2303 (2016). https://doi.org/10.1109/ACCESS.2016.2566339.
4. Sabounchi, M., Wei, J.: Towards resilient networked microgrids: Blockchain-enabled peer-to-peer electricity trading mechanism. In: 2017 IEEE Conference on Energy Internet and Energy System Integration (EI2). pp. 1–5. IEEE, Beijing (2017). https://doi.org/10.1109/EI2.2017.8245449.

5. Engelmann, F., Kopp, H., Kargl, F., Glaser, F., Weinhardt, C.: Towards an economic analysis of routing in payment channel networks. In: Proceedings of the 1st Workshop on Scalable and Resilient Infrastructures for Distributed Ledgers - SERIAL ’17. pp. 1–6. ACM Press, Las Vegas, Nevada (2017). https://doi.org/10.1145/3152824.3152826.

6. Buchmann, J.: Introduction to cryptography. Springer Science & Business Media (2013).

7. Wright, C.S.: Bitcoin: A Peer-to-Peer Electronic Cash System. SSRN Journal. (2008). https://doi.org/10.2139/ssrn.3440802.

8. Swan, M.: Blockchain: Blueprint for a new economy. O’Reilly Media, Inc (2015).

9. Tapscott, D., Tapscott, A.: Blockchain revolution: how the technology behind bitcoin is changing money, business, and the world. , Penguin (2016).

10. Dujak, D., Sajter, D.: Blockchain Applications in Supply Chain. In: Kawa, A. and Maryniak, A. (eds.) SMART Supply Network. pp. 21–46. Springer International Publishing, Cham (2019). https://doi.org/10.1007/978-3-319-91668-2_2.

11. Petroni, B.C.A., Reis, J.Z., Gonçalves, R.F.: Blockchain as an Internet of Services Application for an Advanced Manufacturing Environment. In: Ameri, F., Stecke, K.E., von Cieminski, G., and Kiritsis, D. (eds.) Advances in Production Management Systems. Towards Smart Production Management Systems. pp. 389–396. Springer International Publishing, Cham (2019). https://doi.org/10.1007/978-3-030-29996-5_45.

12. Sikorski, J.J., Haughton, J., Kraft, M.: Blockchain technology in the chemical industry: Machine-to-machine electricity market. Applied Energy. 195, 234–246 (2017). https://doi.org/10.1016/j.apenergy.2017.03.039.

13. Huckle, S., Bhattacharya, R., White, M., Beloff, N.: Internet of Things, Blockchain and Shared Economy Applications. Procedia Computer Science. 98, 461–466 (2016). https://doi.org/10.1016/j.procs.2016.09.074.

14. França, A.S.L., Amato Neto, J., Gonçalves, R.F., Almeida, C.M.V.B.: Proposing the use of blockchain to improve the solid waste management in small municipalities. Journal of Cleaner Production. 244, 118529 (2020). https://doi.org/10.1016/j.jclepro.2019.118529.

15. Pereira, C.D., Cunha, G.F. da, Silva, M.G. da: A Simulação na Pesquisa Operacional: uma revisão literária. Presented at the IX EEPA - Encontro de Engenharia de Produção Agroindustrial, Campo Mourão (2015).

16. Team, Etherscan.: Etherscan: The ethereum block explorer, https://etherscan.io/tokens.

17. de Vries, A.: Bitcoin’s Growing Energy Problem. Joule. 2, 801–805 (2018). https://doi.org/10.1016/j.joule.2018.04.016.

18. Siim, J.: University of Tartu - Institute of Computer Science courses, https://courses.cs.ut.ee/MTAT.07.022/2017_fall/uploads/Main/janno-report-f17.pdf.