## Bitcoin Security under Temporary Dishonest Majority

Georgia Avarikioti, Lukas K¨ppeli, Yuyi Wang, and Roger Wattenhofer a

ETH Zurich, Switzerland { zetavar,yuwang,wattenhofer @ethz.ch, } lukas.kaeppeli@hotmail.com

Abstract. We prove Bitcoin is secure under temporary dishonest majority. We assume the adversary can corrupt a specific fraction of parties and also introduce crash failures, i.e., some honest participants are offline during the execution of the protocol. We demand a majority of honest online participants on expectation. We explore three different models and present the requirements for proving Bitcoin's security in all of them: we first examine a synchronous model, then extend to a bounded delay model and last we consider a synchronous model that allows message losses.

Keywords: Bitcoin · Security · Dishonest Majority · Offline Players · Sleepy Model

## 1 Introduction

Bitcoin [10] is the predominant cryptocurrency today. Nevertheless, our understanding of Bitcoin' s correctness is limited. Only relatively recently, there have been attempts to formally capture Bitcoin' s security properties. In a seminal work, Garay et al. [7] proposed a formal framework (the 'backbone protocol') to describe the Bitcoin system. They defined security properties for the backbone protocol and proved these both in the synchronous and bounded-delay model.

Our work extends the work of Garay et al. [7] in several dimensions. First, in contrast to our model, [7] assumed a constant honest majority of the participants. However, the Bitcoin protocol has been proven to be more fault-tolerant and able to allow for a majority of dishonest players, as long as this dishonest majority is only temporary. Specifically, in 2014 there was a majority takeover (approximately 54% of the network) by the mining pool GHash.io. The cost to perform such attacks have been studied in [3] and https://www.crypto51.app/ . In this work, we extend the original work of Garay et al. [7] to capture these attacks, by allowing a temporary dishonest majority. We provide a formal analysis and investigate under which circumstances Bitcoin is secure when the honest majority holds only on expectation.

Second, motivated by a model of Pass and Shi [12], we not only have honest ('alert') or dishonest ('corrupted') nodes. Instead, there is a third group of nodes that are currently not able to follow the protocol. We call them 'sleepy',

which really is a euphemism for nodes that are basically offline, eclipsed from the action, for instance by a denial of service attack. Understanding this trade-off between corrupted and sleepy nodes gives us a hint whether a dishonest attacker should rather invest in more mining power (to get more corrupted players) or in a distributed denial of service architecture (to get more sleepy players).

Third, we introduce a parameter c that upper bounds the mining power of the adversary over the mining power of 'alert' nodes. This is not necessary for the security analysis. However, as showed in [13], if the adversary follows a selfish mining strategy, he can gain a higher fraction of blocks (rewards) compared to his fraction of the mining power. Hence, parameter c allows us to clearly capture the correlation between this parameter and the advantage of the adversary when he deviates from the honest protocol execution.

Fourth, we study network delays since they significantly affect the performance and security. By extending our synchronous model to the a semi-synchronous model, we show that the upper bound on sleepy parties heavily depends on the maximum allowed message delay.

Finally, we extend our analysis to a synchronous model, where we allow message losses. This is inspired by an idea described in [8], where the adversary may perform an eclipse attack [14,15] on some victims which enables the adversary to control their view of the blockchain. We show security under the assumption that the adversary can eclipse a certain number of players, depending on the number of corrupted players.

The omitted theorems, lemmas and proofs can be found in the full version of the paper [2].

## 2 The Model

We adapt the model originally introduced by Garay et al. [7] to prove the security of the Backbone protocol. We initially present all the components of a general model and then parametrize the model to capture the three different models under which we later prove that the backbone protocol is secure.

## 2.1 The Execution

We assume a fixed set of n parties, executing the Bitcoin backbone protocol. Each party can either be corrupted , sleepy or alert ; sleepy is an offline honest node and alert an honest node that is actively participating in the protocol.

Involved programs. All programs are modeled as polynomially-bounded interactive Turing machines (ITM) that have communication, input and output tapes. An ITM instance (ITI) is an instance of an ITM running a certain program or protocol. Let the ITM Z denote the environment program that leads the execution of the Backbone protocol. Therefore Z can spawn multiple ITI's running the protocol. These instances are a fixed set of n parties, denoted by P , . . . , P 1 n . The control program C , which is also an ITM, controls the spawning

of these new ITI's and the communication between them. Further, C forces the environment Z to initially spawn an adversary A . The environment will then activate each party in a round-robin way, starting with P 1 . This is done by writing to their input tape. Each time, a corrupted party gets activated, A is activated instead. The adversary may then send messages ( Corrupt , P i ) to the control program and C will register the party P i as corrupted, as long as there are less than t &lt; n parties corrupted. Further, the adversary can set each party asleep by sending a message ( sleep , P i ) to the control program. The control program C will set the party P i asleep for the next round with probability s , without informing A if the instruction was successful or not.

Each party P i has access to two ideal functionalities, the 'random oracle' and the 'diffusion channel', which are also modelled as ITM's. These functionalities, defined below, are used as subroutines in the Backbone protocol.

Round. A round of the protocol execution is a sequence of actions, performed by the different ITI's. In our setting, a round starts with the activation of the party P 1 , which then performs the protocol-specific steps. By calling the below defined diffuse functionality, P 1 has finished it's actions for the current round and Z will activate P 2 . If the party P i is corrupted, A will be activated and if P i is asleep, P i +1 gets activated instead. The round ends after P n has finished. Rounds are ordered and therefore enumerated, starting from 1.

Views. Let us formally define the view of a party P . The only 'external' input to the protocol is the security parameter κ . Therefore, we can consider κ to be constant over all rounds of the execution and we can exclude it from the random variable describing the view of a party. We denote by the random variable V IEW P,t,n A Z , the view of a party P after the execution of the Bitcoin backbone protocol in an environment Z and with adversary A . The complete view over all n parties is the concatenation of their views, denoted by the random variable V IEW t,n A Z , .

Communication and 'hashing power'. The two ideal functionalities, which are accessible by the parties, model the communication between them and the way of calculating values of a hash function H ( ) : · { 0 1 , } ∗ →{ 0 1 , } κ concurrently.

The random oracle functionality. The random oracle (RO) provides two functions, a calculation and a verification function. Each party is given a number of q calculation queries and unlimited verification queries per round. Thus, an adversary with t corrupted parties may query the random oracle for t · q calculation queries per round. Upon receiving a calculation query with some value x by a party P i , the random oracle checks, whether x was already queried before. If not, the RO selects randomly y ∈ { 0 1 , } κ and returns it. Further, the RO maintains a table and adds the pair ( x, y ) into this table. If x was already

queried before, the RO searches in the table for the corresponding pair and returns the value y from it. It's easy to see that a verification query now only returns true/valid, if such a pair exists in the table of the RO. Note that the RO can maintain tables for different hash functions and can be used for all hash functions we need.

The diffuse functionality. The diffuse functionality models the communication between the parties and thus maintains a RECEIVE () string for each party P i . Note that this is not the same as the previously mentioned input tape. Each party can read the content of its RECEIVE () string at any time. The message delay is denoted by ∆ , where ∆ = 0 corresponds to a synchronous setting.

The diffuse functionality has a round variable, which is initially set to 1. Each party P i can send a message m , possibly empty, to the functionality, which then marks P i as complete for the current round. We allow A to read all the messages that are sent by some P i , without modifying, dropping or delaying it. When all parties and the adversary are marked as complete, the functionality writes all messages that are ∆ rounds old to the RECEIVE () strings of either only the alert or all parties. We denote by B a Boolean function that indicates exactly that; if B = 0 the diffuse functionality writes all messages to the RECEIVE () strings of the alert parties, while if B = 1 the diffuse functionality writes all messages to the RECEIVE () strings of all parties. Each party can read the received messages in the next round being alert. At the end, round is incremented.

Note that in the case where B = 1, if a party is asleep at a round, it automatically gets marked as complete for this round. Further, upon waking up, it can read all the messages that were written to its RECEIVE () string while it was asleep.

Successful queries. A query to the RO oracle is successful, if the returned value y &lt; T , where T is the difficulty parameter for the PoW function. The party, which have issued the query will then create a new valid block and may distribute it by the diffuse functionality. We denote the success probability of a single query by p = Pr y [ &lt; T ] = T 2 κ . Note that in Bitcoin, the difficulty parameter is adjusted such that the block generation time is approximately ten minutes.

## 2.2 Sleepy, Alert and Corrupted

For each round i , we have at most t corrupted and n honest,i = n -t honest parties. Furthermore, the number of honest parties are divided to alert and sleepy parties, n honest,i = n alert,i + n sleepy,i . We assume without loss of generality that no corrupted party is asleep, since we only upper-bound the power of the adversary. Since n alert,i and n sleepy,i are random variables, we can also use their expected value. The expected value is constant over different rounds, thus we will refer to them as E n [ alert ] and E n [ sleepy ]. Since each honest party is independently set to sleep with probability s and thus the random variable n sleepy,i is binomially

distributed with parameters ( n -t ) and s . Accordingly, n alert,i is also binomially distributed with parameters ( n -t ) and (1 -s ). Hence, E n [ sleepy ] = s · ( n -t ) and E n [ alert ] = (1 -s ) · ( n -t ).

## 2.3 Parametrized Model

Let M q,∆,B ( ) be the model, defined in this section. In the following sections, we will look at three instantiations of this model. First of all, we are going to analyze the model M q, ( 0 1), which corresponds to a synchronous setting, in which each , party has the ability to make q queries to the random oracle and receives every message, even if the party is asleep. Then, we extend these results to the bounded delay model, which corresponds to M (1 , ∆, 1). As before, every party will always receive messages, but we restrict q to be 1. In the last section, we analyze the model M q, ( 0 0), which corresponds to the synchronous model, but we do not , allow the diffuse functionality to write messages on the RECEIVE () tapes of sleepy parties.

## 2.4 Properties

In order to prove the security of the Bitcoin backbone protocol, we are going to analyze three different properties, following the analysis of [7]. These properties are defined as predicates over V IEW t,n A Z , , which will hold for all polynomially bounded environments Z and adversaries A with high probability.

Definition 1. Given a predicate Q and a bound q, t, n ∈ N with t &lt; n , we say that the Bitcoin backbone protocol satisfies the property Q in the model M q,∆,B ( ) for n parties, assuming the number of corruptions is bounded by t , provided that for all polynomial-time Z A , , the probability that Q V IEW ( t,n A Z , ) is false is negligible in κ .

The following two Definitions concern the liveness and eventual consistency properties of the Backbone protocol. We are using the notation of [7]: We denote a chain C , where the last k blocks are removed, by C /ceilingleft k . Further, C 1 /precedesequal C 2 denotes that C 1 is a prefix of C 2 .

Definition 2. The chain growth property Q cg with parameters τ ∈ R and s ∈ N states that for any honest party P with chain C in V IEW t,n A Z , , it holds that for any s +1 rounds, there are at least τ · s blocks added to the chain of P . 1

Definition 3. The common-prefix property Q cp with parameter k ∈ N states that for any pair of honest players P , P 1 2 adopting the chains C , C 1 2 at rounds r 1 ≤ r 2 in V IEW t,n A Z , respectively, it holds that C /ceilingleft k 1 /precedesequal C 2 .

1 The Chain-Growth Property in [7] is defined slightly different: . . . it holds that for any s rounds, there are at least τ · s blocks added to the chain of P . Considering the proof for Theorem 1 (of [2]), one can see, why we use s +1 instead of s . It follows by the fact that the sum in Lemma 13 (of [2]) only goes from i = r to s -1 and not to s .

In order to argue about the number of adversarial blocks in a chain, we will use the chain quality property, as defined below:

Definition 4. The chain quality property Q cq with parameters µ ∈ R and l ∈ N states that for any honest party P with chain C in V IEW t,n A Z , , it holds that for any /lscript consecutive blocks of C the ratio of adversarial blocks is at most µ .

The following two definitions formalize typical executions of the Backbone protocol. Both of them are related to the hash functions, used for implementing the Backbone Protocol. Further, the parameters /epsilon1 and η are introduced. Throughout the paper, /epsilon1 ∈ (0 , 1) refers to the quality of concentration of random variables in typical executions and η corresponds to the parameter, determining block to round translation.

Definition 5 ([7], Definition 8). An insertion occurs when, given a chain C with two consecutive blocks B and B ′ , a block B ∗ is such that B,B ,B ∗ ′ form three consecutive blocks of a valid chain. A copy occurs if the same block exists in two different positions. A prediction occurs when a block extends one which was computed at a later round.

Definition 6 ([7], Definition 9). (Typical execution). An execution is ( /epsilon1, η ) -typical if, for any set S of consecutive rounds with | S | ≥ ηκ and any random variable X S ( ) , the following holds:

- a) (1 -/epsilon1 ) E X S [ ( )] &lt; X S ( ) &lt; (1 + /epsilon1 ) E X S [ ( )]
- b) No insertions, no copies and no predictions occurred.

Lemma 1. An execution is typical with probability 1 -e -Ω κ ( ) .

Proof. To prove a), we can simply use a Chernoff bound by arguing that E X S [ ( )] is in Ω S ( | | ). The proof for b) is equivalent to [7], by reducing these events to a collision in one of the hash functions of the Bitcoin backbone protocol. Such collisions only happen with probability e -Ω κ ( ) . /intersectionsq /unionsq

## 3 The q -bounded Synchronous Model without Message Loss M q, ( 0 1) ,

In this section, we analyze the Bitcoin backbone protocol in the previously defined model, instantiated as M q, ( 0 1). This corresponds to the , q -bounded synchronous setting in [7]. First, we define the success probabilities for the alert and corrupted parties, which are used to prove the relations between them. At the end, we use these results to show the properties of chain growth, common prefix and chain quality.

Following the definition in [7], let a successful round be a round in which at least one honest party solves a PoW. The random variable X i indicates successful rounds i by setting X i = 1 and X i = 0 otherwise. Further, we denote for a set of rounds S : X S ( ) = ∑ i ∈ S X i . We note that if no party is asleep, we have E X [ i ] = Pr X [ i = 1] = 1 -(1 -p ) q n ( -t ) .

$$\text{Lemma $2$. $It holds that $\frac{pqE[n_{a1ert}]}{1+pqE[n_{a1ert}]} \leq E[X_{i}] \leq pqE[n_{a1ert}]$.}$$

Proof. By the definition of X i , we know that E X [ i ] = E [1 -(1 -p ) qn alert,i ]. Thus, the second inequality can easily be derived using Bernoulli. And for the first inequality holds:

$$\dots \cdots \cdots \cdots \cdots \cdots \cdots \\ E [ X _ { i } ] & = \sum _ { k = 0 } ^ { n - t } E [ X _ { i } | n _ { a l e r t, i } = k ] \cdot P r [ n _ { a l e r t, i } = k ] \\ & = \sum _ { k = 0 } ^ { n - t } \left ( 1 - ( 1 - p ) ^ { q k } \right ) \cdot \binom { n - t } { k } ( 1 - s ) ^ { k } s ^ { n - t - k } \\ & = 1 - \left ( s - ( s - 1 ) ( 1 - p ) ^ { q } \right ) ^ { n - t } \geq 1 - \left ( s - ( s - 1 ) ( 1 - p q ) \right ) ^ { n - t } \\ & \geq 1 - e ^ { - ( 1 - s ) ( n - t ) p q } = \frac { p q E [ n _ { a l e r t } ] } { 1 + p q E [ n _ { a l e r t } ] } \\ \bigoplus \\ \quad \text{We also adapt the notation of a unique successful round from [7]. A round} \\. \quad. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \. \........................................................................................................................................................................................................ \..................................................................................................................................................................................................... \. \................................................................................................................................................................................................... \... \...................................................................................................................................................................................................
....................................................................................................................................................................................................... .......................................................................................................................................................................................................
... \................................................................................................................................................................................................... ... ................................................................................................................................................................................................... ... \................................................................................................................................................................................................... \. ..................................................................................................................................................................................................... . .....................................................................................................................................................................................................
. \..................................................................................................................................................................................................... .
..................................................................................................................................................................................................... . \.....................................................................................................................................................................................................
.$$

We also adapt the notation of a unique successful round from [7]. A round is called a unique successful round, if exactly one honest party obtains a PoW. Accordingly to the successful rounds, let the random variable Y i indicates a unique successful round i with Y i = 1 and Y i = 0 otherwise. And for a set of rounds S , let Y ( S ) = ∑ i ∈ S Y i .

$$\text{Lemma $3$. $It holds $E[Y_{i}] = E[pqn_{alert,i}(1-p)^{q(n_{alefrt,i}-1)}] \geq E[X_{i}](1-E[X_{i}])$}.$$

Proof. To prove the required bounds, we need a few intermediary steps. Using Bernoulli, we can derive the following:

$$E [ Y _ { i } ] = E [ p q n _ { a l e r t, i } ( 1 - p ) ^ { q ( n _ { a l e r t, i } - 1 ) } ] \geq E [ p q n _ { a l e r t, i } ( 1 - p q ( n _ { a l e r t, i } - 1 ) ) ]$$

Then, we have to prove that pqE n [ alert ](1 -pqE n [ alert ]) ≥ E X [ i ](1 -E X [ i ]). From the upper bound on E X [ i ], we can derive E X [ i ] = pqE n [ alert ] -b , for b ≥ 0. Therefore:

$$E [ X _ { i } ] ( 1 - E [ X _ { i } ] ) & = ( p q E [ n _ { a l e r t } ] - b ) ( 1 - p q E [ n _ { a l e r t } ] + b ) \\ & = p q E [ n _ { a l e r t } ] ( 1 - p q E [ n _ { a l e r t } ] ) - b ^ { 2 } - b + 2 p q E [ n _ { a l e r t } ] b$$

In order to prove the required bound, it must hold that 0 ≥ -b 2 -b + 2 pqE n [ alert ] b , which is equivalent to 1 ≥ E X [ i ] + pqE n [ alert ] and holds by the fact that 2 E X [ i ] ≤ 1. This is also required by the proof in [7], but not stated explicitly. Since in Bitcoin, E X [ i ] is between 2% -3%, the inequality can be justified.

To conclude the proof, we just have to prove the following:

$$E [ p q n _ { a l e r t, i } ( 1 - p q ( n _ { a l e r t, i } - 1 ) ) ] & \quad \geq p q E [ n _ { a l e r t } ] - ( p q ) ^ { 2 } E [ n _ { a l e r t } ] ^ { 2 } \\ \leftarrow & E [ n _ { a l e r t } ^ { 2 } ] - E [ n _ { a l e r t } ] & \quad \leq E [ n _ { a l e r t } ] ^ { 2 }$$

Which is equivalent to V ar n [ alert ] ≤ E n [ alert ] and holds for the binomial distribution. /intersectionsq /unionsq

Let the random variable Z ijk = 1 if the adversary obtains a PoW at round i by the j th query of the k th corrupted party. Otherwise, we set Z ijk = 0. Summing up, gives us Z i = ∑ t k =1 ∑ q j =1 Z ijk and Z S ( ) = ∑ i ∈ S Z i . Then, the expected number of blocks that the adversary can mine in one round i is:

$$E [ Z _ { i } ] = q p t = \frac { t } { E [ n _ { a l e r t } ] } p q E [ n _ { a l e r t } ] \leq \frac { t } { E [ n _ { a l e r t } ] } \cdot \frac { E [ X _ { i } ] } { 1 - E [ X _ { i } ] }$$

## 3.1 Temporary Dishonest Majority Assumption

We assume the honest majority assumption holds on expectation. In particular, for each round the following holds: t ≤ c · (1 -δ ) · E n [ alert ], where δ ≥ 2 E X [ i ] +2 /epsilon1 and c ∈ [0 , 1] is a constant. As in [7], δ refers to the advantage of the honest parties and /epsilon1 is defined in Definition 6.

From the expected honest majority assumption, we can derive a possible upper bound for s , depending on t, δ and c . Formally,

$$s \leq \frac { n - t - \frac { t } { c ( 1 - \delta ) } } { n - t } = 1 - \frac { 1 } { c ( 1 - \delta ) } \frac { t } { n - t }$$

## 3.2 Security Analysis

First of all, by Definition 6 the properties of the typical execution hold for the random variables X S ,Y ( ) ( S , Z ) ( S ), assuming | S | ≥ ηκ .

The following lemma shows the relations between the different expected values. The bounds are required in all proofs of the three properties and therefore essential. 2

Lemma 4. The following hold for any set S of at least ηκ consecutive rounds in a typical execution.

$$\begin{array} { l l } a ) & ( 1 - \epsilon ) E [ X _ { i } ] | S | < X ( S ) < ( 1 + \epsilon ) E [ X _ { i } ] | S | \\ b ) & ( 1 - \epsilon ) E [ X _ { i } ] ( 1 - E [ X _ { i } ] ) | S | < Y ( S ) \\ c ) & Z ( S ) < ( 1 + \epsilon ) \frac { t } { E [ n _ { a l e r t } ] } \frac { E [ X _ { i } ] } { 1 - E [ X _ { i } ] } | S | \leq c ( 1 + \epsilon ) ( 1 - \delta ) \frac { E [ X _ { i } ] } { 1 - E [ X _ { i } ] } | S | \end{array}$$

2 The statement d) uses different factors as [7]. The problem is, that it's even not possible to prove the bounds from [7] with their theorems, lemmas and assumptions.

$$d ) \ F o r \, \sigma = ( 1 - \epsilon ) ( 1 - E [ X _ { i } ] ) \colon$$

$$Z ( S ) < \left ( 1 + \frac { \delta } { \sigma } \right ) \frac { t } { E [ n _ { a l e r t } ] } X ( S ) \leq c \left ( 1 - \frac { \delta ^ { 2 } } { 2 \sigma } \right ) X ( S )$$

$$e \rangle \ Z ( S ) < Y ( S )$$

Next, we prove Bitcoin is secure under temporary dishonest majority in the q -bounded synchronous setting by proving the three properties defined in [7]: chain growth , common prefix and chain quality . The proofs can be found in the full version.

## 4 The semi-Synchronous Model without Message Loss M ,∆, (1 1)

In this section, we extend the previously seen results to the semi-synchronous (bounded delay) model. This means, that we allow ∆ 3 delays for the messages, as described in the Definition of our model. In order to realize the proofs, we have to restrict q to be 1. And as in the last section, we do not assume message losses.

Due the introduced network delays, we need to redefine unique successful rounds, because they do not provide the same guarantees in the this model. Especially, Lemma 15 (of [2]) will not hold in the new model. Therefore, we will introduce two new random variables, one for successful and one for unique successful rounds in the bounded delay model. Note, that the chances for the adversary do not change and we can use the bounds from the synchronous model.

Let the random variable X ′ i be defined such that for each round i , X ′ i = 1, if X i = 1 and X j = 0, ∀ j ∈ { i -∆ +1 , . . . , i - } 1 . A round i is called ∆ -isolated successful round, if X ′ i = 1. Further, let X S ′ ( ) = ∑ i ∈ S X ′ i . Using Bernoulli, we can derive the following bound on E X [ ′ i ]:

$$E [ X _ { i } ^ { \prime } ] = E [ X _ { i } ] ( 1 - E [ X _ { i } ] ) ^ { \Delta - 1 } \geq E [ X _ { i } ] ( 1 - ( \Delta - 1 ) E [ X _ { i } ] ).$$

In order to prove eventual consistency, we have to rely on stronger events than just uniquely successful rounds. In [7], this is achieved by defining the random variable Y ′ i such that for each round i , Y ′ i = 1, if Y i = 1 and X j = 0, ∀ j ∈ { -i ∆ +1 , . . . , i -1 , i +1 , . . . , i + ∆ - } 1 . Then, a round i is called ∆ -isolated unique successful round, if Y ′ i = 1. Further, let Y ′ ( S ) = ∑ i ∈ S Y ′ i . As before, we can lower bound E Y [ ′ i ] using Bernoulli:

$$E [ Y _ { i } ^ { \prime } ] = E [ X _ { i } ] ( 1 - E [ X _ { i } ] ) ^ { 2 \Delta - 1 } \geq E [ X _ { i } ] ( 1 - ( 2 \Delta - 1 ) E [ X _ { i } ] ).$$

3 According to Theorem 11 of [12], the parameter ∆ has to be known by the honest parties to achieve state machine replication, e.g. achieving consensus.

## 4.1 Temporary Dishonest Majority Assumption

We assume again honest majority on expectation, such that for each round t ≤ c · (1 -δ ) · E n [ alert ], where δ ≥ 2 ∆E X [ i ] + 4 /epsilon1 + 4 ∆ ηκ and c ∈ [0 , 1] is a constant. 4 The reason for the higher value of δ (compared to the synchronous model) is that E Y [ ′ i ] ≤ E Y [ i ] and we need a way to compensate this difference.

## 4.2 Security Analysis

In this subsection, we prove Bitcoin is secure, i.e. the chain growth, common prefix and chain quality properties hold, for the semi-synchronous model without message loss. We note that the properties of the typical execution apply to the predefined random variables ( X S ,Y ′ ( ) ′ ( S , Z ) ( S )), given that | S | ≥ ηκ .

The following lemma corresponds to the semi-synchronous version of Lemma 4. Most of the relations follow the same structure and are similar to prove as in the synchronous model.

Lemma 5. The following hold for any set S of at least ηκ consecutive rounds in a typical execution.

- a) (1 -/epsilon1 ) E X [ i ](1 -E X [ i ]) ∆ -1 | S | &lt; X ′ ( S )
- b) (1 -/epsilon1 ) E X [ i ](1 -E X [ i ]) 2 ∆ -1 | S | &lt; Y ′ ( S )
- c) Z S ( ) &lt; (1 + /epsilon1 ) t E n [ alert ] E X [ i ] 1 -E X [ i ] | S | ≤ c (1 + /epsilon1 )(1 -δ ) E X [ i ] 1 -E X [ i ] | S |

d)

Let

S

′

=

{

r, . . . , r

′

}

with

|

S

′

|

≥

ηκ

.

For

S

=

{

r, . . . , r

+

(1

-

/epsilon1

)(1

-

E X

[

i

])

∆

:

$$Z ( S ) < \left ( 1 + \frac { \delta } { 2 \sigma ^ { \prime } } \right ) \frac { t } { E [ n _ { a l e r t } ] } X ^ { \prime } ( S ^ { \prime } )$$

e) Let S ′ = { r, . . . , r ′ } with | S ′ | ≥ ηκ . For S = { r -∆,.. . , r ′ + ∆ } :

$$& \mathfrak { s } ) < \left ( 1 + \frac { \delta } { 2 \sigma ^ { \prime } } \right ) \frac { t } { E [ n _ { a l e r t } ] } X ^ { \prime } ( S ^ { \prime } ) \\ & \mathfrak { s } | S ^ { \prime } | \geq \eta \kappa. \ F o r \, S = \{ r - \Delta, \dots, r ^ { \prime } \rightharpoonup \\ & \quad Z ( S ) < Y ^ { \prime } ( S ^ { \prime } )$$

The proof of Lemma 5 as well as the proofs of the security properties can be found in the full version.

## 5 The q -bounded Synchronous Model with Message Loss M q, ( 0 0) ,

As in the synchronous case, we do not restrict the number of queries and assume no message delays. In the previous sections, we assumed that messages, sent from the diffusion functionality, will be written on the RECEIVE () string of each party. However, in this section, we assume that the messages only get

4 One might notice that our lower bound of δ differs from the lower bound from [7]. First of all, they provided two different values for δ , where both of them are wrong in the sense that they are too small in order to prove the needed bounds.

′

′

∆

}

and

σ

=

written to the RECEIVE () strings of alert parties, i.e. sleepy parties do not receive messages. This models the worst possible event of the reality, because in Bitcoin itself, parties that were offline will check on the currently longest chain, once they get back online. This model captures the effects if none of them receives one of the currently longest chains, thus are eventually a victim of an eclipse attack. This implies that it's not necessarily true that all parties' local chains have the same length.

This change to the model leads to major differences compared to the results from the previous sections. In this case, unique successful rounds doesn't provide the same guarantees as before, especially Lemma 15 (of [2]) doesn't hold any more.

In the following, we denote by C i the set of chains containing all longest chains that exist at round i . Further, we refer to the local chain of player P j at round i by L j i .

The following lemma shows the expected number of honest players, which have adopted one of the longest chains existing at the current round.

Lemma 6. At every round i , there are expected E n [ alert ] = (1 -s )( n -t ) parties j , such that L j i ∈ C i .

Proof. We will prove the lemma by induction over all rounds of an execution. The base case is trivial, because at round 1, every party starts with the genesis block. Now for the step case, assume that the lemma holds at round i . Then we show that it holds at round i +1 too. In order to prove this, we perform a case distinction:

- -Case X i = 0: No new chains will be diffused, therefore no new chains can be adopted and we can apply the induction hypothesis.
- -Case Z i = 0: Analogue to the previous case.
- -Case X i = 1: (But Y i = 0) Now we have to differentiate, if the new blocks extend some chain in C i not:
- a) Some longest chain is extended:
- Every party, which is not asleep at round i will adopt one of the possibly multiple resulting new longest chains. Thus, there are expected E n [ alert ] alert parties which will have adopted one of the longest chains at round i +1.
- b) No longest chain is extended: No honest party, whose local chain is already one of the currently longest chain will adopt a new chain, since it's length will not be larger than the length of its local chain. Thus, we can apply the induction hypothesis.
- -Case Y i = 1: As in the case before, every party, which was alert at round i , will adopt the resulting chain, if its length is larger than the length of its local chain. As before, there are E n [ alert ] alert parties which will have adopted one of the longest chains at round i +1.
- -Case Z i = 1: Analogue to the previous case. But if the adversary withholds the found block, the case Z i = 0 applies and at the round, where it diffuses this block, this case applies. /intersectionsq /unionsq

By the lemma above, at every round i only expected (1 -s )( n -t ) parties j have a local chain L j i ∈ C i . And a fraction of (1 -s ) of them will again be sleepy in the following rounds. Therefore, let n ∗ alert,i denote the number of alert parties j at round i , where L j i ∈ C i .

$$\text{Lemma} \ 7. \ I t \ h o l d s \ t h a t \ \frac { \ p q E [ n _ { a l e r t } ^ { * } ] } { 1 + p q E [ n _ { a l e r t } ^ { * } ] } \leq E [ X _ { i } ^ { * } ] \leq p q E [ n _ { a l e r t } ^ { * } ].$$

It's easy to see that n ∗ alert,i is binomially distributed with parameters ( n -t ) and (1 -s ) 2 . Let E n [ ∗ alert ] = (1 -s ) 2 ( n -t ) denote the expected value of n ∗ alert,i , omitting the round index i , since the expected value is equal for all rounds. We define the random variable X ∗ i which indicates, if at least one of the n ∗ alert,i parties solves a PoW at round i . Thus, we set X ∗ i = 1, if some honest party j with L j i ∈ C i solves a PoW at round i and X ∗ i = 0 otherwise. Further, we define for a set of rounds S: X ∗ ( S ) = ∑ i ∈ S X ∗ i .

Proof. The lemma can be proven using the same argumentation as in the proof for the Lemma 2. /intersectionsq /unionsq

Accordingly, let Y ∗ i denote the random variable with Y ∗ i = 1, if exactly one honest party j solves a PoW at round i and L j i ∈ C i . Note that the resulting chain, will be the only longest chain. Further, for a set of rounds S let Y ∗ ( S ) = ∑ i ∈ S Y ∗ i .

$$\text{Lemma } 8. \ I t h o l d s \, E [ Y _ { i } ^ { * } ] = E [ p q n _ { a l e r t, i } ^ { * } ( 1 - p ) ^ { q ( n _ { a l e r t, i } ^ { * } - 1 ) } ] \geq E [ X _ { i } ^ { * } ] ( 1 - E [ X _ { i } ^ { * } ] ).$$

Proof. The proof follows the exactly same steps as the proof for Lemma 3. /intersectionsq /unionsq

## 5.1 Temporary Dishonest Majority Assumption

In this setting, the honest majority assumption changes slightly. We cannot simply assume that t is smaller than some fraction of E n [ ∗ alert ], because we have also to consider parties j with L j i / C ∈ i . We assume that for each round holds t + (1 -s E n ) [ sleepy ] ≤ c · (1 -δ ) · E n [ ∗ alert ], where δ ≥ 3 /epsilon1 + 2 E X [ ∗ i ] and some constant c ∈ [0 , 1]. Note that (1 -s E n ) [ sleepy ] is the fraction of alert parties, working on shorter chains.

In order to compute the upper bound for s , we reformulate the honest majority assumption. Using the quadratic formula, this results in the following:

$$s \leq \frac { 2 c ( 1 - \delta ) - \sqrt { 1 + 4 ( 1 + c ( 1 - \delta ) \frac { t } { n - t } ) } } { 2 ( 1 + c ( 1 - \delta ) ) }$$

In the model description, we specified that the adversary is not informed if a party P i is set to sleep, after sending an instruction ( sleep , P i ) to the control program C . This assumption is realistic since the adversary can not be certain about the success of his attempt to create a crash-failure. Further, allowing the adversary to know when he successfully set to sleep a node makes him quite powerful. Specifically, in our model we have a fraction of 1 -s alert

parties. Subtracting the parties, which are working on a longest chain, from the (1 -s )( n -t ) parties, leaves us an expected fraction of s (1 -s ) parties, which can be found on the left hand side of the honest majority assumption. If we would assume that the adversary knows, which parties are asleep at each round, we would have to change the temporary dishonest majority assumption to t + E n [ sleepy ] ≤ c · (1 -δ ) · E n [ ∗ alert ]. Then, the adversary could exploit this knowledge to his advantage and send sleep instructions to the parties working on the longest chains. To capture this adversarial behavior a different model would be necessary (since s cannot be considered constant).

## 5.2 Security Analysis

For this section, we note that the properties of an typical execution apply for the random variables X ∗ ( S , Y ) ∗ ( S ) and Z S ( ), given that | S | ≥ ηκ .

Lemma 9. Suppose that at round r , the chains in C i have size l . Then by round s ≥ r , an expected number of E n [ alert ] = (1 -s )( n -t ) parties will have adapted a chain of length at least l + ∑ s -1 i = r X ∗ i .

Proof. By Lemma 6, for every round i , the expected number of parties j with L j i ∈ C i is E n [ alert ]. Therefore, we only have to count the number of times, when one of these longest chains gets extended. /intersectionsq /unionsq

In the following, we define a new variable φ and provide an upper bound for it. This is required for the proof of the common prefix property. Although the proven bound is not tight, it is sufficient for proving the desired properties.

Lemma 10. The probability that the honest parties j with L j i / C ∈ i can create a new chain C ′ ∈ C r for some round r ≥ i , before any chain from C i gets extended is denoted by φ . It holds that:

$$\phi \leq \frac { s } { 1 - s }$$

Proof. Without loss of generality, we may assume that all parties j with L j i / C ∈ i have the same local chain. Further, we can assume that this chain is just one block shorter than the currently longest chain. Thus, we search an upper bound for the probability that the parties { P j } L /C j i ∈ i are faster in solving two PoW's than the parties { P j } L j i ∈ C i solving one PoW.

In order to prove that, we have to introduce a new random variable ˜ , X i with ˜ X i = 1 if some honest party j with L j i / C ∈ i solves a PoW. By the same argumentation as in Lemma 2, we can argue that pq (1 -s E n ) [ sleepy ] 1+ pq (1 -s E n ) [ sleepy ] ≤ E X [ ˜ ] i ≤ pq (1 -s E n ) [ sleepy ]. Therefore, the upper bound on the required probability is:

$$\sum _ { k = 2 } ^ { \infty } ( k - 1 ) E [ \tilde { X } _ { i } ] ^ { 2 } ( 1 - E [ \tilde { X } _ { i } ] ) ^ { k - 2 } ( 1 - E [ X _ { i } ^ { * } ] ) ^ { k }$$

$$= & \frac { E [ \tilde { X } _ { i } ] ^ { 2 } } { ( 1 - E [ \tilde { X } _ { i } ] ) ^ { 2 } } \cdot \sum _ { k = 2 } ^ { \infty } ( k - 1 ) \left ( ( 1 - E [ \tilde { X } _ { i } ] ) ( 1 - E [ X _ { i } ^ { * } ] ) \right ) ^ { k } \\ = & \frac { E [ \tilde { X } _ { i } ] ^ { 2 } ( 1 - E [ X _ { i } ^ { * } ] ) ^ { 2 } } { ( E [ \tilde { X } _ { i } ] + E [ X _ { i } ^ { * } ] - E [ \tilde { X } _ { i } ] E [ X _ { i } ^ { * } ] ) ^ { 2 } } \\ \vdots \quad. \quad \nu \quad \partial _ { \nu } \quad \partial _ { \nu } \quad \nu \quad \partial _ { \nu } \quad \nu \quad.$$

Now, let a := pq (1 -s ) 2 ( n -t ) = pqE n [ ∗ alert ] and b := pqs (1 -s )( n -t ) = pq (1 -s E n ) [ sleepy ]. Then by the Definition of E X [ ˜ ] and i E X [ ∗ i ] holds:

$$\frac { E [ \tilde { X } _ { i } ] ^ { 2 } ( 1 - E [ X _ { i } ^ { * } ] ) ^ { 2 } } { ( E [ \tilde { X } _ { i } ] + E [ X _ { i } ^ { * } ] - E [ \tilde { X } _ { i } ] E [ X _ { i } ^ { * } ] ) ^ { 2 } } = & \frac { b ^ { 2 } } { ( 1 + a ) ^ { 2 } ( 1 - a b ) ^ { 2 } ( a + a b + b ) ^ { 2 } }$$

Thus, φ ≤ s 1 -s is equivalent to:

$$& \frac { b ^ { 2 } } { ( 1 + a ) ^ { 2 } ( 1 - a b ) ^ { 2 } ( a + a b + b ) ^ { 2 } } \leq \frac { s } { 1 - s } \\ & \Leftrightarrow a b \leq ( 1 + a ) ^ { 2 } ( 1 - a b ) ^ { 2 } ( a + a b + b ) ^ { 2 }$$

The inequality holds, since (1 + a ) 2 (1 -ab ) 2 ≥ 1 and ab ≤ ( a + ab + ) . b 2 /intersectionsq /unionsq

The lemma below replaces Lemma 15 (of [2]). The possibility to have chains of different length at the same round offers various ways to replace a block from round i , where Y ∗ i = 1. Thus, we cannot use the same arguments as in Lemma 15 (of [2]).

Lemma 11. Suppose the k th block B of a chain C was computed at round i , where Y ∗ i = 1 . Then with probability at least 1 -φ , the k th block in a chain C ′ will be B or requires at least one adversarial block to replace B .

As in the previous sections, the properties of the typical execution hold and executions are typical with high probability, by Lemma 1.

Since we allow message losses in this model, we require more unique successful rounds than in other models. This leads to a different bound in part e) of the following lemma.

Lemma 12. The following hold for any set S of at least ηκ consecutive rounds in a typical execution.

$$a ) & \ ( 1 - \epsilon ) E [ X _ { i } ^ { * } ] | S | < X ^ { * } ( S ) \\ b ) & \ ( 1 - \epsilon ) E [ X _ { i } ^ { * } ] ( 1 - E [ X _ { i } ^ { * } ] ) | S | < Y ^ { * } ( S ) \\ c ) & Z ( S ) < ( 1 + \epsilon ) \frac { t } { E [ n _ { a l e r t } ^ { * } ] } \frac { E [ X _ { i } ^ { * } ] } { 1 - E [ X _ { i } ^ { * } ] } | S | < ( 1 + \epsilon ) ( c ( 1 - \delta ) - \frac { s } { 1 - s } ) \frac { E [ X _ { i } ^ { * } ] } { 1 - E [ X _ { i } ^ { * } ] } | S | \\ d ) & F o r \, \sigma ^ { * } = ( 1 - \epsilon ) ( 1 - E [ X _ { i } ^ { * } ] ) \colon$$

$$Z ( S ) < \left ( 1 + \frac { \delta } { \sigma ^ { * } } \right ) \frac { t } { E [ n _ { a l e r t } ^ { * } ] } X ^ { * } ( S ) \leq c \left ( 1 - \frac { \delta ^ { 2 } } { 2 \sigma ^ { * } } \right ) X ^ { * } ( S )$$

$$Z ( S ) < Y ^ { * } ( S ) ( 1 - \epsilon ) ( 1 - \phi )$$

Next, we prove Bitcoin is secure in the synchronous model with message loss. The proof can be found in the full version.

## 6 Security Analysis Results

As a result of the temporary dishonest majority assumptions, we have derived upper bounds for the probability s as shown in Figure 6. Therefore, we fixed c = 0 5 to limit the advantage of an adversary, following a Selfish Mining strategy. . Further, we have chosen for all three models /epsilon1 = 0 005. For the synchronous . model without message losses, we set E X [ i ] = 0 03, which results in . δ = 0 07 . . 5 For the Semi-Synchronous model, we set also E X [ i ] = 0 03, resulting in . E X [ ′ i ] = 0 022. For . ∆ = 10, we then get δ = 0 46. And for the synchronous model with . message losses, we have chosen E X [ ∗ i ] = 0 03, which results in . δ = 0 075. .

Fig. 1. This figure shows the upper bound on the fraction of sleepy parties, depending on the fraction of corrupted parties.

![image](https://ac.marcodsn.me/arxiv-markdown-images/1908.00427v1-figure-ecff7b69-efa0-493d-9133-e44c13307fe2.jpg)

One might be wondering how we could allow such high values for s . We have fixed E X [ i ], respectively E X [ ∗ i ], for our calculations. We can do this without loss of generality, since these expected values are dependent on p , which depends on the difficulty parameter T . The adjustment of T , used to regulate the block generation rate, depends on the fraction of sleepy parties, because they do not provide computational power (e.g. new blocks) to the blockchain.

These results are also consistent with the results from [4], where the upper bound on the adversarial fraction is stated at 49 1%. If we set . c = 1 and s = 0, due the value of δ , we get an maximal possible adversarial fraction of 48 5%. .

5 Note that δ is dependent on E X [ i ], which is again dependent on s . If we would remove this dependency, the results would be at most 2% better than the actual results shown in Figure 6.

## 7 Related Work

To model temporary dishonest majority in Bitcoin we used an idea, originally introduced by Pass and Shi [12]. In this work, they introduced the notion of sleepy nodes, i.e. nodes that go offline during the execution of the protocol, and presented a provably secure consensus protocol. In this paper, we model the dynamic nature of the system by additionally allowing the adversary to set parties to sleep, thus enabling temporary dishonest majority.

Bitcoin has been studied from various aspects and multiple attacks have been proposed, concerning the network layer [8,11,1] as well as the consensus algorithm (mining attacks) [6,13,5,9]. The most famous mining attack is selfish mining [6], where a selfish miner can withhold blocks and gain disproportionate revenue compared to his mining power. The chain quality property, originally introduced in [7], encapsulates this ratio between the mining power and the final percentage of blocks, and thus rewards, the adversary owns. On the other hand, Heilman et al. [8] examined eclipse attacks on the Bitcoin's peer-to-peer network. In turn, Nayak et al. [11] presented a novel attack combining selfish mining and eclipse attacks. They showed that in some adversarial strategies the victims of an eclipse attack can actually benefit from being eclipsed. Our last model, where offline parties do not get the update messages, captures this attack.

## 8 Conclusion &amp; Future Work

In this paper, we prove Bitcoin is secure under temporary dishonest majority. Specifically, we extended the framework of Garay et al. [7] to incorporate offline nodes and allow the adversary to introduce crush failures. This way we can relax the honest majority assumption and allow temporary dishonest majority. We prove Bitcoin' s security by showing that under an expected honest majority assumption the following security properties hold: chain growth, common prefix and chain quality.

We examine three models: the synchronous model, the bounded delay model and the synchronous model with message loss. The first two models result in similar bounds regarding the fractions of corrupted and sleepy parties. In contrast, the last model that allows message losses when a party goes offline is less resilient to sleepy behavior. This is expected since this model captures the nature of eclipse attacks where the adversary can hide part of the network form an honest party and either waste or use to his advantage the honest party's mining power. We illustrate in Figure 6 the upper bounds on the fraction of sleepy parties depending on the fraction of corrupted parties for all three models.

For future work, we did not consider the bounded delay with message loss model. We expect the difference on the results from synchronous to bounded delay model to be similar to the model without message loss. Another interesting future direction is to consider a more powerful adversary, who knows whether his attempt to set a party to sleep is successful or not.

## 9 Acknowledgments

We thank Dionysis Zindros for the helpful and productive discussions. Y. W. is partially supported by X-Order Lab.

## References

- 1. Apostolaki, M., Zohar, A., Vanbever, L.: Hijacking bitcoin: Routing attacks on cryptocurrencies. In: 2017 IEEE Symposium on Security and Privacy, SP 2017, San Jose, CA, USA, May 22-26, 2017. pp. 375-392 (2017)
- 2. Avarikioti, G., K¨ appeli, L., Wang, Y., Wattenhofer, R.: Bitcoin Security under Temporary Dishonest Majority (2019)
- 3. Bonneau, J.: Hostile blockchain takeovers (short paper). In: Bitcoin18: Proceedings of the 5th Workshop on Bitcoin and Blockchain Research (2018)
- 4. Decker, C., Wattenhofer, R.: Information propagation in the bitcoin network. In: IEEE P2P 2013 Proceedings (Sep 2013)
- 5. Eyal, I.: The miner's dilemma. In: 2015 IEEE Symposium on Security and Privacy, SP 2015, San Jose, CA, USA, May 17-21, 2015. pp. 89-103 (2015)
- 6. Eyal, I., Sirer, E.G.: Majority is not enough: Bitcoin mining is vulnerable. In: Commun. ACM (Nov 2013)
- 7. Garay, J.A., Kiayias, A., Leonardos, N.: The bitcoin backbone protocol: Analysis and applications. In: Advances in Cryptology - EUROCRYPT 2015 - 34th Annual International Conference on the Theory and Applications of Cryptographic Techniques, Sofia, Bulgaria, April 26-30, 2015, Proceedings, Part II. pp. 281-310 (2015)
- 8. Heilman, E., Kendler, A., Zohar, A., Goldberg, S.: Eclipse attacks on bitcoin's peer-to-peer network. In: Proceedings of the 24th USENIX Conference on Security Symposium. pp. 129-144. SEC'15, USENIX Association, Berkeley, CA, USA (2015)
- 9. Kwon, Y., Kim, D., Son, Y., Vasserman, E.Y., Kim, Y.: Be selfish and avoid dilemmas: Fork after withholding (FAW) attacks on bitcoin. In: Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, CCS 2017, Dallas, TX, USA, October 30 - November 03, 2017. pp. 195-209 (2017)
- 10. Nakamoto, S.: Bitcoin: A peer-to-peer electronic cash system. In: https://bitcoin.org/bitcoin.pdf (Oct 2008)
- 11. Nayak, K., Kumar, S., Miller, A., Shi, E.: Stubborn mining: Generalizing selfish mining and combining with an eclipse attack. 2016 IEEE European Symposium on Security and Privacy (EuroS&amp;P) pp. 305-320 (2015)
- 12. Pass, R., Shi, E.: The sleepy model of consensus. In: Takagi, T., Peyrin, T. (eds.) Advances in Cryptology - ASIACRYPT 2017. pp. 380-409. Springer International Publishing, Cham (2017)
- 13. Sapirshtein, A., Sompolinsky, Y., Zohar, A.: Optimal selfish mining strategies in bitcoin. In: Financial Cryptography and Data Security - 20th International Conference, FC 2016, Christ Church, Barbados, February 22-26, 2016, Revised Selected Papers. pp. 515-532 (2016)
- 14. Singh, A., Ngan, T.W.J., Druschel, P., Wallach, D.S.: Eclipse attacks on overlay networks: Threats and defenses. In: IEEE Infocom 2006 (Apr 2006)
- 15. Sit, E., Morris, R.: Security considerations for peer-to-peer distributed hash tables. In: Springer, pp. 261269 (Oct 2002)
Georgia Avarikioti Lukas Kaeppeli Yuyi Wang Roger Wattenhofer
Bitcoin Security under Temporary Dishonest Majority
We prove Bitcoin is secure under temporary dishonest majority. We assume the
adversary can corrupt a specific fraction of parties and also introduce crash
failures, i.e., some honest participants are offline during the execution of
the protocol. We demand a majority of honest online participants on
expectation. We explore three different models and present the requirements for
proving Bitcoin's security in all of them: we first examine a synchronous
model, then extend to a bounded delay model and last we consider a synchronous
model that allows message losses.