Everyone has an opinion about bitcoin these days. One friend says to buy it. Another says he wouldn’t touch it with a 10-foot pole. Then there’s a guy at work with a mining rig in his basement. But when you ask him how bitcoin mining works, you get a string of confusing explanations. Google isn’t much help either.
Don’t worry! There’s a reason why bitcoin is a confusing topic: To understand it, you must synthesize a bunch of foreign concepts at once. A simple paragraph won’t suffice.
That’s why we created this guide.
Over the next 10 minutes — the time it takes to mine a single block of bitcoin transactions — we’re going to help you understand “bitcoin” and “bitcoin mining” like never before.
Let’s start with the basics…
What’s a Blockchain Ledger?
At the heart of the bitcoin network is a publicly visible “blockchain ledger,” which is maintained and updated by a global network of computers (bitcoin miners). As of April 2, 2019, 9,223 computers around the world were sharing public copies of bitcoin’s ledger.
The bitcoin ledger, which is kind of like a spreadsheet, provides a history of all bitcoin transactions and shows the number of bitcoins in every account on the blockchain ledger.
What’s a Bitcoin Transaction?
A “bitcoin transaction” happens when one account on the bitcoin ledger sends bitcoins to another account. As you might imagine, it’s vital to update all copies of the ledger simultaneously after each transaction. Otherwise, there wouldn’t be an accurate record of how much money everyone has.
But how do all the keepers of the ledger — called “nodes”— agree that a specific update is correct? That’s where the results of bitcoin mining come into play.
What Are the Results of Bitcoin Mining?
Bitcoin mining is a computational process that validates new transactions; gets the entire network to agree that the updated version of the ledger is correct; updates all public copies of the ledger simultaneously; and creates new bitcoins to compensate miners for their work.
The work of bitcoin mining isn’t “easy.” In fact, it was designed to be difficult.
What Is the Work of Bitcoin Mining: And Why Do Miners Do It?
The work of bitcoin mining requires high-speed computers to certify approximately 350,564 transactions per day. They confirm these transactions by solving extremely difficult cryptographic math puzzles.
These “puzzles” involve hunting for 64-digit numbers called “hashes.” But the math required to calculate hashes is so difficult that the computers don’t actually “solve” them. Instead, they randomly guess hash numbers until they find the one that solves the puzzle.
To put it another way, the work of bitcoin mining is like a big guessing race to “solve” the block. The winner of the race receives the reward for bitcoin mining: Freshly minted bitcoins. At the time of this writing, bitcoin miners were approving 144 blocks of transactions very 24 hours,creating 1,800 new bitcoins per day.
The work of bitcoin mining requires expensive computers and a lot of electricity. No one is certain how much electricity miners consume, but some estimate that global bitcoin mining currently uses the same amount of energy as the nation of Ireland.
Long story short, mining is difficult and costly, so the stakes are high.
Because the likelihood of one computer winning the race is slim, miners combine their resources in different mining pools. If the pool wins, all members who contributed to mining the block share the bounty. At the time of this writing, the reward for being the first to mine a single block of transactions was $53,931.72 USD in bitcoins.
Ultimately, the faster the bitcoin mining computer, the more numbers it can guess, the quicker it can solve the puzzle and the more likely it is to win. But “difficulty-level” is an important part of the bitcoin mining equation. As computers get faster and as more miners join the bitcoin network, the network automatically adjusts the difficulty level to ensure that computers can only solve a single block of transactions every 10 minutes.
Why Is It So Hard to Confirm Bitcoin Transactions?
Bitcoin transactions are hard to confirm because that’s how bitcoin solves the “double-spending” problem. Without solving this problem, a decentralized digital currency wouldn’t be possible. Someone could copy a unit of digital currency, keep the original, and send duplicate copies to as many people as they wanted.
Cash and gold don’t suffer from double-spending. They have to physically leave your hands when you spend them, so you can’t spend them more than once.
Let’s illustrate double-spending with an example:
- Bob has one bitcoin.
- Bob creates two separate transactions to double-spend the same bitcoin.
- In the first transaction, Bob sends the bitcoin to Jim.
- In the second transaction, Bob sends the bitcoin to Mary.
- Bob signs both transactions with his cryptographic key.
- Based on the cryptographic key, Miner A confirms the transaction to Jim is correct and rejects the transaction to Mary as a duplicate.
- Miner B confirms the send to Mary, and rejects the transaction to Jim as a duplicate.
- Uh oh! Miner A and Miner B have two different versions of the blockchain ledger! Miner A thinks Jim has the bitcoin and Miner B thinks Mary has the bitcoin.
- How do we know which one is correct?
Bitcoin solves the double-spending problem by making transactions difficult to confirm. The combination of difficulty level with the guessing race lottery means two things:
- There’s a prize to solve the block, so bitcoin miners have monetary incentive to do the work required to confirm transactions and win the race.
- Only one mining computer can win, so only one version of the blockchain gets preserved.
But who gets the bitcoin, Bob or Mary? Ultimately, only one will receive it. But we won’t know who that is until after a bitcoin-mining computer wins the race and solves the block. Incidentally, this is one of the reasons you should never accept a bitcoin payment until after the transaction has been confirmed. Remember, the bitcoin network confirms a new block of transactions every 10 minutes.
But wait! How do all of the other miners agree that the winner is the winner?
How Do Bitcoin Miners Reach Consensus?
Part of the magic behind the bitcoin network is the fact that it’s difficult to confirm a block of transactions, but extremely easy to verify that the answer is correct. To put it simply, the process is kind of like having a thousand keys, but only one fits the door. It takes a long time to try each key, but after finding the right one, everyone can immediately test that it works.
When one mining computer correctly guesses the hash number (and wins the race), the other computers will immediately see that the answer is correct. Then they will update their ledgers by adding the newly confirmed block to the blockchain.
Then the race begins again — every 10 minutes until when? For as long as bitcoin has ardent supporters who are willing to mine and profit as a result!
TIOmarkets: Use Bitcoin and other crypto to trade Forex & CFDs
TIOmarkets is a new FX broker that accepts deposits in crypto. That means you can deposit, withdraw, and hold your balance in crypto while trading the global currency, stocks, energies and indices markets.