How Does Bitcoin Work?
Trying to explain how Bitcoin works in simple terms is like watching a Tom Cruise film – it’s Mission Impossible.
Get your black coffee, green tea or Red Bull and prepare to have your brain scrambled. Actually, you don’t have to understand how Bitcoin works to be able to use it. But if you can wrap your head around it, you are more likely to believe in it and hold it for the long term.
Byzantine Generals Problem
We might as well dive head first into the deep end…
Go back to 1,000 AD and imagine you are one of several Byzantine army generals encircling an enemy city. Should you attack or retreat? If you don’t coordinate an attack well, you are likely to be defeated.
To decide, you must reach consensus with your fellow generals, all of whom are spread out at different locations outside the city walls. In order for the generals to communicate with one another, each general sends out a messenger to tell the other generals whether he wants to attack or retreat.
The problem is: there are known to be traitors among the generals who will most likely send messengers with misleading information, preventing consensus from being reached, thereby increasing the chances of defeat.
So, how can the loyal generals reach consensus, despite the traitorous generals trying to deceive them? My friend Julia says they should just use WhatsApp, but they’d need to invent time travel first.
What on earth has all this got to do with Bitcoin??
Well, the inventor of Bitcoin, Satoshi Nakamoto, needed to get round the Byzantine Generals Problem in order to make Bitcoin a secure form of money that did not rely on trusting anyone else. If you trust someone with your money – like a friend, bank, or government – you can’t be certain you will get your money back.
Bitcoin was designed to be ‘trustless’, in other words you can use it securely even if there are people out to get you, like malicious Byzantine generals. It doesn’t matter what those pesky messengers tell you, consensus can still be reached with Bitcoin.
Proof of Work
This leads us nicely onto the concept of ‘proof of work’. This is the magical insight that allowed Satoshi Nakamoto to make Bitcoin a reality. Proof of work is the way the Byzantine Generals Problem is overcome.
Let’s talk about the blockchain again. What is it? It’s an online record-keeping system – or ledger – that records all Bitcoin transactions. These transactions are grouped into ‘blocks’ which are linked one after another, hence the term ‘blockchain’.
In order to add a new block of transactions to the blockchain – which happens roughly every 10 minutes – you need to repeatedly run a special computer program (or algorithm) called ‘SHA-256’ and get lucky.
People who run the SHA-256 algorithm to try to add the next block are known as Bitcoin ‘miners’ and they use purpose-built computers called ‘ASICs’.
This next bit is tricky – but stick with it:
The ASIC computer generates billions, even trillions, of random numbers each second called ‘nonces’, and combines each nonce with specific data relevant for the next block (called the block header data), and runs all of that (nonce + block header data) through the SHA-256 algorithm.
Out of the other end of the algorithm pops a number referred to as a ‘hash’. In order to be the successful miner who is allowed to mine the block, that hash value must be less than or equal to a certain ‘target’ value. Miners keep generating trillions of nonces until one is found that results in a low enough hash value to win the block.
Who sets the target value mentioned above? Actually, it’s not a person, it’s the Bitcoin software itself, known as Bitcoin Core. This open-source software runs on 1,000s of computers around the world called ‘nodes’.
If you’re the lucky miner who first finds a hash value lower than the target for a particular block, you immediately broadcast that new block to the rest of the network. All the other miners and nodes then verify that you did indeed find a valid hash. Verified blocks are then permanently added to the blockchain.
In this way, the Byzantine Generals Problem is resolved. A verified block is equivalent to a consensus decision that everyone can see and agree to, either to attack the enemy city or retreat.
The loyal generals (reputable miners and nodes) are able to trust the decision, as it’s supported by a decentralised, independently-run piece of software (Bitcoin Core) that sets targets that can only be met by someone making a computationally huge electrical effort (Proof of Work) with the help of dedicated computers called ASICs.
And guess what? If you are the miner that mines the next block, you get rewarded with Bitcoin. Read on…
Block Reward
The block reward is an amount of Bitcoin given to the miner that first finds a low enough hash value for each 10-minute block of transactions.
At the moment, the block reward is 3.125 Bitcoin. This Bitcoin is created by the Bitcoin Core software and automatically sent to the miner’s public Bitcoin address.
In addition to the 3.125 Bitcoin, the miner also receives the transaction fees for all of the transactions that were recorded in the block. For example, if you send 0.2 Bitcoin to a friend in Argentina, you need to pay a transaction fee (usually very low, but it varies from day to day). That fee goes to the miner who mines the block in which your transaction is recorded.
The block reward – excluding any transaction fees – halves roughly every four years. The moment at which it halves is known as the ‘halving’ (not very original). The last halving took place on 19 April 2024. Here’s a table showing how the Bitcoin block reward has changed, and will change, over time:
| Halvings | Date | Block Rewards |
|---|---|---|
| Launch of Bitcoin | 3 January 2009 | 50 Bitcoin |
| 1st Halving | 28 November 2012 | 25 Bitcoin |
| 2nd Halving | 9 July 2016 | 12.5 Bitcoin |
| 3rd Halving | 11 May 2020 | 6.25 Bitcoin |
| 4th Halving | 19 April 2024 | 3.125 Bitcoin |
| 5th Halving | 2028 (expected) | 1.5625 Bitcoin |
| 6th Halving | 2032 (expected) | 0.78125 Bitcoin |
| 7th Halving | 2036 (expected) | 0.390625 Bitcoin |
| 8th Halving | 2040 (expected) | 0.1953125 Bitcoin |
Halvings will continue every four years after 2040. The final Bitcoin block is predicted to be mined in the year 2140 at which time the block reward will be close to zero.
Miners will then make their money via transaction fees alone, assuming we haven’t all blown ourselves up by then in a nuclear apocalypse.
Summary
- Why the Byzantine Generals Problem needed to be solved in order to create a form of money that didn’t rely on trusting a third party.
- How Satoshi Nakamoto applied cryptographic techniques and a Proof of Work mechanism to get round the Byzantine Generals Problem.
- The role that the Bitcoin Core software, miners and nodes play.
- How Bitcoin gets created.
- How less and less new Bitcoin will come into existence over time via the halvings.
Useful Resources
> Here is a quick video summary of how Bitcoin works, focussing towards the end on the importance of nodes:
> It’s a hard read, but if you want to explore the Byzantine Generals conundrum – also known as the Byzantine Fault – in more detail, have a look at this dedicated page on Wikipedia: en.wikipedia.org/wiki/Byzantine_fault
> And here’s Wikipedia’s page on Proof of Work: en.wikipedia.org/wiki/Proof_of_work
Where to Next?
If you’ve been reading the sections in order, the next page we recommend is How to Buy Bitcoin.