How Does Bitcoin Mining Work?

LocalBitcoins
The LocalBitcoins blog
6 min readOct 22, 2021

--

Guest article by James Page

See also: ¿Cómo funciona la minería de Bitcoin?

Bitcoin mining is the process of generating new bitcoins and keeping the Bitcoin blockchain secure against malicious attacks. You can read more about the basics of mining and how mining operations ensure the safety of the Bitcoin blockchain in our informative guide on how Bitcoin is mined.

In this post, we will discuss the more technical side of Bitcoin mining for those interested in mining their own bitcoins. We will shortly cover how Bitcoin mining works and delve into the technical aspects of mining, including how you can start mining Bitcoin and what steps you need to take in order to mine profitably.

What Is Bitcoin Mining?

As you may already know, Bitcoin is a decentralized payment system and a digital asset which doesn’t depend on a central authority to function. Instead, the system depends on a peer-to-peer network of users who interact with the Bitcoin software in order to complete Bitcoin transactions based on consensus.

Essentially, that means the transactions aren’t validated by a single overseeing authority and the responsibility of keeping the blockchain secure rests on the decentralized Bitcoin community, and most of all, on Bitcoin miners.

Bitcoin transactions have to be validated before they can be a part of the immutable Bitcoin blockchain. It is the duty of miners to prove that the transactions they add to the blockchain are valid. Once a miner proves that the block they submit to the blockchain is in accord with the consensus rules, they receive newly generated bitcoins and transaction fees rewards.

Bitcoin mining was relatively easy in the early years of Bitcoin because only a few people were interested in the cryptocurrency. Now that Bitcoin is almost ubiquitous, Bitcoin mining has become an entire industry unto itself, with professional mining equipment, mining software, and mining pool services.

How Does Bitcoin Mining Work?

Bitcoin mining is based on a consensus protocol known as proof-of-work. Bitcoin miners race each other in order to come up with the proof that shows the transactions they are adding to the blockchain are valid. The first miner — or miners — who provide the proof wins the mining operation round and gets to add a new block to the Bitcoin blockchain.

Bitcoin assigns a cryptographic hash to all the unconfirmed transactions in the Bitcoin memory pool. Once Bitcoin miners compile a block of transactions, the protocol spits out a block target hash based on the hashes of each transaction in the block. Miners, in return, have to hash the block hash with random numbers until they get the block target hash, or the closest smaller value.

Bitcoin miners have to use brute force computational guessing in order to come up with the right proof. The more numbers a miner can hash in a second, the more ground they will cover, increasing their chances of finding the lucky number that satisfies the proof-of-work mechanism. A mining machine’s hashing power depends on how many hashes it can calculate in a second.

Bitcoin mining has an adjusting difficulty rate depending on the total computing power in the Bitcoin network. That means that the difficulty of mining Bitcoin increases as more miners and more powerful mining machines enter the race.

What Do You Need to Mine Bitcoin?

Bitcoin mining, once a fringe hobby for techies and crypto enthusiasts, turned into an industry thanks to the increasing profitability of Bitcoin. The introduction of industry-standard mining machines with astronomical hash rates, i.e ASIC miners, spelled the end of CPU (central processing unit) and GPU (graphics processing unit) mining with computers.

While you can technically mine Bitcoin on these devices, the odds of successful mining, i.e earning rewards with a regular computer, have considerably shrinked and aren’t considered feasible.

Industry-standard mining machines aren’t the sole cause of change in the Bitcoin mining landscape. Popularisation of mining pools is another important development that completely altered Bitcoin mining. Miners usually worked solo and depended on their own computing power to mine bitcoins before mining pools became the norm.

However, the increased difficulty rate and the uneven distribution of computing power pushed solo miners to combine their power with others in order to successfully mine blocks and earn rewards.

These days, Bitcoin mining is mostly accomplished through mining pools where many miners work together in order to validate Bitcoin blocks. These pools are usually owned by private companies that run the Bitcoin nodes necessary for mining. Pool operators design mining schedules and reward schemes, running the mining operations. Each pool uses a different method to distribute shares i.e rewards to miners in the pool.

How to Start Mining Bitcoin

You need an industry standard mining machine in order to be able to mine Bitcoin, but that is not all. Picking a good and reputable mining pool with the right rewards scheme is also very important.

Mining pools mostly operated out of China due to the availability of cheap electricity in the country, at least until the Chinese government started a crackdown on cryptocurrency mining. The crackdown caused a brief fall in the mining difficulty rate and a lot of second-hand ASIC miners became available on the market.

Mining pools calculate and distribute block rewards based on different methods. Miners are rewarded based on their “shares” depending on how much work they accomplish in mining operations.

Most mining pools use one of three main methods to calculate how many shares a miner receives. These are Pay-Per-Share (PPS), Pay-Per-Last-N-Shares (PPLNS), and Full-Pay-Per-Share (FPPS).

The pools that use PPS, such as F2Pool and ViaBTC, pay their miners even if they can’t successfully mine a block. This is a safer alternative for miners but pool fees tend to be more expensive compared to others.

Mining pools that use FPPS, such as Poolin, operate like PPS pools but they also pay the miners transaction fees attached to blocks that they mine successfully.

The PPLNS method rewards the miners who continuously mine in the same pool. Once a block is successfully mined, miners are rewarded for their past work for a specific time period, even if the pool didn’t mine those previous blocks. Antpool uses PPLNS.

How Much Does It Cost to Start Mining Bitcoin?

You need a starting capital in order to begin mining Bitcoin. The costs include investing in one or more mining machines and pool fees, but that is not all. You also have to think of the additional cost of electricity. Bitcoin mining rigs consume a lot of energy and your electricity bill could potentially cost you more than what you earn through mining.

What’s more, mining machines heat up easily and they are also pretty loud, which means you have to invest in proper cooling equipment as well as sound proofing your base of operations.

Most mining pools offer profitability calculators to help you understand how much you can make with your mining equipment. These calculators use benchmark statistics on mining machines and take the cost of electricity in your country/region into account in order to give you an approximation of how much you can profit from mining Bitcoin.

A Few Words Before You Go…

Mining Bitcoin can be profitable but it is also an expensive and time consuming endeavor. Whether or not you can profit from mining depends on your individual circumstances, including how much starting capital you have and whether you have access to cheap electricity. Keep in mind that even the most expensive mining rig doesn’t guarantee profit given the increasing Bitcoin mining difficulty rate as well as the costs of running mining equipment. If you want to try your hand in Bitcoin mining, run a few calculations with a Bitcoin mining profit calculator first, so that you can decide on the most profitable approach.

--

--