On the Security and Performance of Proof of Work Blockchains
Name -Nilanjan Das
Paderborn University – Computer Science
1.Arrangement of Contents:
3.Background4.Framework of the Study
5. Evaluated Result
In this paper author has tried to put a trade-off between security provision and performance of different POW based block chain. For this a simulator is designed which can capture the real world constrained like network propagation, different block size, block generation interval. Author has also devised optimal adversarial strategies for double spending and selfish mining. Since it’s invent in 2009 Bitcoin’s blockchain has been a revolution for solving complex problems. Be it money transaction, healthcare to keeping legal documents blockchain can be used for all these cases. Although several consensus protocols like proof of Stake, Proof of Elapsed time have been proposed most existing blockchain uses computationally expansive Proof of Work(POW) consensus mechanism. Consensus rules are some specific set of rules which all the nodes in the network must follow while validating a transaction. This POW mechanism is currently used by 90% of existing digital cryptocurrencies. Recent research hint that performance of a blockchain cannot be increased without compromising the securities. However, the relationship between performance and security provision of different POW based blockchain is not studied in much detail. In this study author is trying to focus on this topic.
Summary of Findings:
Selfish mining is not always a rational strategy. To capture rational adversaries double spending resilience is quantified and different POW blockchains are compared with respect to different transactions per second.
Bitcoin is more secure than Ethereum. 6 Bitcoin block confirmation equals to 37 Ethereum block confirmation.
Increase in block reward is proportional to it’s resilience against double spending.
Pow blockchain can attain a throughput above 60 transactions per second without sacrificing its existing security level.
Here all the terms and concepts necessary to understand this study is discussed.
2.1What is block chain?
According to Don ; Alex Tapscott, authors Blockchain Revolution (2016), a blockchain is a digital ledger which no one can corrupt. It can also be programmed to record not just financial transaction but virtually everything with value.
Each block of this chain stores the hash value of next block. It is shown in Figure1. The initial block is called genesis block.
To understand the objective of blockchain a use case is described below.
2.1.1 Use case of Blockchain: First one should understand how third-party banking transaction system works. If a person A wants to transfer money to B. A orders the third party banking system to transfer to B. The trusted third party identify B and its bank account. Then it moves the money to B after taking some fee from it. This typically takes around 3 days or more for international transaction. What blockchain is trying to do is to make that transaction without the trusted third party. Secondly blockchain tries to do this transaction faster. Third to do it cheaper than the existing banking transaction. Let’s dive into how blockchain addresses the money transfer problem.
The first Concept—-
Figure-2 Open Ledger
1.Open Ledger: Figure 2 is an example to illustrate the concept. These are four people namely A,B,C,D actually wants to move the money from one another. Let’s assume at genesis A has $10. Now let’s see the concept of open ledger and how it is implemented in the blockchain. We are going to add a transaction A->B $5 and we are going to link it already existing transaction. Let’s assume B moves to D $3. This transaction is also added into the ledger. Finally, if D moves $1 to C and it is added to ledger. So, this is the concept of open ledger and it is a chain of transaction. This is one of the reason it is called blockchain. This picture is a chain of transaction that is open and public to everyone. What it gives us everyone in the network can see where the money is, how much money each one has in his pocket and everyone can decide whether a transaction is valid or not. For example, if A now attempts to move $15 to C, everyone in the network can see it is not a valid transaction because A do not have $15 and this transaction is not added to open ledger.
Figure-3: Distributed Ledger
2. Distributed Ledger: The main goal of blockchain is to get rid of this centralized ledger. Here comes the second principle, distributed ledger. That means blockchain takes centralized ledger and distribute it across network. Now all the elements in the network holds a ledger individually. Figure 3 describes it. However, this creates another problem. Various copies of the same ledger are in the network. So, blockchain need to make sure all these copies are synchronized, and all the participant see the same version of ledger.
Figure 4: Miners and Ledger Synchronization
3. Miners and Synchronizing the ledger: In Figure 4 let’s say B wants to move $5 to C. B is publishing and broadcasting this intended transaction to the network. Every element in the network will see B wants to move $5 to C. It is an unvalidated transaction. It is not part of the ledger. In order to get into ledger let’s look how miner works. Miners are special node which can hold the ledger. In this case let’s say D and A are miners. Miners are going to do the following things. Miners are going to compete among themselves who will be the first to take the transaction and validate it and put it into the ledger. The first miner to do so gets the financial reward. Let’s understand what it means to win the competition. A miner need to do two things. First it need to validate a transaction. This is easy as ledger is open, and miner can immediately calculate whether B has necessary fund to make transaction. The second thing miner needs to do is to find a special key that will enable this miner to take the previous transaction and lock the new transaction. In order to find this key miner needs to invest the computational power and time because search for this key is random. The miner is repeatedly gassing for the keys until it finds this first key which match this kind of random puzzle. The first miner to do that gets the financial benefit. Let’s say D a miner was able to solve this puzzle and add it to it’s own ledger. Now D will publish the solution to entire network. This means everyone in the ledger is enable to add this transaction to it’s own ledger. Now what the other miner will do?. As this problem is already solved there is no point for the other miner to solve this problem again. Miner A will immediately take this transaction and add it to the ledger. It will look to work on another transaction and hopefully get the reward next time.
Some Other Important Terms necessary for this study:
Figure 5: Stale Block (Blue Blocks)
2.2 Stale Block: At any given moment, the longest chain of blocks is the valid one. It is the one most miners are working on. Some miner may fork of a blockchain sidechain at any moment, but within seconds the main chain will overtake it in length, as mainchain has more hash power and the side chain will be disregarded.
Miners are using their computational power to solve a blockchain puzzle. If a particular miner solves a puzzle and broadcast, it in the network all the other miners which was working on that particular block should stop working on it.
If a miner continues to work on the already discovered block, it is considered working on a “stale block” since it is now old and no longer eligible for mining rewards. In Figure 5 blue blocks are the stale blocks as it is not part of longest chain.
Figure4: Selfish mining
2.3 Selfish Mining: Selfish mining is an attack on blockchain where one miner do not publish the solution of the block it has mined immediately rather it publishes the solution according to it’s own benefit.
The selfish miner keeps mining the blocks to maintain its lead. When the rest of the network tries to catch it up then selfish miner releases a portion of its solved block to network. In Figure 4 red blocks are doing this.
The result is that their chain is longer and more difficult, so the rest of the network adopts their block solutions and they claim the block rewards.
The selfish mining is an attack to increase the profit of attacker by playing unfair . But it is more difficult in Bitcoin as it is more secure.
If a selfish mining pool controls over 51% of the network mining power it is probabilistically advantageous to revert or nullify a transaction as it possess the majority of mining power in the network.
Bitcoin improvement proposal, has been coined to lower the selfish mining attack by randomly assigning miners to various branches.
Another solution could be checking the timestamps. If a miner releases a chunk of blocks at one shot the other members in the network should wait and check if the timestamp of hashing the blocks and it’s reported timestamps in the network are same or not.
2.4Proof of Work: Proof of work is an algorithm to confirm a block and add it to the network.
The problem is that proof of work is very energy intensive. It has grown more because Bitcoin network has expanded and peta hashes of power have been directed at solving the hash rather than gig hashes.
2.5Double Spending Attack: It is an attack on blockchain where the given set of coin is spent more than once. There are three different ways to make this double spending attack.
Send two conflicting coin in the rapid succession in the bitcoin network. This is called the race attack.
Own 51% of total mining power and reverse any transaction of choice. This is called 51% attack.
To prevent block chain from this attack block confirmation mechanism is used. when a blockchain transaction is made it is added to the pool of unconfirmed transaction. Miners will the try to solve a hash puzzle and put this transaction inside a block. Then blockchain network confirm this block and add it to the existing network.
As it requires enormous computing power to solve these puzzles, they are difficult to undo. This is because each puzzle builds upon the previous blocks so to get to block #1, one needs to undo blocks #3 and #2. Figure 5 refers to this description. This would take a nearly impossible amount of computing power, so blockchain would be as secure as possible if number of block confirmations are more.
Figure 5: Block Confirmation
2.6 Simulator: It is a machine designed to provide a realistic imitation. In this study author has developed an open source block chain simulator. This simulator is scalable up to thousands of nodes. More about this study simulator is discussed in later part of this report.