Proof of Work - Bitcoin's Race-To-The-Bottom Security Model
Proof of Work
Summary
Proof of work is a race-to-the-bottom security model. It's about wasting so many resources that it would be stupid for a criminal to try and waste more than the community collectively already is.
Why Use Proof of Work?
Miners are responsible for protecting against malicious activity such as double spending (e.g., I use my BTC to buy something from both Bob and Joe, but only one of them can actually get paid). They construct a block of valid transactions and then use Proof of Work to assert that it is a good block to add to the chain.
Pros
- Security with math
- It's impossible to cut corners; generating blocks using this method is expensive.
Cons
- Ridiculous amounts of energy consumed
- Estimated to be about 215 kilowatt-hours (KWh) per Bitcoin transaction. For perspective:
- My apartment uses 600 KWh per month.
- The Bitcoin network is currently totaling as much annual energy consumption as Denmark.
- The public, with concerns about the environment, should boycott/protest Bitcoin.
- This concern is being discussed more and more.
- Estimated to be about 215 kilowatt-hours (KWh) per Bitcoin transaction. For perspective:
- Wasteful
- This method is only effective if the amount of resources spent mining is significantly more than the resources available to an attacker.
- Centralization
- The large hardware investment, the noise and heat, and energy costs over time drive centralization because it becomes harder and harder for a hobbyist to stand a chance.
How it Works
A miner generates a possible block to add to the block chain. When doing so, they confirm the transactions included. They then spend time and money to assert that this block should be added to the chain.
Time and money is spent by way of a guess and check process. Given the block plus a small blob of data, miners need to find a value for that blob so that a hash of the entire thing starts with a certain number of 0s.
The difficulty, or how many guess and checks are expected to be required, is automatically increased as more and more hardware is used for mining. This ensures the success rate stays constant. In other words, more miners means more waste (and therefore more security), not any increase in network capability such as total throughput.
Security
How This Creates Security
The chain of blocks that has had the most amount of work put into it is the only chain the network trusts. If someone malicious created a bad block, the rest of the network should ignore that block. Over time, the malicious block will be completely overrun by the sheer number of people doing the right thing.
Because of this, it is standard to only accept a transaction as final after a few additional blocks have been added to the chain. For Bitcoin, this is usually 6 blocks (~1 hour).
Possible Threats
51% attack
The chain with the most work put into it is the only chain accepted by the network. If a malicious party is able to acquire 51% of the total mining power, they would effectively have complete control over the chain.
With 51% of the mining power, an entity could:
- Double spend
- Prevent certain entities from transacting at all
- Require high transaction fees
Quantum computing
Most Proof of Work algorithms (including Bitcoins) would theoretically be broken overnight by quantum computers. Quantum computers could generate signatures so quickly that a 51% attack becomes very feasible.