This piece is a semi-in-depth explanation of bitcoin mining. It is intended for non-miners who are interested in broadening their understanding of the bitcoin ecosystem. It blends semi-technical terms with easily digestible examples in order to describe the essential components to bitcoin mining. By the end, you will have a better understanding of what mining is, how it works, and why it is essential.
This post is powered by Urkel Labs.
Why focus on bitcoin mining?
Bitcoin was the first large-scale, widely-adopted cryptocurrency. It’s like the oldest sibling to the nearly 4,000 cryptocurrencies that exist today. By many measures bitcoin is the best known of them all.
Even though each blockchain differs to varying degrees, they owe — at least in part — their existence and design to bitcoin. Mining is not excluded from this because it is an essential element of any public blockchain. Therefore, understanding the components and functions of bitcoin mining serve as a helpful foundation for understanding other blockchains.
The mining reason is not the reward
There’s one reason mining exists: to secure the network. Trust.
No single person or organization is in charge of the bitcoin network. Instead, it’s a bunch of computers that are interconnected and constantly sharing information with one another about who on the network has what. That’s what people mean when they say the network is decentralized.
Miners are the computers that do the mining. They keep track of who sends how much to who, make sure those transactions are legit, and save that information for everyone to see. As a reward for this, the network gives them new tokens.
TAKEAWAY: The reason for mining is security and trust. The reward for mining is new tokens.
Now we’ll break that down.
Miners are in the business of transactions
Bitcoin is a peer-to-peer payment network. One person can send any amount to another directly, without the need for a 3rd party to facilitate the transaction. The total number and rate of transactions adds up quickly, so it’s important to make sure the books are up to date and accurate. To do this effectively takes lots of computers with lots of processing power and memory.
Enter miners.
Blockchain as transaction history
Miners are computers. They validate and process transactions. If you’ve ever sent bitcoin to a friend, a miner made that happen. Okay, but how does this work?
Miners store a copy of the entire transaction history of the network. It’s the same history that all the other miners have, which is how miners know who has what.
Whenever someone sends BTC to someone else, a miner checks the transaction history: does this person have the amount they want to send? If yes, they process the transaction and let other miners know. These miners forward the information as well until all miners in the network have records that are up to date.
These records, or transactions, are packaged together and saved/stored in blocks. In bitcoin, each block is ~2,000 transactions.
So, a blockchain is a series of blocks that contain the network’s full transaction history as agreed upon by the miners on the network.
Mining is a consensus-building process
In other words, mining is the mechanism through which network security is maintained. Security entails:
- No double-spending
- No spending what you don’t have
- Ensuring the transaction history is accurate
- Preventing attackers from breaking the rules above
These security features are built into the bitcoin network, that is, into the software itself. The rules are a property of the system as opposed to being enforced by someone outside the system. This design incentivizes those participating in the network to follow the rules.
In this respect, miners are like security guards and bookkeepers all in one. Miners promote network security by validating and storing transactions. This is the process of consensus-building.
Miners are rewarded for building consensus
Validating and storing transactions takes energy in the form of computational power. Like all computers, miners require power to run. They validate transactions by solving highly complex math problems. The complexity of these math problems corresponds to the size of the network, which is largely a function of the network’s transaction history, transaction volume, and how many computers are on the network.
In short, the bigger the network > the harder the math problem > the more computational power required.
So, why do miners dedicate energy and money to validate and store transactions? Two words: mining rewards.
A mining reward is newly minted tokens released by the network. Miners are rewarded for creating the next block. It’s like they’re writing the next chapter in a blockchain’s history, a history that’s only concerned with valid transactions on the network.
You can think of a mining reward as the network saying to the miner: “thanks for securing the network. Here are some cryptocurrencies as a token of my appreciation.”
Miners race against one another to be the first to create the next valid block on the blockchain. Whoever wins gets the reward.
SIDEBAR: Miners also receive transaction fees, or small amounts for processing transactions. However, these fees are very small in comparison to the mining rewards, which is why mining rewards are miners’ primary incentive.
Summary
Mining is a consensus-building process. It’s how cryptocurrency networks stay secure and keep track of the network’s transaction history. Networks are a bunch of interconnected computers that are constantly sharing information to ensure everyone’s records are up-to-date, accurate, and honest. This is the role of miners, computers that validate transactions and store them in blocks. This process can take significant energy in the form of computing power. Miners, therefore, are incentivized to create the next valid block on the blockchain in order to receive the mining reward.