What Is Bitcoin Mining?

Bitcoin, at its most basic, can be thought of as digital cash.  One person digitally “hands” their bitcoin to another person, without any third party to facilitate the transfer. This is opposed to traditional online payments that have a third-party intermediary such as Paypal or your bank.

But without a third party, someone, or in this case something, must verify that the transaction is a valid one (i.e. the person sending the bitcoin has bitcoin to send). With bitcoin, this is done by the network itself. The bitcoin network is comprised of thousands of individuals and groups that run the network and make sure no one tries to cheat the system.

These individuals can be broken down into two types: people who run full nodes and Bitcoin miners.

The blockchain is a shared ledger that includes information about every bitcoin wallet and every transaction that has ever occurred on the network.

The difference between bitcoin miners and people who run full nodes is that miners are the first to verify a transaction and propagate it through the network, while full nodes simply help verify and propagate that information after the hard work has been done by miners. For the hard work, miners are rewarded with newly created bitcoin.

Bitcoin transactions are processed in groups called blocks. In addition to the transactions and their fees, each block also includes newly created bitcoins which, along with the fees are awarded to the miner that “solved” that block.

Which miner gets the reward depends on two things: luck and the amount of computing power the miner puts on the network. Every transaction and every block are represented on the blockchain in an encrypted and compressed form called a hash. The technical details of how hashing works aren’t important for the purposes of this guide except that it turns data into a seemingly random collection of numbers and letters. If you hash the same data using the same method again, it will return the same random characters but if you change even one character in the original data, the new hash will be completely different than the first hash. It is extremely easy for computers to do this, but practically impossible to turn those random characters back into comprehensible data.

Miners take transactions in groups of blocks and add them to the blockchain in hashed form. But they don’t just use transactions to make their hash, they also use the hash from the previous block and then the next block uses that hash and a group of transactions to make their hash. That way if anyone attempts to add or remove a block from the blockchain, the math won’t add up and everyone would see it.

But, as mentioned, hashing data is a trivial task for computers. To regulate the speed that bitcoin is created at, the network purposefully makes this more difficult. Every hash has a certain nonce that it must satisfy, that is the hash must be shortened by a certain amount, but that amount isn’t known. So, the miners continually create new hashes until they satisfy that requirement. Once they succeed, it is announced to the network, the block is added to the end of the blockchain, the miner is rewarded with the transaction fees and newly created bitcoin and the network begins working on the next block.

That is the fundamentals of Proof-of-work. If someone wants to fabricate a part of the blockchain, they would have to compute what their fake block is with the block behind it and then continue to do their own computations with every block after that since one change to the data will change every hash after that. Meanwhile, the majority of the network will be working on the correct block and each block after that, because the network is likely to have more computational power than the bad actor, the correct blockchain would quickly outgrow the fabricated one and miners would then know not to use the fabricated chain since it would be much shorter than the legitimate one.

After hearing all this, you might be thinking great, I want to mine bitcoin. Unfortunately, that is no longer an option for everyone. As mentioned, the bitcoin network makes mining harder to regulate the speed new bitcoins are created. As more computational power is added to the network, it becomes more difficult to solve a block. This has led to a never-ending arms race. When bitcoin was launched in 2009, anyone could mine it with a simple laptop. Eventually, it became advantageous to use powerful gaming graphics cards (GPUs). Today, not even that is enough. Most bitcoin miners today utilize special Bitcoin mining hardware that uses Application Specific Integrated Circuits (ASIC) chips which are chips that are designed for one specific purpose, in this case solving blocks and mining bitcoin. These are far more effective than home computers and are constantly being improved.

In addition, most miners combine their resources in a mining pool, combining their computational power and increasing their chances of solving a block.  Most pools distribute the block reward to miners proportionally according to their contribution.

Even with ASICs, mining is extremely competitive. The most successful miners own giant mining facilities that are running 24/7 and have access to cheap or free electricity. It is more effective for end-users to simply buy bitcoin than it is to try and mine bitcoin without proper hardware.

While it may seem unfair that most users can no longer mine bitcoin, it is important to note that the amount of computational power on the Bitcoin network is what makes it the most secure cryptocurrency in the world. It would take a near unimaginable amount of computing power to trick the network into accepting a non-valid block, and it is unlikely that any group, even governments, have that kind of power to hand. So if you ever meet a miner, rather than asking them how rich they have gotten from creating “free” money, perhaps you should thank them.