a stochastic model for analysis of attacks on blockchain for analy… · 24/10/2016  · model for...

20
A Stochastic Model for Analysis of Attacks on Blockchain (preliminary version, please do not quote) Ming-hua Hsieh, National Chengchi University, [email protected] ABSTRACT In a blockchain, the longest chain, which has the greatest proof-of-work effort spent in it, represents the majority decision. To change the transaction data of a block, an attacker has to control more computing power than other honest nodes. This situation can happen if the attacker can hack into the systems of honest nodes. To analyze the probability of such event, we propose a probability model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer network. We assume the state of each honest node follows a two-state (hacked or normal) Markov chains. A hacked node is assumed to be controlled by the attacker and its computing power belongs to the attacker. On the other hand, the computing power of a normal node belongs to the honest longest chain. We apply the model to study the probability of the majority decision is controlled by the attacker and the duration of such event. In addition, we analyze the magnitude of the loss for such event. Keywords: Blockchain, the longest chain, blockchain attack, Markov chain, stochastic process INTRODUCTION Blockchain or distributed ledger technology (DLT) is one of most disruptive innovation in FinTech. The success of bitcoin has highlighted the impact of the blockchain technology to the financial services industry. In addition to the innovative payment methods like Bitcoin, there are many other applications in the blockchain: Airbnb and other companies are recruiting blockchain

Upload: others

Post on 24-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

A Stochastic Model for Analysis of Attacks on Blockchain

(preliminary version, please do not quote)

Ming-hua Hsieh, National Chengchi University, [email protected]

ABSTRACT

In a blockchain, the longest chain, which has the greatest proof-of-work effort spent in it,

represents the majority decision. To change the transaction data of a block, an attacker has to control

more computing power than other honest nodes. This situation can happen if the attacker can hack

into the systems of honest nodes. To analyze the probability of such event, we propose a probability

model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

network. We assume the state of each honest node follows a two-state (hacked or normal) Markov

chains. A hacked node is assumed to be controlled by the attacker and its computing power belongs

to the attacker. On the other hand, the computing power of a normal node belongs to the honest longest

chain. We apply the model to study the probability of the majority decision is controlled by the

attacker and the duration of such event. In addition, we analyze the magnitude of the loss for such

event.

Keywords: Blockchain, the longest chain, blockchain attack, Markov chain, stochastic process

INTRODUCTION

Blockchain or distributed ledger technology (DLT) is one of most disruptive innovation in

FinTech. The success of bitcoin has highlighted the impact of the blockchain technology to the

financial services industry. In addition to the innovative payment methods like Bitcoin, there are

many other applications in the blockchain: Airbnb and other companies are recruiting blockchain

Page 2: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

experts to fill the gap in the sharing economy trust mechanism. (Dennis Richard and Owen Gareth

2015; Georgios Zervas, Davide Proserpio, and Byers 2015; Huckle et al. 2016; Kosten 2015;

Mainelli and Smith 2015; Sundararajan 2016; Zervas, Proserpio, and Byers 2016)。 IBM,

NASDAQ, UBS, Overstock and other companies applied blockchain to financial markets

(BHASKAR, LAM, and LEE 2015; De Filippi 2015; Friedlmaier, Tumasjan, and Welpe 2016;

Jacynycz et al. 2016; Lamarque 2016; Lee 2015; Peters and Vishnia 2016; Shrier et al. 2016;

Victoria 2016; Wyman 2016; Zhu and Zhou 2016). These applications reduce transaction errors,

streamline or automate functions of backend system, and reduce clearing time. Blockchain

technology will be widely used for the foreseeable future (Buterin 2014; Swan 2015)。However,

the new type of risk that this new technology may bring is worth exploring (Antonopoulos 2014;

Eyal and Sirer 2014; Nakamoto 2008)。

Bitcoin has emerged as the most successful cryptocurrency. According to

http://blockchain.info/charts/market-cap, the Bitcoin market capitalization is over 10 billion US

Dollars as of October 2016. The coins of bitcoin network are created from the network protocol

directly, without any central authority involved. Most of these economic values is generated from

this innovation. As of October 24, 2016, the bitcoin blockchain wallet user is near 10 million and

daily USD transaction value is more than 120 million on average (see Fig. 1). Bitcoin is not just a

digital currency, it includes innovations of combing a few existed technologies and produce an

innovative payment system without central authority (Antonopoulos 2014; Gervais et al. 2014;

Nakamoto 2008). The computing power of the bitcoin network is greater than any supercomputer

on earth. The current computing power is more than 2000 peta-hash per second (see Fig. 2).

Bitcoin is not just a virtual currency; it is a collection of concepts and technologies. Bitcoin was

designed by software developers without apparent influence from financial industry or regulators. A

key idea in bitcoin network is Proof-of-Work. A mining node shows its Proof-of-Work (PoW) by

solving a difficult cryptography puzzle and get rewarded. Therefore, the probability of receiving

reward of each mining node is proportional to its computing power/hash rates.

Page 3: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

Fig. 1 Estimated daily USD transaction value of bitcoin blockchain

Fig. 2 Hash rate of bitcoin network

Page 4: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

Currently, solo miner is very difficult to get rewarded. Mining pools are more likely to get

rewards. Solo miner can join a mining pool to share the rewards and diversify his/her risk. Fig. 3

shows the major mining pools and their computing power.

Fig. 3 Major mining pools of bitcoin network

ATTACKERS’ MODEL .

The basic attacker setup in (Nakamoto 2008) is as follows: “The race between the honest chain and

an attacker chain can be characterized as a Binomial Random Walk. The success event is the honest

chain being extended by one block, increasing its lead by +1, and the failure event is the attacker's

chain being extended by one block, reducing the gap by -1”. The quantitative issues of blockchain

security had been studied by (Eyal and Sirer 2014) under a different problem setting. In this paper,

we extend the analysis by extending the attacker’s model of (Nakamoto 2008). We assume two types

of nodes: honest and hacked. When an attack starts, it will last for N blocks, where N can be

deterministic or following a discrete random variable such as a Poison random variable. Assume

Page 5: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

attacker’s node control 𝑤𝑤 of total hash power when the attack begins. During the attacking period,

an attacker’s/hacked node will remain as an attacker’s node with probability 𝛼𝛼 when a block is

created; and an honest node will remain as a honest node with probability 𝛽𝛽 when a block is created.

Based on these model assumptions, the majority decision is a two-state stochastic process (Asmussen

and Glynn 2007). More precisely, let X0, X1, X2,…., XN denote the random outcomes of the created

blocks. We assume X1 = 1 if it is created by an attacker’s node and X1 = 0 if it is created by an honest

node. It is clear that

𝑃𝑃(𝑋𝑋0 = 1) = 𝑤𝑤

𝑃𝑃(𝑋𝑋1 = 1) = 𝛼𝛼𝑤𝑤 + (1 − 𝛽𝛽)(1 −𝑤𝑤) ≡ 𝜇𝜇1 It can be shown that 𝑃𝑃(𝑋𝑋𝑛𝑛 = 1) = 𝛼𝛼𝜇𝜇𝑛𝑛−1 + (1 − 𝛽𝛽)(1 − 𝜇𝜇𝑛𝑛−1) ≡ 𝜇𝜇𝑛𝑛 for n = 2, … N. From above recursion, we can also compute 𝑃𝑃(𝑋𝑋𝑛𝑛 = 1) = 1 − 𝛽𝛽 − [(1 − 𝑤𝑤)(1 − 𝛽𝛽) − 𝑤𝑤(1 − 𝛼𝛼)](𝛼𝛼 + 𝛽𝛽 − 1)𝑛𝑛

for all n.

Since only the double spending attack (Antonopoulos 2014) can incur loss, we assume the

random loss Ln is incurred when block n is created by a hacked node or 𝑋𝑋𝑛𝑛 = 1. Up to 2014, the

largest amount of a single transaction is about 150 million USD (Antonopoulos 2014). The total loss

of such an attack is

𝐿𝐿 = �𝐿𝐿𝑛𝑛 𝐼𝐼(𝑋𝑋𝑛𝑛 = 1)𝑁𝑁

𝑛𝑛=0

From the states of the majority decision, a.k.a. the state of 𝑋𝑋𝑛𝑛, all of the interested quantities

can be derived via Monte Carlo simulation. The interested quantities are the expected loss EL during

an attacking period and risk measures of L such as VaR (Value at Risk). Above formulation can also

Page 6: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

extended to analyze risk mitigation strategies. For example, high-value transactions such as arts or

international trade deal (Antonopoulos 2014) can hold the settlement until k blocks have been

confirmed. For this strategy and without loss of generality, the total loss becomes

𝐿𝐿 = �𝐿𝐿𝑛𝑛 𝐼𝐼(𝑋𝑋𝑛𝑛 = 1)𝑁𝑁

𝑛𝑛=𝑘𝑘

Here k is the decision variable for this specific risk mitigation strategy.

Distribution fitting of Bitcoin transaction data

We use the python module bitcoin-blockchain-parser1 from GitHub to extract transactions of

bitcoin ledger.

When under attack, we define the number of transactions in i-th block ni and the largest

transaction amount of transaction j in i-th block tij, where i = 0, …, N; j = 1, …, ni. We also

let the largest amount of vout in transaction tij be vij

There are many transactions with small transaction amount in each block. The hackers are not

motivated to attack such a transaction, so we only consider the transactions with the maximum

“vout” greater than H BTC in each block. In particular, we let

𝑚𝑚𝑖𝑖 = �𝐼𝐼(𝑣𝑣𝑖𝑖𝑖𝑖 > 𝐻𝐻)𝑛𝑛𝑖𝑖

𝑖𝑖=1

And define the k-th high value transaction as hik,where i = 0, …, N; j = 1, …, mi,We also

let the largest amount of vout in transaction hij be wij. Therefore,

∀ 𝑖𝑖 ∈ {0, … ,𝑁𝑁},𝑘𝑘 ∈ {1, … , mi}

1 https://github.com/alecalve/python-bitcoin-blockchain-parser

Page 7: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

∃! 𝑗𝑗 ∈ {1, … ,𝑛𝑛𝑖𝑖} 𝑠𝑠. 𝑡𝑡. ℎ𝑖𝑖𝑘𝑘 = 𝑡𝑡𝑖𝑖𝑖𝑖 ,𝑤𝑤𝑖𝑖𝑘𝑘 = 𝑣𝑣𝑖𝑖𝑖𝑖 Set the state of transaction hnk as ank. When ank = 1, the transaction is under attack; when ank

= 0 the transaction is normal. Then we have

𝐿𝐿𝑛𝑛 = �𝑤𝑤𝑛𝑛 ∗ 𝐼𝐼(𝑎𝑎𝑛𝑛𝑘𝑘 = 1)𝑚𝑚𝑛𝑛

𝑘𝑘=1

To fit the distribution of the number of transactions per block, we use the data from block height 501984 to the block height 518112 in bitcoin ledger. We fit with gamma, log normal, beta, and generalized pareto. Table 1 shows the AICs for the four distributions, and the p value for the kolmogorov-smirnov test (in parentheses). The hypothesis is as follows: H0: The number of transactions in each block is from the specified distribution H1: Otherwise Among them, the sum of AICs of fitted beta distribution was the lowest, and the p value of kolmogorov-smirnov test was greater than 0.05 in all data sets. Therefore, we choose beta as the distribution of the number of transactions in each block. Figure 1 shows the results of four models for the number of transactions from block 514080 to block 516096 and block 516096 to block 518112. The histogram of the block transaction number is in blue, and the distribution probability distribution is in orange. The fitted beta distribution is very close to the histogram. The parameters are estimated using block 516096 to block 518112. Table 2 shows the AICs and p values of kolmogorov-smirnov test, and the distribution mean and standard deviation. Figure 2 shows the fitted beta distributions.

Page 8: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

Fig 1. Fitted ditributions and data histograms

Fig. 2 The fitted beta distrution of the number of transactions in each block

Page 9: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

gamma lognormal beta generalized pareto

from block 501984 to block 504000 31120.55 (0.1492) 38894.71 (0.0000) 31097.60 (0.6154) 38539.61 (0.0000)

from block 504000 to block 506016 29944.15 (0.0029) 37865.47 (0.0000) 29888.55 (0.2131) 37920.22 (0.0000)

from block 506016 to block 508032 29118.00 (0.0071) 36598.34 (0.0000) 29073.55 (0.0750) 35598.00 (0.0000)

from block 508032 to block 510048 28324.20 (0.0008) 35332.39 (0.0000) 28253.11 (0.4515) 34134.75 (0.0000)

from block 510048 to block 512064 28049.95 (0.0113) 34977.46 (0.0000) 27968.36 (0.8073) 38006.47 (0.0000)

from block 512064 to block 514080 28186.56 (0.0009) 33839.63 (0.0000) 28136.74 (0.1243) 34023.22 (0.0000)

from block 514080 to block 516096 28185.70 (0.0000) 34966.38 (0.0000) 28003.45 (0.0694) 33731.74 (0.0000)

from block 516096 to block 518112 27848.52 (0.0001) 33028.76 (0.0000) 27689.58 (0.3193) 33279.37 (0.0000)

aic sum 230777.63 285503.1198 230110.9364 285233.3739

Table 1 Summary of the fitted distribution for the number of transactions per block

AIC p value mean std

txNumber (beta) 27689.5844 0.3193 376.1485 312.0897

Table 2 The fitted beta distribution: AIC, kolmogorov-smirnov test p value, mean and standard deviation.

To fit the distribution of the log transaction amount per transaction, we use the data from block height 508012 to the block height 518112 in bitcoin ledger. We fit with gamma, log normal, beta, and generalized pareto. Table 3 shows the AICs for the four distributions, and the p value for the kolmogorov-smirnov test (in parentheses). The hypothesis is as follows: H0: log transaction amount per transaction is from the specified distribution H1: Otherwise Among them, the sum of AICs of fitted beta distribution was the lowest, and the p value of

Page 10: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

kolmogorov-smirnov test was greater than 0.05 in all data sets. Therefore, we choose beta as the distribution of the log transaction amount per transaction.

Figure 3 shows the results of four fitted distributions. Table 4 shows the AICs and p values of kolmogorov-smirnov test, and the distribution mean and standard deviation. Figure 4 shows the fitted beta distributions.

block 518111 3638.25 (0.0027) 3654.98 (0.0253) 3613.15 (0.0013) 6513.85 (0.0000)

block 518110 129.88 (0.8720) 130.76 (0.8469) 113.40 (0.3331) 175.53 (0.0000)

block 518109 238.22 (0.6161) 243.35 (0.4290) 226.12 (0.4394) 397.48 (0.0000)

block 518108 294.73 (0.3289) 301.12 (0.1799) 290.86 (0.7783) 494.46 (0.0000)

… … … … …

block 518015 2838.62 (0.1093) 2877.75 (0.0468) 2806.11 (0.5596) 5078.37 (0.0000)

block 518014 1874.66 (0.0615) 1899.46 (0.0327) 1857.98 (0.5461) 3370.24 (0.0000)

block 518013 1856.28 (0.1590) 1889.86 (0.3773) 1842.01 (0.5220) 3334.11 (0.0000)

block 518012 175.76 (0.9810) 176.53 (0.9960) 176.74 (0.7460) 285.12 (0.0000)

aic sum 157661.0646 159857.6764 156431.014 289127.0952

Table 3 Summary of the fitted distribution for the log transaction amount per transaction.

aic p value mean std

txValues (beta) 2582261.95 0 19.2 1.68

Table 4 The fitted beta distribution: AIC, kolmogorov-smirnov test p value, mean and standard deviation.

Page 11: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

Numerical results of Monte Carlo simulation Below are the basic setting:

Fig. 4 The fitted beta distrution of the log transaction amount per transaction

Fig 3. Fitted ditributions and data histograms

Page 12: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

1. The number of replications: 200 2. N = 100 3. Initial computing power w = 25%。 4. 𝛼𝛼 = 0.95, 𝛽𝛽 = 0.95。 5. H = 2.5 ∗ 108𝑠𝑠𝑎𝑎𝑡𝑡𝑠𝑠𝑠𝑠ℎ𝑖𝑖 = 2.5 𝐵𝐵𝐵𝐵𝐵𝐵。

.

Table 5 Summary of the simulated loss distribution Mean 4293.82

Std 1960.28

Min 1501.84

25 Percentile 2849.93

Median 3888.35

75 Percentile 5107.47

Max 11878.86

VaR95 8479.26

ES 9947.16

We choose 95% VaR as the key risk measure for analyzing the sensitivity of each model parameters. Other summary statistics and risk measures are also listed in tables. The parameters includes N, w, α, β and H.

Fig. 5 The simulated loss distribution

Page 13: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

N 100 300 500 1000 1500 2000

w 0.25 0.25 0.25 0.25 0.25 0.25

Alpha 0.95 0.95 0.95 0.95 0.95 0.95

Beta 0.95 0.95 0.95 0.95 0.95 0.95

H 2.5 2.5 2.5 2.5 2.5 2.5

- - - - - - -

Mean 4190.34 13932.76 23050.95 46373.37 69400.36 92988.88

Std 1661.68 3535.81 4460.29 6157.81 7848.19 8804.78

Min 1547.60 8014.23 12284.19 32615.03 53542.21 70783.17

25 Percentile 3004.74 11448.44 19539.93 42091.78 63873.80 87280.48

Median 3940.89 13553.51 22856.34 46271.50 68946.53 92617.25

75 Percentile 5171.07 16067.85 26012.88 49985.86 73526.61 98820.28

Max 10413.02 26493.87 45004.13 67391.38 96700.94 117604.27

VaR95 7435.57 20150.46 30435.08 57688.54 83111.66 108441.99

ES 8427.53 23144.64 32928.76 60766.02 88637.25 111716.53

Table 6 Sensitivity analysis in N

Fig 1 Sensitivity analysis of VaR 95 in N

Page 14: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

N 100 100 100 100 100 100

w 0.01 0.02 0.05 0.1 0.2 0.5

Alpha 0.95 0.95 0.95 0.95 0.95 0.95

Beta 0.95 0.95 0.95 0.95 0.95 0.95

H 2.5 2.5 2.5 2.5 2.5 2.5

- - - - - - -

Mean 4473.06 4063.78 4059.25 4257.60 4497.68 4978.39

Std 1998.45 1741.63 1659.04 1986.80 1972.29 2002.49

Min 738.63 1375.19 1209.76 1273.06 1462.38 1872.22

25 Percentile 3179.22 2846.78 2901.55 2874.62 3211.49 3578.86

Median 4082.56 3780.42 3695.22 3694.08 4055.47 4562.68

75 Percentile 5315.01 4752.12 4838.54 5026.78 5309.26 6073.40

Max 14998.09 12676.80 12019.77 12008.13 11832.79 13144.34

VaR95 8098.05 7199.87 6939.42 8549.61 8700.48 8942.88

ES 10209.56 9097.73 8827.31 9715.91 10083.03 10332.00

Table 7: Sensitivity analysis of w

Fig. 7: Sensitivity analysis of VaR 95 in w

Page 15: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

N 100 100 100 100 100

w 0.25 0.25 0.25 0.25 0.25

Alpha 0.5 0.7 0.9 0.95 0.99

Beta 0.95 0.95 0.95 0.95 0.95

H 2.5 2.5 2.5 2.5 2.5

- - - - - -

Mean 833.08 1345.28 3027.72 4399.20 7214.26

Std 708.63 986.07 1593.35 2189.73 2687.79

Min 71.23 88.19 827.54 1620.80 3108.91

25 Percentile 350.83 692.53 1885.90 3108.40 5484.64

Median 614.11 1048.75 2731.20 3917.73 6796.54

75 Percentile 1094.25 1760.91 3714.36 5071.31 8374.71

Max 4439.04 5706.13 9518.45 18567.44 22274.35

VaR95 2337.20 3416.44 6659.44 8214.91 12200.57

ES 3013.06 4305.48 7528.49 11075.07 14875.15

Table 8: Sensitivity analysis of 𝛼𝛼

Fig. 8: Sensitivity analysis of VaR 95 in 𝛼𝛼

Page 16: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

N 100 100 100 100 100

w 0.25 0.25 0.25 0.25 0.25

Alpha 0.95 0.95 0.95 0.95 0.95

Beta 0.5 0.7 0.9 0.95 0.99

H 2.5 2.5 2.5 2.5 2.5

- - - - - -

Mean 8210.16 8163.78 6056.42 4508.64 1664.75

Std 2280.90 2647.46 2061.92 2128.48 1350.73

Min 4057.59 4006.91 2350.59 1490.84 237.50

25 Percentile 6621.98 6298.09 4593.51 2947.16 866.85

Median 7726.10 7677.86 5745.07 4045.68 1251.44

75 Percentile 9936.91 9444.80 7414.20 5463.40 1947.17

Max 14338.92 18142.39 16818.08 13410.93 11757.63

VaR95 12409.39 13122.19 9286.63 8648.99 4291.92

ES 13187.16 15449.96 11422.50 10256.36 5953.07

Table 9: Sensitivity analysis of 𝛽𝛽

Fig. 9: Sensitivity analysis of VaR 95 in 𝛽𝛽

Page 17: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

N 100 100 100 100 100 100 100

w 0.25 0.25 0.25 0.25 0.25 0.25 0.25

Alpha 0.95 0.95 0.95 0.95 0.95 0.95 0.95

Beta 0.95 0.95 0.95 0.95 0.95 0.95 0.95

H 1 5 10 50 100 500 1000

- - - - - - - -

Mean 4165.51 4799.52 5814.28 11481.21 16985.72 40730.90 43266.79

Std 1935.34 1917.31 2212.63 3491.62 3742.84 8259.28 9984.27

Min 1351.19 1416.12 1696.88 6145.92 9883.65 23625.04 22727.72

25 Percentile 2793.73 3431.02 4064.32 9321.58 14180.37 35284.18 35859.73

Median 3598.52 4400.88 5273.01 10878.14 16580.82 39905.52 42552.65

75 Percentile 5091.84 5813.92 7286.12 12764.76 19410.07 45375.84 50081.66

Max 13826.81 12934.15 12550.22 31543.05 27454.59 83595.38 82956.67

VaR95 8359.97 8452.07 10097.86 17357.68 24073.56 53661.32 61090.91

ES 9807.69 9793.60 11072.44 21499.58 25566.12 60301.91 65884.14

Table 10: Sensitivity analysis of 𝐻𝐻

Fig. 10: Sensitivity analysis of VaR 95 in 𝐻𝐻

Page 18: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

Conclusion and future works

We extend attackers’ model in (Nakamoto 2008) to address the importance attacker’s issue in

the standard blockchain protocol. We use bitcoin transactional data to fit the distributions of the

number of transactions in each block and transaction amount of each transaction. We then use Monte

Carlo simulation to analyze the risk of an attack numerically.

To estimate such quantities via Monte Carlo simulation, computational efficiency is usually an

important and practical issue (Asmussen and Glynn 2007; Glasserman 2004). Fast simulation

algorithm for similar network problem can be found in (Asmussen and Glynn 2007) and

(Heidelberger 1995) and fast simulation in financial applications are very common for a variety of

situations (Boyle, Broadie, and Glasserman 1997; Boyle 1977; Broadie and Glasserman 1996; Chiang,

Yueh, and Hsieh 2007; Glasserman 2004; Hsieh, Liao, and Chen 2014; Joshi and Kainth 2004; Wang

and Sloan 2011). We have designed some efficient algorithms for derivative pricing (Chiang, Yueh,

and Hsieh 2007). We have extended our algorithms to incorporate additional variance reduction

techniques. We think the algorithms will be more efficient. Therefore we wish to design such

algorithms in the future works.

The result can provide a useful insight for blockchain technology and the issues related to its

security. These issues will be very important for financial service and fintech industries. It might then

be useful for financial institutions and fintech companies facing new regulation and changing

environment.

Page 19: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

References

Antonopoulos, Andreas M. 2014. Mastering Bitcoin: unlocking digital cryptocurrencies: " O'Reilly

Media, Inc.". Asmussen, Søren, and Peter W Glynn. 2007. Stochastic simulation: Algorithms and analysis:

Springer. BHASKAR, Nirupama Devi, Pak Nian LAM, and David KC LEE. 2015. Bitcoin, IPO, ETF and

Crowdfunding. Boyle, Phelim, Mark Broadie, and Paul Glasserman. 1997. Monte Carlo methods for security

pricing. Journal of Economic Dynamics and Control. Boyle, Phelim P. 1977. Options A Monte Carlo Approach. Journal of Financial Economics. Broadie, Mark, and Paul Glasserman. 1996. Estimating Security Price Derivatives Using

Simulation. MANAGEMENT SCIENCE 42 (2). Buterin, Vitalik. 2014. A next-generation smart contract and decentralized application platform.

white paper. Chiang, Mi-Hsiu, Meng-Lan Yueh, and Ming-Hua Hsieh. 2007. An efficient algorithm for basket

default swap valuation. The Journal of Derivatives 15 (2):8-19. De Filippi, Primavera. 2015. Blockchain-based Crowdfunding: what impact on artistic production

and art consumption? Observatório Itaú Cultural (19). Dennis Richard, and Owen Gareth. 2015. Rep on the block: A next generation reputation system

based on the blockchain. In 2015 10th International Conference for Internet Technology and Secured Transactions (ICITST): IEEE.

Eyal, Ittay, and Emin Gün Sirer. 2014. Majority is not enough: Bitcoin mining is vulnerable. Paper read at International Conference on Financial Cryptography and Data Security.

Friedlmaier, Maximilian, Andranik Tumasjan, and Isabell M Welpe. 2016. Disrupting Industries With Blockchain: The Industry, Venture Capital Funding, and Regional Distribution of Blockchain Ventures.

Georgios Zervas, Davide Proserpio, and John W. Byers. 2015. A first look at online reputation on Airbnb, where every stay is above average, Where Every Stay is Above Average.

Gervais, Arthur, Ghassan Karame, Srdjan Capkun, and Vedran Capkun. 2014. Is Bitcoin a decentralized currency? IEEE security & privacy 12 (3):54-60.

Glasserman, Paul. 2004. Monte Carlo methods in financial engineering. Vol. 53: Springer. Heidelberger, Philip. 1995. Fast simulation of rare events in queueing and reliability models. ACM

Transactions on Modeling and Computer Simulation (TOMACS) 5 (1):43-85. Hsieh, Ming-Hua, Wei-Cheng Liao, and Chuen-Lung Chen. 2014. A Fast Monte Carlo Algorithm

for Estimating Value at Risk and Expected Shortfall. The Journal of Derivatives 22 (2):50-66.

Huckle, Steve, Rituparna Bhattacharya, Martin White, and Natalia Beloff. 2016. Internet of Things, blockchain and shared economy applications. Procedia Computer Science 98:461-466.

Page 20: A Stochastic Model for Analysis of Attacks on Blockchain for analy… · 24/10/2016  · model for analysis of attacks on blockchain. The model is based on the structure of a peer-to-peer

Jacynycz, Viktor, Adrian Calvo, Samer Hassan, and Antonio A Sánchez-Ruiz. 2016. Betfunding: A Distributed Bounty-Based Crowdfunding Platform over Ethereum. Paper read at Distributed Computing and Artificial Intelligence, 13th International Conference.

Joshi, Mark S., and Dherminder Kainth. 2004. Rapid and accurate development of prices and Greeks fornth to default credit swaps in the Li model. Quantitative Finance 4 (3):266-275.

Kosten, Dmitri. 2015. Bitcoin Mission Statement. Or What Does It Mean Sharing Economy and Distributed Trust?

Lamarque, Mélodie. 2016. The blockchain revolution: new opportunities in equity markets, Massachusetts Institute of Technology.

Lee, Larissa. 2015. New Kids on the Blockchain: How Bitcoin's Technology Could Reinvent the Stock Market. Available at SSRN 2656501.

Mainelli, M, and Mike Smith. 2015. Sharing ledgers for sharing economies: an exploration of mutual distributed ledgers (aka blockchain technology). The Journal of Financial Perspectives 3 (3):38-69.

Nakamoto, Satoshi. 2008. Bitcoin: A peer-to-peer electronic cash system. Peters, Gareth William, and Guy Vishnia. 2016. Overview of Emerging Blockchain Architectures

and Platforms for Electronic Trading Exchanges. Shrier, David, J Larossi, Deven Sharma, and Alex Pentland. 2016. Blockchain & Transactions,

Markets and Marketplaces. Sundararajan, Arun. 2016. The Sharing Economy: The End of Employment and the Rise of Crowd-

Based Capitalism: MIT Press. Swan, Melanie. 2015. Blockchain: Blueprint for a new economy: " O'Reilly Media, Inc.". Victoria, Karlsson Lundström. 2016. Impact from the blockchain technology on the Nordic capital

market. Wang, X. Q., and I. H. Sloan. 2011. Quasi-Monte Carlo Methods in Financial Engineering: An

Equivalence Principle and Dimension Reduction. Operations Research 59 (1):80-95. Wyman, Oliver. 2016. Blockchain in Capital Markets: The Prize and the Journey. euroclear,

February. Zervas, Georgios, Davide Proserpio, and John Byers. 2016. The rise of the sharing economy:

Estimating the impact of Airbnb on the hotel industry. In Boston U. School of Management Research Paper.

Zhu, Huasheng, and Zach Zhizhong Zhou. 2016. Analysis and outlook of applications of blockchain technology to equity crowdfunding in China. Financial Innovation 2 (1):29.