Lesson 20

The 51% Attack and Double Spending

VIDEO: What is double spending

Double Spending

The only way to counterfeit a bitcoin would be to spend it twice. This kind of fraud is called double spending.

To perform a successful double spending attack you have to send your input to two different addresses, before the network has confirmed one of the transactions. A confirmation takes about ten minutes, so there is plenty of time. Once the network has confirmed one of the two transactions, the other one gets rejected as invalid.

But it is still possible that both transactions get confirmed by the network simultaneously. If one part of the network confirms transaction A and the other part confirms transaction B at the same time. Now we have two branches of the blockchain, two different ledgers. The network now has to decide which branch and therefore which transaction will be considered as valid.

Within the bitcoin system it is always the longest chain that wins. So the next confirmation of transactions will either build up on branch A or B. The case that confirmations on both branches of the blockchain will happen simultaneously becomes more unlikely with each confirmation. Together with that the probability of a successful double spending attack decreases exponentially. Transactions with at least 6 confirmations are considered to be secure. So in the end there will always be only one transaction accepted as valid by the consensus of the network.

VIDEO: Nightmare of 51% Attack - part 1

The 51% Attack

To confirm transactions and get ahold of the newly created bitcoins as a reward miners have to solve mathematical riddles with their computers. These riddles have a variable difficulty. The more people want to mine the more difficult the riddles get. What happens now if somebody bought himself more than 50% of the computational power of the whole network of miners?

Since the network always accepts the longest chain, he would end up in creating every new confirmation and getting full control over the blockchain. But what harm can he possibly do? He now has the power to successfully exercise double spending attacks and to censor transactions. He could for example chose to only confirm a certain percentage of transactions, which would destroy the reliability of Bitcoin as a payment system.

By doing harm to the Bitcoin system an attacker would also destroy the value of the bitcoins he gets as mining reward. This economic counterincentive reduces the risk substantially. But still the 51% attack is a possibility for financially strong enemies of Bitcoin – like governments or banks – to fight it effectively.

Historically we’ve had the case of more than 50% of the mining power being concentrated in the hand of one mining pool. A mining pool is a voluntary association of miners to increase their chances of getting the block reward by combining their computational power. Since those miners were interested in a high value of Bitcoin they quickly dissolved and aligned themselves to other mining pools to balance things out.

We can see from this that within the Bitcoin system nothing is more important than the decentralization of the power over the blockchain. So please mine, if you can!

VIDEO: Nightmare of 51% Attack - part 2


comments powered by Disqus

You will get an awesome place to trade your
Bitcoin and more. Click for further information!

Choose your topic

and start the journey