The purpose of bitcoin mining is to approve transactions by adding them to the blockchain.
At its core, Bitcoin mining is a guessing game. Here is a simplified version.
You tell a friend: Guess a number between 1 and 10.
When you mine Bitcoin..
This large number can vary. But it is on the order of many many zeroes.
Note: Bitcoin has an auto difficulty adjuster. If numbers are guessed too quickly, the puzzle automatically increases in difficulty (ie. more numbers to guess). The converse is also true.
Fundamentally, it’s a compute-power game. The more compute power you have, the faster you guess the right number, and the more likely you are to win the prize.
Compute power increases linearly with input size. Here is a piece of code that shows this relationship. All it does is iterate through numbers.
As numbers get very large, it quickly overwhelms your computer.
You want to use specialized equipment to mine Bitcoin, ie. Application-Specific Integrated Circuits (ASICs) that are designed to mine Bitcoin. ASICs are far more efficient than general-purpose CPUs (ie. your laptop).
To illustrate the difference, compare the two hash rates:
A terahash (TH) is 1 trillion hashes. A laptop computes on the order of 10^3 hashes per second, while an ASIC computes at 10^14 hashes per second. That’s an 11 order of magnitude difference, meaning you’d need 100 billion laptops to match 1 ASIC. Laptops simply cannot compete.
Note: The hash rate is simply the speed at which you mine Bitcoin.
You can buy a Bitcoin miner on Amazon. These can range anywhere from $1k to $20k.
When buying a miner, you should consider these factors:
Hash rate is how fast you can guess numbers. Electricity Consumption is how much electricity the machine uses. Electricity prices are location-dependent. Rural areas generally have cheaper electricity than urban areas. North Dakota is ranked #1 in the US.
You also have to consider these factors:
These fluctuate over time. So you’ll have to make assumptions. For this reasons your calculations will vary.
Here is a calculation I did back in January 2022. The assumptions I made:
Note: As of May 2022, the price of Bitcoin is $39k and network hash rate is 223M TH/s.
Bitcoin mining is a winner-takes-all game. People have realized this, so they created mining pools, to distribute the rewards more evenly.
A mining pool is when people pool together CPU power. When one person wins, they distribute the reward to everyone in the pool.
The top 4 China-based mining pools (F2Pool, AntPool, ViaBTC, and Poolin) account for over 50% of new blocks [*].
Joining a mining pool is free, but they come with fees. Here are some example rates:
Besides cost, there are other factors to consider.
You probably don’t want to mine Bitcoin inside your home. They are LOUD. Here is what they sound like:
Video: Link
You want to make sure your landlord is okay with you using a LOT of electricity. Failure to disclose may result in upset landlords.
I hope this helps. Let me know what you think. Will you be mining Bitcoin? Send me an email.