Bitcoin 101: Understanding Bitcoin Mining (Proof of Work)
It’s about time that I make a refresher course on some of the core concepts of Bitcoin and other cryptocurrencies.
Today I want to give you an easy explanation of how Proof of Work works and how it ultimately secures your funds.
If you’d prefer to learn via video: https://youtu.be/0_G38wueXBc
Proof of work, as it pertains to Bitcoin, is what a computer must do in order to get paid in Bitcoin.
The computers that do these tasks are called miners.
The miners do a couple different things:
- Create blocks
- Fill those blocks with transactions.
When you send or receive Bitcoin, you are waiting for your transaction to be placed in a block by one of these computers, or miners. Once a block is filled with transactions by the miner, they get paid a percentage of the transaction fees.
Now let’s take a step back, because the miners also have to work to create a block.
This is where the competition lies with the miners, because the first miner to create, or unlock the next block is rewarded with what is called the block reward.
The block reward at this time is 12.5 BTC.
This task of block creation gets a little abstract so I’m going to ask you to be patient because it will all come full circle in the end I promise.
This task of block creation is better understood with an introduction to a new vocabulary, so:
- A hash algorithm
is a mathematical equation that creates outputs that are fixed strings of letters and numbers. It only works one way so you can’t reverse the process, you can’t plug in the output to recreate the original input.
- A hash
is the result of data being run through a hash algorithm. In other words, a hash is the output, it is that fixed string of letters and numbers.
Digital data, whether it be text, images, videos, audio, whatever it may be, exists on your computer at its very core as binary code.
Literally all of your data, all of the data you’ve interacted with online can be broken down into 0’s and 1’s.
When you run these 0’s and 1’s through a hash algorithm, it results in a unique set of letters and numbers, or a hash(output).
If you use almost identical inputs, but with one slight variation, it will produce completely different hashes(outputs).
Now that we’ve got a better idea of how a hash algorithm works, let’s see how the Bitcoin network uses this to create new blocks for the Bitcoin blockchain.
As a Bitcoin miner, in order to unlock or create a new block, that computer needs to guess the right input in order to match the output provided.
- A hash rate is the number of guesses per second.
A faster the hash rate means a better chance of guessing the correct combination to satisfy the algorithm and unlock a block.
If you have a computer that is doing this, it is running 24/7, requiring a lot of electricity and internet connection. For each new block that is “up for grabs”, miners are provided with the required output that they must satisfy by guessing the correct input. This means that all of the miners are competing to reach the correct output and win the block reward.
Again, as of today the block reward for miners is 12.5 bitcoin. That’s 12.5 brand new Bitcoin being created roughly every 10 minutes, which is the rate that blocks are created thanks to the miners racing to create blocks.
Every four years, this block reward is cut in half.
When a miner successfully finds the correct input, this is it’s “proof of work” that it put forth to find that correct input.
This is why you should care:
You may have heard of Bitcoin’s blockchain as being an immutable ledger, this has to do with:
- The distributed network of nodes that verify each transaction
- That unique code, called hashes that are produced through that hash algorithm
- Block confirmations.
A block confirmation means that there have been new blocks mined that have essentially locked the block that contains your transaction into place.
One block confirmation means one block has been mined on top of the block that contains your transaction.
This means that once funds are sent to you, and you’ve received roughly 6 block confirmations, those funds are yours, permanently.
No one can go back and undo the transaction, they will only be moved if you chose to move them.
No bank, no government, no one can chose to take that away from you.
This is the strength of a decentralized, distributed network.