 Research
 Open Access
Markov processes in blockchain systems
 QuanLin Li†^{1}Email author,
 JingYu Ma†^{2},
 YanXia Chang†^{3},
 FanQi Ma†^{2} and
 HaiBo Yu†^{1}
 Received: 23 April 2019
 Accepted: 17 June 2019
 Published: 2 July 2019
Abstract
In this paper, we develop a more general framework of blockstructured Markov processes in the queueing study of blockchain systems, which can provide analysis both for the stationary performance measures and for the sojourn time of any transaction or block. In addition, an original aim of this paper is to generalize the twostage batchservice queueing model studied in Li et al. (Blockchain queue theory. In: International conference on computational social networks. Springer: New York; 2018. p. 25–40) both “from exponential to phasetype” service times and “from Poisson to MAP” transaction arrivals. Note that the MAP transaction arrivals and the two stages of PH service times make our blockchain queue more suitable to various practical conditions of blockchain systems with crucial factors, for example, the mining processes, the block generations, the blockchain building and so forth. For such a more general blockchain queueing model, we focus on two basic research aspects: (1) using the matrixgeometric solution, we first obtain a sufficient stable condition of the blockchain system. Then, we provide simple expressions for the average stationary number of transactions in the queueing waiting room and the average stationary number of transactions in the block. (2) However, on comparing with Li et al. (2018), analysis of the transaction–confirmation time becomes very difficult and challenging due to the complicated blockchain structure. To overcome the difficulties, we develop a computational technique of the first passage times by means of both the PH distributions of infinite sizes and the RG factorizations. Finally, we hope that the methodology and results given in this paper will open a new avenue to queueing analysis of more general blockchain systems in practice and can motivate a series of promising future research on development of blockchain technologies.
Keywords
 Blockchain
 Bitcoin
 Markovian arrival process (MAP)
 Phase type (PH) distribution
 Matrixgeometric solution
 Blockstructured Markov process
 RG factorization
Introduction
Background and motivation
Blockchain is one of the most popular issues discussed extensively in recent years, and it has already changed people’s lifestyle in some real areas due to its great impact on finance, business, industry, transportation, healthcare and so forth. Since the introduction of Bitcoin by Nakamoto [1], blockchain technologies have obtained many important advances in both basic theory and real applications up to now. Readers may refer to, for example, excellent books by Wattenhofer [2], Prusty [3], Drescher [4], Bashir [5] and Parker [6]; and survey papers by Zheng et al. [7], Constantinides et al. [8], YliHuumo et al. [9], Plansky et al. [10], Lindman et al. [11] and Risius and Spohrer [12].
It may be necessary and useful to further remark several important directions and key research as follows: (1) smart contracts by Par [13], Bartoletti and Pompianu [14], Alharby and van Moorsel [15] and Magazzeni et al. [16]; (2) ethereum by Diedrich [17], Dannen [18], Atzei et al. [19] and Antonopoulos and Wood [20]; (3) consensus mechanisms by Wang et al. [21], Debus [22], Pass et al. [23], Pass and Shi [24] and Cachin and Vukolić [25]; (4) blockchain security by Karame and Androulaki [26], Lin and Liao [27] and Joshi et al. [28]; (5) blockchain economics by Swan [29], Catalini and Gans [30], Davidson et al. [31], Bheemaiah [32], Becket al. [33], Biais et al. [34], Kiayias et al. [35] and Abadi and Brunnermeier [36]. In addition, there are still some important topics including the mining management, the double spending, PoW, PoS, PBFT, withholding attacks, pegged sidechains and so on. Also, their investigations may be well understood from the references listed above.
Recently, blockchain has become widely adopted in many real applications. Readers may refer to, for example, Foroglou and Tsilidou [37], Bahga and Madisetti [38] and Xu et al. [39]. At the same time, we also provide a detailed observation on some specific perspectives, for instance, (1) blockchain finance by Tsai et al. [40], Nguyen [41], Tapscott and Tapscott [42], Treleaven et al. [43] and Casey et al. [44]; (2) blockchain business by Mougayar [45], Morabito [46], Fleming [47], Beck et al. [48], Nowiński and Kozma [49] and Mendling et al. [50]; (3) supply chains under blockchain by Hofmann et al. [51], Korpela et al. [52], Kim and Laskowski [53], Saberi et al. [54], Petersen et al. [55], Sternberg and Baruffaldi [56] and Dujak and Sajter [57]; (4) internet of things under blockchain by Conoscenti et al. [58], Bahga and Madisetti [59], Dorri et al. [60], Christidis and Devetsikiotis [61] and Zhang and Wen [62]; (5) sharing economy under blockchain by Huckle et al. [63], Hawlitschek et al. [64], De Filippi [65], and Pazaitis et al. [66]; (6) healthcare under blockchain by Mettler [67], Rabah [68], Griggs et al. [69] and Wang et al. [70]; (7) energy under blockchain by Oh et al. [71], Aitzhan and Svetinovic [72], Noor et al. [73] and Wu and Tran [74].
Based on the above discussion, whether it is theoretical research or real applications, we always hope to know how performance of the blockchain system is obtained, and whether there is still some room to be able to further improve performance of the blockchain system. For this, it is a key to find solution of such a performance issue in the study of blockchain systems. Thus, we need to provide mathematical modeling and analysis for blockchain performance evaluation by means of, for example, Markov processes, Markov decision processes, queueing networks, Petri networks, game models and so on. Unfortunately, so far only a little work has been on performance modeling of blockchain systems. Therefore, this motivates us in this paper to develop Markov processes and queueing models for a more general blockchain system. We hope that the methodology and results given in this paper will open a new avenue to Markov processes of blockchain systems and can motivate a series of promising future research on development of blockchain technologies.
Related work
Now, we provide several different classes of related work for Markov processes in blockchain systems, for example, queueing models, Markov processes, Markov decision processes, random walks, fluid limit and so on.
Queueing models
Bowden et al. [80] discussed timeinhomogeneous behavior of the block arrivals in the bitcoin blockchain because the blockgeneration process is influenced by several key factors such as the solving difficulty level of crypto mathematical puzzle, transaction fee, mining reward, and mining pools. Papadis et al. [81] applied the timeinhomogeneous block arrivals to set up some Markov processes to study evolution and dynamics of blockchain networks and discussed key blockchain characteristics such as the number of miners, the hashing power (block completion rates), block dissemination delays, and block confirmation rules. Further, Jourdan et al. [82] proposed a probabilistic model of the bitcoin blockchain by means of a transaction and block graph and formulated some conditional dependencies induced by the bitcoin protocol at the block level. Based on analysis in the two papers, it is clear that when the blockgeneration arrivals are a timeinhomogeneous Poisson process, we believe that the blockchain queue analyzed in this paper will become very difficult and challenging and, thus, it will be an interesting topic in our future study.
Markov processes
To evaluate performance of a blockchain system, Markov processes are a basic mathematical tool, e.g., see Bolch et al. [83] for more details. As an early key work to apply Markov processes to blockchain performance issues, Eyal and Sirer [84] established a simple Markov process to analyze the vulnerability of Nakamoto protocols through studying the blockforking behavior of blockchain. Note that some selfish miners may get higher payoffs by violating the information propagation protocols and postponing their mined blocks such that such selfish miners exploits the inherent block forking phenomenon of Nakamoto protocols. Nayak et al. [85] extended the work by Eyal and Sirer [84] through introducing a new mining strategy: stubborn mining strategy. They used three improved Markov processes to further study the stubborn mining strategy and two extensions: the EqualFork Stubborn (EFS) and the Trail Stubborn (TS) mining strategies. Carlsten [86] used the Markov process to study the impact of transaction fees on the selfish mining strategies in the bitcoin network. Göbel et al. [87] further considered the mining competition between a selfish mining pool and the honest community by means of a twodimensional Markov process, in which they extended the Markov model of selfish mining by considering the propagation delay between the selfish mining pool and the honest community.
Kiffer and Rajaraman [88] provided a simple framework of Markov processes for analyzing consistency properties of the blockchain protocols and used some numerical experiments to check the consensus bounds for network delay parameters and adversarial computing percentages. Huang et al. [89] set up a Markov process with an absorbing state to analyze performance measures of the Raft consensus algorithm for a private blockchain.
Markov decision processes
Note that the selfish miner may adopt different mining policies to release some blocks under the longestchain rule, which is used to control the blockforking structure. Thus, it is interesting to find an optimal mining policy in the blockchain system. To do this, Sapirshtein et al. [90], Sompolinsky and Zohar [91] and Gervais et al. [92] applied the Markov decision processes to find the optimal selfishmining strategy, in which four actions: adopt, override, match and wait, are introduced in order to control the state transitions of the Markov decision process.
Random walks
Goffard [93] proposed a random walk method to study the doublespending attack problem in the blockchain system and focused on how to evaluate the probability of the doublespending attack ever being successful. Jang and Lee [94] discussed profitability of the doublespending attack in the blockchain system through using the random walk of two independent Poisson counting processes.
Fluid limit
Frolkova and Mandjes [95] considered a bitcoininspired infiniteserver model with a random fluid limit. King [96] developed the fluid limit of a random graph model to discuss the shared ledger and the distributed ledger technologies in the blockchain systems.
Contributions
The main contributions of this paper are twofold. The first contribution is to develop a more general framework of blockstructured Markov processes in the study of blockchain systems. We design a twostage, ServiceInRandomOrder and batch service queueing system, whose original aim is to generalize the blockchain queue studied in Li et al. [75] both “from exponential to phasetype” service times and “from Poisson to MAP” transaction arrivals. Note that the transaction MAP arrivals and two stages of PH service times make our new blockchain queueing model more suitable to various practical conditions of blockchain systems. Using the matrixgeometric solution, we obtain a sufficient stable condition of the more general blockchain system and provide simple expressions for two key performance measures: the average stationary number of transactions in the queueing waiting room, and the average stationary number of transactions in the block.
The structure of this paper is organized as follows. "Model description" section describes a twostage, ServiceInRandomOrder and batch service queueing system, where the transactions arrive at the blockchain system according to a Markovian arrival process (MAP), the blockgeneration and blockchainbuilding times are all of phase type (PH). "A Markov process of GI/M/1 type" section establishes a continuoustime Markov process of GI/M/1 type, derives a sufficient stable condition of the blockchain system, and expresses the stationary probability vector of the blockchain system by means of the matrixgeometric solution. "The stationary transaction numbers" section provides simple expressions for the average stationary number of transactions in the queueing waiting room, the average stationary number of transactions in the block, and uses some numerical examples to verify computability of our theoretical results. To compute the average transaction–confirmation time of any transaction, "The transaction–confirmation time" section develops a computational technique of the first passage times by means of both the PH distributions of infinite sizes and the RG factorizations. Finally, some concluding remarks are given in last section.
Model description
In this section, from a more general point of view of blockchain, we design an interesting and practical blockchain queueing system, where the transactions arrive at the blockchain system according to a Markovian arrival process (MAP), while the blockgeneration and blockchainbuilding times are all of phase type (PH).
From a more practical background of blockchain, it is necessary to extend and generalize the blockchain queueing model, given in Li et al. [75], to a more general case not only with nonPoisson transaction inputs but also with nonexponential blockgeneration and blockchainbuilding times. At the same time, we further abstract the blockgeneration and blockchainbuilding processes as a twostage, ServiceInRandomOrder and batch service queueing system by means of the MAP and the PH distribution. Such a blockchain queueing system is depicted in Fig. 1.
From Fig. 1, now we provide some model descriptions as follows:
Arrival process
Transactions arrive at the blockchain system according to a Markovian arrival process (MAP) with matrix representation \(\left( C,D\right)\) of order \(m_{0}\), where the matrix \(C+D\) is the infinitesimal generator of an irreducible Markov process; C indicates the state transition rates that only the random environment changes without any transaction arrival, D denotes the arrival rates of transactions under the random environment C; \(\left( C+D\right) e=0\), and e is a column vector of suitable size in which each element is one. Obviously, the Markov process \(C+D\) with finite states is irreducible and positive recurrent. Let \({\omega }\) be the stationary probability vector of the Markov process \(C+D\), it is clear that \(\omega \left( C+D\right) =0\) and \(\omega e=1\). Also, the stationary arrival rate of the MAP is given by \(\lambda =\omega De\).
In addition, we assume that each arriving transaction must first enter a queueing waiting room of infinite size. See the lower left part corner of Fig. 1.
A blockgeneration process
Each arriving transaction first needs to enter a waiting room. Then, it may be chosen into a block of the maximal size b. This is regarded as the first stage of service, called a blockgeneration process. Note that the arriving transactions will be continually chosen into the block until the blockgeneration process is over under which a nonce is appended to the block by a mining winner. See the lower middle part of Fig. 1 for more details.
The blockgeneration time begins the initial epoch of a mining process until a nonce of the block is found (i.e., the cryptographic mathematical puzzle is solved for sending a nonce to the block), then the mining process is terminated immediately. We assume that all the blockgeneration times are i.i.d., and are of phase type with an irreducible representation \(\left( \beta ,S\right)\) of order \(m_{2}\), where \(\beta e=1\), the expected blockchainbuilding time is given by \(1/\mu _{2}=\beta S^{1}e\).
The blockgeneration discipline
A block can consist of some transactions but at most b transactions. Once the mining process begins, the transactions in the queueing waiting room are chosen into a block, but they are not completely based on the First Come First Service (FCFS) from the order of transaction arrivals. For example, several transactions in the back of this queue are possible to be chosen into the block. When the block is formed, it will not receive any new arriving transaction again. See the lower middle part of Fig. 1.
A blockchainbuilding process
Once the mining process is over, the block with a group of transactions will be pegged to a blockchain. This is regarded as the second stage of service due to the network latency, called a blockchainbuilding process, see the lower right corner of Fig. 1. In addition, the upper part of Fig. 1 also outlines the blockchain and the internal structure of every block.
In the blockchain system, we assume that the blockchainbuilding times are i.i.d, and have a common PH distribution with an irreducible representation \(\left( \alpha ,T\right)\) of order \(m_{1}\), where \(\alpha e=1\), and the expected blockgeneration time is given by \(1/\mu _{1}=\alpha T^{1}e\).
The maximum block size
To avoid the spam attacks, the maximum size of each block is limited. We assume that there are at most b transactions in each block. If there are more than b transactions in the queueing waiting room, then the b transactions are chosen into a full block so that those redundant transactions are still left in the queueing waiting room, and they find a new choice to set up another possible block. In addition, the block size b maximizes the batch service ability in the blockchain system.
Independence
We assume that all the random variables defined above are independent of each other.
Remark 1
This paper is the first one to consider a blockchain system with nonPoisson transaction arrivals (MAPs) and with nonexponential blockgeneration and blockchainbuilding times (PH distributions), and it also provides a detailed analysis for the blockchain queueing model by means of the blockstructured Markov processes and the RG factorizations. However, so far analysis of the blockchain queues with renewal arrival process or with general service time distributions has still been an interesting open problem in queueing research of blockchain systems.
Remark 2
In the blockchain system, there are some key factors including the maximum block size, mining reward, transaction fee, mining strategy, security of blockchain and so on. Based on this, we may develop reward queueing models, decision queueing models, and game queueing models in the study of blockchain systems. Therefore, analysis for the key factors will be not only theoretically necessary but also practically important in development of blockchain technologies.
A Markov process of GI/M/1 type
In this section, to analyze the blockchain queueing system, we first establish a continuoustime Markov process of GI/M/1 type. Then, we derive a system stable condition and express the stationary probability vector of this Markov process by means of the matrixgeometric solution.
Now, we use the mean drift method to discuss the system stable condition of the continuoustime Markov process \(\mathbf {X}\) of GI/M/1 type. Note that the mean drift method for checking system stability is given a detailed introduction in Chapter 3 of Li [97].
The following theorem discusses the invariant measure \(\theta\) of the Markov process \(\mathbf {A}\), that is, the vector \(\theta\) satisfies the system of linear equations \(\theta \mathbf {A}=0\) and \(\theta e=1\).
Theorem 1
Proof
The following theorem provides a necessary and sufficient conditions under which the Markov process \(\mathbf {Q}\) is positive recurrence.
Theorem 2
Proof
It is necessary to consider a special case in which the transaction inputs are Poisson with arrival rate \(\lambda\), and the blockchainbuilding and blockgeneration times are exponential with service rates \(\mu _{1}\) and \(\mu _{2}\), respectively. Note that this special case was studied in Li et al. [75], here we only restate the stable condition as the following corollary.
Corollary 3
By observing (10), it is easy to see that \(1/\left( b\mu _{1}\right) + 1/\left( b\mu _{2}\right) <1/\lambda\), that is, the complicated service speed of transactions is faster than the transaction arrival speed, under which the Markov process \(\mathbf {Q}\) of GI/M/1 type is positive recurrent. However, it is not easy to understand Condition (6) which is largely influenced by the matrix computation with respect to the MAP and the PH distribution.
The following theorem directly comes from Theorem 1.2.1 of Chapter 1 in Neuts [98]. Here, we restate it without a proof.
Theorem 4
Proof
The stationary transaction numbers
In this section, we discuss two key performance measures: the average stationary numbers of transactions both in the queueing waiting room and in the block and give their simple expressions by means of the vectors \({\pi }_{0}\) and \({\pi }_{1}\), and the rate matrix R. Finally, we use numerical examples to verify computability of our theoretical results and show how the performance measures depend on the main parameters of this system.
 a.
The average stationary number of transactions in the queueing waiting room
 b.
The average stationary number of transactions in the block
In the two numerical examples, we take some common parameters: The blockbuilding service rate \(\mu _{1}\in \left[ 0.05,1.5\right]\), the blockgeneration service rate \(\mu _{2}=2\), the arrival rate \(\lambda =0.3\), the maximum block size \(b=40,320,1000\), respectively.
The transaction–confirmation time
In this section, we provide a matrixanalytic method based on the RG factorizations for computing the average transaction–confirmation time of any transaction, which is always an interesting but difficult topic because of the batch service for a block of transactions, and of the ServiceInRandomOrder for choosing some transactions from the queueing waiting room into a block.
In the blockchain system, the transaction–confirmation time is the time interval from the time epoch that a transaction arrives at the queueing waiting room to the time point that the block including the transaction is first confirmed and then it is built in the blockchain. Obviously, the transaction–confirmation time is the sojourn time of the transaction in the blockchain system, and it is the sum of the blockgeneration and blockchainbuilding times with respect to the transaction taken in the block. Let \(\mathfrak {I}\) denote the transaction–confirmation time of any transaction when the blockchain system is stable.
To study the transaction–confirmation time \(\mathfrak {I}\), we need to introduce the stationary life time \(\Gamma _{s}\) of the PH blockchainbuilding time \(\Gamma\) with an irreducible representation \(\left( \alpha ,T\right)\). Let \(\varpi\) be the stationary probability vector of the Markov process \(T+T^{0}\alpha\). Then, the stationary life time \(\Gamma _{s}\) is also a PH distribution with an irreducible representation \(\left( \varpi ,T\right)\), e.g., see Property 1.5 in Chapter 1 of Li [97]. Clearly, \(E\left[ \Gamma _{s}\right] =\varpi T^{1}e.\)
Remark 3
 1.
If \(Y\left( 0\right) =\left( k,l\right)\) for \(1 \le k\le b\) and \(0\le l\le b\), then the k transactions can be chosen into a block once the previous block is pegged to the blockchain, a tagged transaction of the k transactions is chosen into the block with probability 1.
 2.
If \(Y\left( 0\right) =\left( k,l\right)\) for \(k\ge b+1\) and \(0\le l\le b\), then any b transactions of the k transactions can randomly be chosen into a block once the previous block is pegged to the blockchain; thus, a tagged transaction of the k transactions is chosen into the block of the maximal size b with probability b/k.
When a transaction arrives at the queueing waiting room, it can observe the states of the blockchain system having two different cases:
Case one: state \(\left( k,0;i,r\right)\) for \(k\ge 1;1\le i\le m_{0}\) and \(1\le r\le m_{2}\). In this case, with the initial probability \(\pi _{k,0}^{\left( i,r\right) }\), the transaction–confirmation time \(\mathfrak {I}\) is the first passage time \(\xi _{\left( k,0;i,r\right) }\) of the Markov process with an absorbing state, whose state transition relation is given in Fig. 4.
Case two: state \(\left( k,l;i,r\right)\) for \(k\ge 1,1\le l\le b;1\le i\le m_{0}\) and \(1\le j\le m_{1}\). In this case, with the initial probability \(\pi _{k,l}^{\left( i, j\right) }\), the transaction–confirmation time \(\mathfrak {I}\) is decomposed into the sum of the random variable \(\Gamma _{s}\) and the first passage time \(\xi _{\left( k,0;i,r\right) }\) given in Case one. It is easy to see from Fig. 4 that there exists a stochastic decomposition: \(\mathfrak {I}=\Gamma _{s} +\xi _{\left( k,0;i,r\right) }\).
From the above analysis, it is easy to see that computation of the first passage time \(\xi _{\left( k,0;i,r\right) }\) is a key in analyzing the transaction–confirmation time.
Theorem 5
Proof
Based on Theorem 5, now we extend the first passage time \(\xi _{\left( k,0;i,r\right) }\) to \(\xi _{\left( \mathbf {0}, {\varphi }\right) }\), which is the first passage time of the Markov process \(\mathbf {H}\) with an initial probability vector \(\left( \mathbf {0} ,{\varphi }\right)\). The following corollary shows that \(\xi _{\left( \mathbf {0},{\varphi } \right) }\) is PH distribution of infinite size, while its proof is easy and is omitted here.
Corollary 6
The following theorem provides a simple expression for the average transaction–confirmation time \(E[\mathfrak {I}]\) by means of Corollary 6.
Theorem 7
Proof
As shown in Theorem 7, it is a key in the study of PH distributions of infinite sizes whether or not we can compute the inverse matrix \(\mathbf {H}^{1}\) of infinite size. To this end, we need to use the RG factorizations, given in Li [97], to provide such a computable path. In what follows, we provide only a simple interpretation on such a computation, while some detailed discussions will be left in our another paper in the future.
In fact, it is often very difficult and challenging to compute the inverse of a matrix of infinite size only except for the triangular matrices. Fortunately, using the RG factorizations, the infinitesimal generator \(\mathbf {H}\) can be decomposed into a product of three matrices: two blocktriangular matrices and a blockdiagonal matrix. Therefore, the RG factorizations play a key role in generalizing the PH distributions from finite dimensions to infinite dimensions.
Using Subsection 2.2.3 in Chapter 2 of Li [97] (see Pages 88 to 89), now we provide the ULtype RG factorization of the infinitesimal generator \(\mathbf {H}\). It will be seen that the RG factorization of \(\mathbf {H}\) has a beautiful block structure, which is well related to the special block characteristics of \(\mathbf {H}\) corresponding to the blockchain system. To this end, we need to define and compute the R, U and Gmeasures as follows.
The Rmeasure
The Umeasure
The Gmeasure
Remark 4
In general, it is always very difficult and challenging to discuss the transaction–confirmation time of any transaction in a blockchain system due to two key points: The block service is a class of batch service, and some transactions are chosen into a block by means of the ServiceInRandomOrder. For a more general blockchain system, this paper sets up a Markov process with an absorbing state, and shows that the transaction–confirmation time is the first passage time of the Markov process with an absorbing state. Therefore, this paper can discuss the transaction–confirmation time by means of the PH distribution of infinite size (corresponding to the first passage time) and provides an effective algorithm for computing the average transaction–confirmation time using the RG factorizations of blockstructured Markov processes of infinite levels. We believe that the RG factorizations of blockstructured Markov processes will play a key role in the queueing study of blockchain systems.
Concluding remarks
In this paper, we develop a more general framework of blockstructured Markov processes in the queueing study of blockchain systems. To do this, we design a twostage, ServiceInRandomOrder and batch service queueing system with MAP transaction arrivals and twostages of PH service times and discuss some key performance measures such as the average stationary number of transactions in the queueing waiting room, the average stationary number of transactions in the block, and the average transaction–confirmation time of any transaction. Note that the study of performance measures is a key to improve blockchain technologies sufficiently. On the other hand, an original aim of this paper is to generalize the twostage batchservice queueing model studied in Li et al. [75] both “from exponential to phasetype” service times and “from Poisson to MAP” transaction arrivals. Note that the MAP transaction arrivals and the two stages of PH service times make our queueing model more suitable to various practical conditions of blockchain systems with key factors, for example, the mining processes, the reward incentive, the consensus mechanism, the block generation, the blockchain building and so forth.

Developing effective algorithms for computing the average transaction–confirmation times in terms of the RG factorizations.

Analyzing multiple classes of transactions in the blockchain systems, in which the transactions are processed in the blockgeneration and blockchainbuilding processes according to a priority service discipline.

When the arrivals of transactions are a renewal process, and/or the blockgeneration times and/or the blockchainbuilding times follow general probability distributions, an interesting future research is to focus on fluid and diffusion approximations of blockchain systems.

Setting up reward function with respect to cost structures, transaction fees, mining reward, consensus mechanism, security and so forth. It is very interesting in our future study to develop stochastic optimization, Markov decision processes and stochastic game models in the study of blockchain systems.
Notes
Declarations
Acknowledgements
The authors are grateful to the editor and two anonymous referees for their constructive comments and suggestions, which sufficiently help the authors to improve the presentation of this manuscript. Q.L. Li was supported by the National Natural Science Foundation of China under grant No. 71671158, and the Natural Science Foundation of Hebei Province in China under Grant No. G2017203277.
Authors' contributions
QL provided the main theoretical analysis and contributed ideas on content and worked on the writing. JY and YX completed the TEX file under the present version. YX ran the numerical experiments. JY, FQ and HB checked some mathematical derivations. All authors read and approved the final manuscript.
Competing interests
The authors declare that they have no competing interests.
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
Authors’ Affiliations
References
 Nakamoto S. Bitcoin: a peertopeer electronic cash system, working paper; 2008. p. 1–9.Google Scholar
 Wattenhofer R. The science of the blockchain. California: CreateSpace Independent Publishing Platform; 2016.Google Scholar
 Prusty N. Building blockchain projects. Birmingham: Packt Publishing Ltd; 2017.Google Scholar
 Drescher D. Blockchain basics: a nontechnical introduction in 25 steps. Berkely: Apress; 2017.View ArticleGoogle Scholar
 Bashir I. Mastering blockchain: distributed ledger technology, decentralization, and smart contracts explained. Birmingham: Packt Publishing Ltd; 2018.Google Scholar
 Parker JF. Blockchain technology simplified: the complete guide to blockchain management, mining, trading and investing cryptocurrency. California: CreateSpace Independent Publishing Platform; 2018.Google Scholar
 Zheng Z, Xie S, Dai HN, Chen X, Wang H. Blockchain challenges and opportunities: a survey. Int J Web Grid Serv. 2018;14(4):352–75.View ArticleGoogle Scholar
 Constantinides P, Henfridsson O, Parker GG. Introductionplatforms and infrastructures in the digital age. Inf Syst Res. 2018;29(2):381–400.View ArticleGoogle Scholar
 YliHuumo J, Ko D, Choi S, Park S, Smolander K. Where is current research on blockchain technology?—A systematic review. PLoS ONE. 2016;11(10):0163477.View ArticleGoogle Scholar
 Plansky J, O’Donnell T, Richards K. A strategist’s guide to blockchain. PwC report; 2016. p. 1–12.Google Scholar
 Lindman J, Tuunainen VK, Rossi M. Opportunities and risks of blockchain technologies—a research agenda. In: Proceedings of the 50th Hawaii international conference on system sciences; 2017. p. 1533–42.Google Scholar
 Risius M, Spohrer K. A blockchain research framework. Bus Inf Syst Eng. 2017;59(6):385–409.View ArticleGoogle Scholar
 Parker T. Smart contracts: the ultimate guide to blockchain smart contracts—learn how to use smart contracts for cryptocurrency exchange!. California: CreateSpace Independent Publishing Platform; 2016.Google Scholar
 Bartoletti M, Pompianu L. An empirical analysis of smart contracts: platforms, applications, and design patterns. In: International conference on financial cryptography and data security. Springer: New York; 2017. p. 494–509.View ArticleGoogle Scholar
 Alharby M, van Moorsel A. Blockchainbased smart contracts: a systematic mapping study. arXiv preprint arXiv:1710.06372. 2017.
 Magazzeni D, McBurney P, Nash W. Validation and verification of smart contracts: a research agenda. Computer. 2017;50(9):50–7.View ArticleGoogle Scholar
 Diedrich H. Ethereum: blockchains, digital assets, smart contracts, decentralized autonomous organizations. Sydney: Wildfire Publishing; 2016.Google Scholar
 Dannen C. Introducing ethereum and solidity: foundations of cryptocurrency and blockchain programming for beginners. Berkely: Apress; 2017.View ArticleGoogle Scholar
 Atzei N, Bartoletti M, Cimoli T. A survey of attacks on ethereum smart contracts (sok). In: International conference on principles of security and trust. Springer: New York; 2017. p. 164–86.Google Scholar
 Antonopoulos AM, Wood G. Mastering ethereum: building smart contracts and DApps. California: O’Reilly Media; 2018.Google Scholar
 Wang W, Hoang DT, Xiong Z, Niyato D, Wang P, Hu P, Wen Y. A survey on consensus mechanisms and mining management in blockchain networks. arXiv preprint arXiv:1805.02707. 2018.
 Debus J. Consensus methods in blockchain systems. Frankfurt School of Finance & Management, Blockchain Center, technical report; 2017. p. 1–58.Google Scholar
 Pass R, Seeman L, Shelat A. Analysis of the blockchain protocol in asynchronous networks. In: Annual international conference on the theory and applications of cryptographic techniques. Springer: New York; 2017. p. 643–73.MATHGoogle Scholar
 Pass R, Shi E. Hybrid consensus: efficient consensus in the permissionless model. In: 31st international symposium on distributed computing (DISC 2017). Schloss DagstuhlLeibnizZentrum fuer Informatik; 2017. p. 1–16.Google Scholar
 Cachin C, Vukolić M. Blockchain consensus protocols in the wild. arXiv preprint arXiv:1707.01873. 2017.
 Karame G, Audroulaki E. Bitcoin and blockchain security. Massachusetts: Artech House; 2016.Google Scholar
 Lin IC, Liao TC. A survey of blockchain security issues and challenges. Int J Netw Secur. 2017;19(5):653–9.Google Scholar
 Joshi AP, Han M, Wang Y. A survey on security and privacy issues of blockchain technology. Math Found Comput. 2018;1(2):121–47.View ArticleGoogle Scholar
 Swan M. Blockchain: blueprint for a new economy. California: O’Reilly Media; 2015.Google Scholar
 Catalini C, Gans J. Some simple economics of the blockchain. Cambridge: National Bureau of Economic Research; 2016. p. 1–29.View ArticleGoogle Scholar
 Davidson S, De Filippi P, Potts J. Economics of blockchain. In: Public choice conference; 2016. p. 1–23.Google Scholar
 Bheemaiah K. The blockchain alternative: rethinking macroeconomic policy and economic theory. Berkely: Apress; 2017.View ArticleGoogle Scholar
 Beck R, MüllerBloch C, King JL. Governance in the blockchain economy: a framework and research agenda. J Assoc Inf Syst. 2018;19(10):1020–34.Google Scholar
 Biais B, Casamatta C, Bisire C, Bouvard M. The blockchain folk theorem. Rev Financ Stud. 2019;32(5):1662–715.View ArticleGoogle Scholar
 Kiayias A, Koutsoupias E, Kyropoulou M, Tselekounis Y. Blockchain mining games. In: Proceedings of the 2016 ACM conference on economics and computation. ACM: New York; 2016. p. 365–82.Google Scholar
 Abadi J, Brunnermeier M. Blockchain economics. New York: National Bureau of Economic Research; 2018. p. 1–82.View ArticleGoogle Scholar
 Foroglou G, Tsilidou AL. Further applications of the blockchain. In: 12th student conference on managerial science and technology; 2015. p. 1–9.Google Scholar
 Bahga A, Madisetti V. Blockchain applications: a handson approach. Blacksburg: VPT; 2017.Google Scholar
 Xu X, Weber I, Staples M. Architecture for blockchain applications. Basel: Springer; 2019.View ArticleGoogle Scholar
 Tsai WT, Blower R, Zhu Y, Yu L. A system view of financial blockchains. In: 2016 IEEE symposium on serviceoriented system engineering (SOSE). IEEE: New York; 2016. p. 450–457.Google Scholar
 Nguyen QK. Blockchaina financial technology for future sustainable development. In: 2016 3rd international conference on green technology and sustainable development (GTSD). IEEE: New York; 2016. p. 51–4.Google Scholar
 Tapscott A, Tapscott D. How blockchain is changing finance. Harv Bus Rev. 2017;1(9):2–5.Google Scholar
 Treleaven P, Brown RG, Yang D. Blockchain technology in finance. Computer. 2017;50(9):14–7.View ArticleGoogle Scholar
 Casey M, Crane J, Gensler G, Johnson S, Narula N. The impact of blockchain technology on finance: a catalyst for change. Geneva: International Center for Monetary and Banking Studies (ICMB); 2018.Google Scholar
 Mougayar W, Buterin V. The business blockchain: promise, practice, and application of the next internet technology. Hoboken: Wiley; 2016.Google Scholar
 Morabito V. Business innovation through blockchain. Milan: Springer; 2017.View ArticleGoogle Scholar
 Fleming S. Blockchain technology and DevOps: introduction and its impact on business ecosystem. EU: Stephen Fleming via PublishDrive; 2017.Google Scholar
 Beck R, Avital M, Rossi M, Thatcher JB. Blockchain technology in business and information systems research. Bus Inf Syst Eng. 2017;59(6):381–4.View ArticleGoogle Scholar
 Nowiński W, Kozma M. How can blockchain technology disrupt the existing business models? Entrep Bus Econ Rev. 2017;5(3):173–88.Google Scholar
 Mendling J, Weber I, Aalst WVD, Brocke JV, Cabanillas C, Daniel F, Debois S, Ciccio CD, Dumas M, Dustdar S, et al. Blockchains for business process managementchallenges and opportunities. ACM Trans Manag Inf Syst. 2018;9(1):4.View ArticleGoogle Scholar
 Hofmann E, Strewe UM, Bosia N. Supply chain finance and blockchain technology: the case of reverse securitisation. Heidelberg: Springer; 2017.Google Scholar
 Korpela K, Hallikas J, Dahlberg T. Digital supply chain transformation toward blockchain integration. In: Proceedings of the 50th Hawaii international conference on system sciences; 2017.Google Scholar
 Kim HM, Laskowski M. Toward an ontologydriven blockchain design for supplychain provenance. Intell Syst Account Financ Manag. 2018;25(1):18–27.View ArticleGoogle Scholar
 Saberi S, Kouhizadeh M, Sarkis J, Shen L. Blockchain technology and its relationships to sustainable supply chain management. Int J Prod Res. 2018;57(7):2117–35.View ArticleGoogle Scholar
 Petersen M, Hackius N, von See B. Mapping the sea of opportunities: blockchain in supply chain and logistics. IT Inf Technol. 2018;60(5–6):263–71.Google Scholar
 Sternberg H, Baruffaldi G. Chains in chains–logic and challenges of blockchains in supply chains. In: Proceedings of the 51st annual Hawaii international conference on system sciences; 2018. p. 3936–43.Google Scholar
 Dujak D, Sajter D. Blockchain applications in supply chain. In: SMART supply network. Springer: New York; 2019. p. 21–46.Google Scholar
 Conoscenti M, Vetro A, Martin JD. Blockchain for the internet of things: a systematic literature review. In: 2016 IEEE/ACS 13th international conference of computer systems and applications (AICCSA). IEEE: New Yrok; 2016. p. 1–6.Google Scholar
 Bahga A, Madisetti VK. Blockchain platform for industrial internet of things. J Softw Eng Appl. 2016;9(10):533–46.View ArticleGoogle Scholar
 Dorri A, Kanhere SS, Jurdak R. Blockchain in internet of things: challenges and solutions. arXiv preprint arXiv:1608.05187. 2016.
 Christidis K, Devetsikiotis M. Blockchains and smart contracts for the internet of things. IEEE Access. 2016;4:2292–303.View ArticleGoogle Scholar
 Zhang Y, Wen J. The IoT electric business model: using blockchain technology for the internet of things. PeertoPeer Netw Appl. 2017;10(4):983–94.View ArticleGoogle Scholar
 Huckle S, Bhattacharya R, White M, Beloff N. Internet of things, blockchain and shared economy applications. Procedia Comput Sci. 2016;98:461–6.View ArticleGoogle Scholar
 Hawlitschek F, Notheisen B, Teubner T. The limits of trustfree systems: a literature review on blockchain technology and trust in the sharing economy. Electron Commer Res Appl. 2018;29:50–63.View ArticleGoogle Scholar
 De Filippi P. What blockchain means for the sharing economy. Harvard business review digital articles, 2017. pp 25. http://search.ebscohost.com.ezproxy.is.ed.ac.uk/login.aspx?direct=true&db=bth&AN=122087609&site=ehostlive
 Pazaitis A, De Filippi P, Kostakis V. Blockchain and value systems in the sharing economy: the illustrative case of backfeed. Technol Forecast Soc Change. 2017;125:105–15.View ArticleGoogle Scholar
 Mettler M. Blockchain technology in healthcare: The revolution starts here. In: 2016 IEEE 18th international conference on ehealth networking, applications and services (Healthcom). IEEE: New York; 2016. p. 1–3.Google Scholar
 Rabah K. Challenges & opportunities for blockchain powered healthcare systems: a review. Mara Res J Med Health Sci. 2017;1(1):45–52 (ISSN 25235680).Google Scholar
 Griggs KN, Ossipova O, Kohlios CP, Baccarini AN, Howson EA, Hayajneh T. Healthcare blockchain system using smart contracts for secure automated remote patient monitoring. J Med Syst. 2018;42(7):130.View ArticleGoogle Scholar
 Wang S, Wang J, Wang X, Qiu T, Yuan Y, Ouyang L, Guo Y, Wang FY. Blockchainpowered parallel healthcare systems based on the ACP approach. IEEE Trans Comput Soc Syst. 2018;99:1–9.Google Scholar
 Oh SC, Kim MS, Park Y, Roh GT, Lee CW. Implementation of blockchainbased energy trading system. Asia Pac J Innov Entrep. 2017;11(3):322–34.View ArticleGoogle Scholar
 Aitzhan NZ, Svetinovic D. Security and privacy in decentralized energy trading through multisignatures, blockchain and anonymous messaging streams. IEEE Trans Dependable Secur Comput. 2018;15(5):840–52.View ArticleGoogle Scholar
 Noor S, Yang W, Guo M, van Dam KH, Wang X. Energy demand side management within microgrid networks enhanced by blockchain. Appl Energy. 2018;228:1385–98.View ArticleGoogle Scholar
 Wu J, Tran N. Application of blockchain technology in sustainable energy systems: an overview. Sustainability. 2018;10(9):3067.View ArticleGoogle Scholar
 Li QL, Ma JY, Chang YX. Blockchain queue theory. In: International conference on computational social networks. Springer: New York; 2018. p. 25–40.Google Scholar
 Kasahara S, Kawahara J. Effect of bitcoin fee on transaction–confirmation process. arXiv preprint arXiv:1604.00103. 2016.
 Kawase Y, Kasahara S. transaction–confirmation time for bitcoin: a queueing analytical approach to blockchain mechanism. In: International conference on queueing theory and network applications. Springer: New York; 2017. p. 75–88.MATHView ArticleGoogle Scholar
 Ricci S, Ferreira E, Menasche DS, Ziviani A, Souza JE, Vieira AB. Learning blockchain delays: a queueing theory approach. ACM SIGMETRICS Perform Eval Rev. 2019;46(3):122–5.View ArticleGoogle Scholar
 Memon RA, Li JP, Ahmed J. Simulation model for blockchain systems using queuing theory. Electronics. 2019;8(2):234.View ArticleGoogle Scholar
 Bowden R, Keeler HP, Krzesinski AE, Taylor PG. Block arrivals in the bitcoin blockchain. arXiv preprint arXiv:1801.07447. 2018.
 Papadis N, Borst S, Walid A, Grissa M, Tassiulas L. Stochastic models and widearea network measurements for blockchain design and analysis. In: IEEE INFOCOM 2018IEEE conference on computer communications. IEEE: New York; 2018. p. 2546–54.Google Scholar
 Jourdan M, Blandin S, Wynter L, Deshpande P. A probabilistic model of the bitcoin blockchain. arXiv preprint arXiv:1812.05451. 2018.
 Bolch G, Greiner S, de Meer H, Trivedi KS. Queueing networks and Markov chains: modeling and performance evaluation with computer science applications. New York: Wiley; 2006.MATHView ArticleGoogle Scholar
 Eyal I, Sirer EG. Majority is not enough: Bitcoin mining is vulnerable. Commun ACM. 2018;61(7):95–102.MATHView ArticleGoogle Scholar
 Nayak K, Kumar S, Miller A, Shi E. Stubborn mining: generalizing selfish mining and combining with an eclipse attack. In: 2016 IEEE European symposium on security and privacy (EuroS&P). IEEE: New York; 2016. p. 305–20.Google Scholar
 Carlsten M. The impact of transaction fees on bitcoin mining strategies. Ph.D. thesis, Princeton University; 2016.Google Scholar
 Göbel J, Keeler HP, Krzesinski AE, Taylor PG. Bitcoin blockchain dynamics: the selfishmine strategy in the presence of propagation delay. Perform Eval. 2016;104:23–41.View ArticleGoogle Scholar
 Kiffer L, Rajaraman R, et al. A better method to analyze blockchain consistency. In: Proceedings of the 2018 ACM SIGSAC conference on computer and communications security. ACM: New York; 2018. p. 729–44.Google Scholar
 Huang D, Ma X, Zhang S. Performance analysis of the raft consensus algorithm for private blockchains. IEEE Trans Syst Man Cybern Syst. 2019;. https://doi.org/10.1109/TSMC.2019.2895471.View ArticleGoogle Scholar
 Sapirshtein A, Sompolinsky Y, Zohar A. Optimal selfish mining strategies in bitcoin. In: International conference on financial cryptography and data security. Springer: New York; 2016. p. 515–32.Google Scholar
 Sompolinsky Y, Zohar A. Bitcoin’s security model revisited. arXiv preprint arXiv:1605.09193. 2016.
 Gervais A, Karame GO, Wüst K, Glykantzis V, Ritzdorf H, Capkun S. On the security and performance of proof of work blockchains. In: Proceedings of the 2016 ACM SIGSAC conference on computer and communications security. ACM: New York; 2016. p. 3–16.Google Scholar
 Goffard PO. Fraud risk assessment within blockchain transactions. Working paper or preprint 2019. https://hal.archivesouvertes.fr/hal01716687.
 Jang J. Lee HN. Profitable doublespending attacks. arXiv preprint arXiv:1903.01711. 2019.
 Frolkova M, Mandjes M. A bitcoininspired infiniteserver model with a random fluid limit. Stoch Models. 2019;. https://doi.org/10.1080/15326349.2018.1559739.MathSciNetMATHView ArticleGoogle Scholar
 King C. The fluid limit of a random graph model for a shared ledger. arXiv preprint arXiv:1902.05050. 2019.
 Li QL. Constructive Computation in stochastic models with applications: the RGfactorizations. Berlin: Springer; 2010.MATHView ArticleGoogle Scholar
 Neuts MF. Matrixgeometric solutions in stochastic models: an algorithmic approach. Maryland: Johns Hopkins University; 1981.MATHGoogle Scholar
 Li QL, Lian Z, Liu L. An \(RG\)factorization approach for a BMAP/M/1 generalized processorsharing queue. Stoch Models. 2005;21(2–3):507–30.MathSciNetMATHGoogle Scholar
 Takine T. Analysis and computation of the stationary distribution in a special class of Markov chains of leveldependent M/G/1type and its application to BMAP/M/\(\infty\) and BMAP/M/c+M queues. Queueing Syst. 2016;84(1/2):49–77.MathSciNetMATHGoogle Scholar