What is Bitcoin mining? Bitcoin mining explained
Bitcoin mining is the process of creating valid blocks that add transaction records to Bitcoin’s (BTC) public ledger, which is called a blockchain. It is a crucial component of the Bitcoin network as it solves the so-called “double-spend problem.”
The double-spend problem refers to the issue of needing to find consensus on a history of transactions. Ownership of Bitcoin can be proven mathematically through public-key cryptography. However, cryptography alone cannot guarantee that one particular coin hadn’t previously been sent to someone else.
To form a shared history of transactions, one needs to have an agreed-upon ordering that is based on, for example, the time of the creation of each transaction. But any external input can be manipulated by whoever provides it, requiring participants to trust that third party.
In this article, we will discuss what is crypto mining, how to mine Bitcoin, how Bitcoin mining works, the cost of mining Bitcoin, is Bitcoin mining illegal, and the various Bitcoin mining problems that miners face.
How does Bitcoin mining work?
Mining (blockchain mining, in general) leverages economic incentives to provide a reliable and trustless way of ordering data. The third parties ordering transactions are decentralized, and they receive monetary rewards for correct behavior. On the contrary, any misbehavior results in a loss of economic resources, at least as long as the majority remains honest.
In the case of Bitcoin mining, this result is achieved by creating a succession of blocks that can be mathematically proven to have been stacked in the correct order with a certain commitment of resources. The process hinges on the mathematical properties of a cryptographic hash — a way to encode data in a standardized manner.
Hashes are a one-way encryption tool, meaning that decrypting them to their input data is nearly impossible, unless every possible combination is tested until the result matches the given hash. So, how is Bitcoin mined?
This is what Bitcoin miners do: They cycle through trillions of hashes every second until they find one that satisfies a condition called “difficulty.” Both the difficulty and the hash are very large numbers expressed in bits, so the condition simply requires the hash to be lower than the difficulty.
Difficulty readjusts every 2016 Bitcoin block — or approximately two weeks — to maintain a constant block time, which refers to how long it takes to find each new block while mining.
The hash generated by miners is used as an identifier for any particular block and is composed of the data found in the block header. The most important components of the hash are the Merkle root — another aggregated hash that encapsulates the signatures of all transactions in that block — and the previous block’s unique hash.
This means that altering even the tiniest component of a block would noticeably change its expected hash — and that of every following block, too. Nodes would instantly reject this incorrect version of the blockchain, protecting the network from tampering.
Through the difficulty requirement, the system guarantees that Bitcoin miners put in real work — the time and electricity spent in hashing through the possible combinations. This is why Bitcoin’s consensus protocol is called “proof-of-work,” to distinguish it from other types of block-creation mechanisms. To attack the network, malicious entities have no method other than recreating the entirety of its mining power. For Bitcoin, that would cost billions of dollars.
But, how long does it take to mine 1 Bitcoin. One BTC typically takes around 10 minutes to create, although this is only true for strong processors. The Bitcoin mining hardware you use will determine how quickly you can mine.
Why mine Bitcoin?
In many aspects, Bitcoin mining is comparable to mining for gold. Crypto mining (in Bitcoin’s case) is a computer operation that creates new Bitcoin and tracks transactions and ownership of the cryptocurrency. Bitcoin and gold mining are both energy-intensive and can produce significant financial rewards.
Therefore, you can mine BTC to earn profit/rewards. Some BTC miners build Bitcoin mining pools by combining their efforts with other miners. Groups of miners who work together have a more significant chance of earning rewards and splitting the profits. In addition, members of a mining pool pay a fee to be a part of the pool.
If your focus is not on money, you might want to mine Bitcoin if you enjoy playing with computers and learning about this new technology. For example, while doing Bitcoin mining configuration, you can learn how your computer and blockchain-based networks work.
Is Bitcoin mining worth it?
To find an answer to the above question, please conduct a cost-benefit analysis (using web-based calculators) to see whether Bitcoin mining is worth your effort. A cost-benefit analysis is a systematic method that organizations use to determine which actions should be undertaken and which should be avoided.
First, determine whether you are willing to invest the required initial capital in hardware and determine the future value of Bitcoin and the level of difficulty before committing your resources. It’s also crucial to examine the amount of difficulty specific to the cryptocurrency you wish to mine to see if the mining operation would be even lucrative.
When both Bitcoin prices and mining difficulty fall, it usually means fewer miners are mining BTC and that acquiring BTC is easier. Nonetheless, expect more miners to compete for fewer BTC as Bitcoin prices and mining difficulty climb.
Is Bitcoin mining legal?
If you’re wondering whether Bitcoin mining is legal — the answer is yes, considering the acceptance by various jurisdictions. For example, Enigma (based in Iceland) opened one of the world’s most extensive Bitcoin mining operations.
Crypto mining is considered a business in Israel and is subject to the corporate income tax. On the other hand, crypto miners are considered money transmitters by the Financial Crimes Enforcement Network (FinCEN) in the United States, meaning they may be subject to the rules that govern that conduct.
In addition, near the base of the Conchagua volcano, a new “Bitcoin city” will be built in the shape of a coin, as announced by El Salvador’s President Nayib Bukele in November 2021. Bitcoin mining will be powered by geothermal energy throughout the city. El Salvador will raise a billion-dollar “Bitcoin bond” with the help of crypto infrastructure provider Blockstream to commence construction of the city.
However, in Algeria, Nepal, Russia, Bolivia, Egypt, Morocco, Ecuador, and Pakistan, Bitcoin mining is prohibited. You should always check local rules where you live to find out if Bitcoin mining is legal in your jurisdiction.
How are Bitcoin miners paid?
The network recognizes the work conducted by Bitcoin miners in the form of providing rewards for generating new blocks. There are two types of rewards: new Bitcoin created with each block, and fees paid by users to transact on the network. But, how much does a Miner earn?
The block reward of newly minted Bitcoin, amounting to 6.25 BTC as of May 2020, is the majority of the miners’ revenue. This value is programmed to halve at fixed intervals of approximately four years so that eventually, no more Bitcoin is mined and only transaction fees will guarantee the security of the network.
By 2040, the block reward will have decreased to less than 0.2 BTC and only 80,000 Bitcoin out of 21 million will be left up for grabs. Only after 2140 will mining effectively end as the final BTC is slowly mined.
Even though the block reward decreases over time, past halvings have been amply compensated by increases in the Bitcoin price. While this is no guarantee of future results, Bitcoin miners enjoy a relative degree of certainty about their prospects. The community is very supportive of the current mining arrangement and has no plans to phase it out like Ethereum, another major mineable coin. With the right conditions, individual Bitcoin miners can be confident that the venture will turn a profit.
Although mining is a competitive business, starting is still relatively easy. In the early years of Bitcoin, hobbyists could simply boot up some software on their computer and get started right away. Those days are long gone, but setting up a dedicated Bitcoin miner is not as hard as it may seem at first.
How to choose hardware for Bitcoin mining?
If you are curious how you would go about mining Bitcoin, the first thing to note is that for mining BTC, your only option is to buy a Bitcoin mining machine, i.e., an Application-Specific Integrated Circuit device, commonly referred to as an ASIC.
These devices can only mine Bitcoin, but they are highly efficient in doing so. They are so efficient that their introduction around 2013 made all other types of calculating mining devices obsolete almost overnight.
If you are looking to mine with common CPUs, GPUs or more advanced FPGAs, you will need to look into other coins. Although these devices can mine Bitcoin, they do so at such a slow pace that it’s just a waste of time and electricity.
For reference, the best graphics card available just before the rise of ASICs, the AMD 7970, produced 800 million hashes per second. Now, an average ASIC produces 100 trillion hashes per second — a 125,000-fold difference.
The number of hashes produced in a second is commonly referred to as the “hash rate” and it is an important performance measurement for mining devices.
Two other factors should be considered when purchasing a Bitcoin mining device. One is the electricity consumption, measured in watts. Between two devices that produce the same number of hashes, the one that uses the least electricity will be more profitable.
The third measure is the unit cost for each device. It is pointless to have the most energy-efficient ASIC in the world if it takes 10 years to pay itself back through mining.
Bitcoin has a fairly vibrant ecosystem of ASIC manufacturers, which often differ on these three parameters. Some may produce more efficient but also more expensive ASICs, while others make lower-performing hardware that comes at a cheaper price. Before analyzing which device is best suited for your needs, it is important to understand the other factors influencing profits from Bitcoin mining.
The economics of mining Bitcoin
Like the real estate business, Bitcoin mining is all about location, location, location. Different places in the world will have a different average price of electricity. Residential electricity in many developed countries is often far too expensive for mining to be financially viable.
With the price of electricity often ranging between $0.15 and $0.25 per kilowatt-hour, Bitcoin mining in residential areas runs too high a bill to remain consistently profitable.
Professional Bitcoin miners will often place their operations in regions where electricity is very cheap. Some of these include the Sichuan region in China, Iceland, the Irkutsk region in Russia, as well as some areas in the United States and Canada. These regions will usually have some form of cheap local electricity generation such as hydroelectric dams.
The prices enjoyed by these Bitcoin miners will often be below $0.06 per KWh, which is usually low enough to turn a profit even during market downturns. In general, prices below $0.10 are recommended to maintain a resilient operation. Finding the right location for mining is largely dictated by one’s circumstances. People living in developing countries may not need to go further than their own home, while those in developed countries are likely to have higher barriers to entry.
Is Bitcoin mining profitable?
Aside from the choice of hardware, an individual miner’s profit and revenue depend strongly on market conditions and the presence of other miners. During bull markets, the price of Bitcoin may skyrocket higher, which results in the BTC they mine being worth more on a dollar basis.
However, positive inflows from bull markets are counterbalanced by other Bitcoin miners seeing the increased profits and purchasing more devices to tap into the revenue stream. The result is that each miner now generates less BTC than before.
Eventually, the revenue generated trends toward an equilibrium point where less efficient miners begin to earn less than they spend on electricity, thus shutting devices off and allowing others to earn more Bitcoin.
Usually, this does not happen instantaneously. There is a certain lag, as ASICs can sometimes not be produced quickly enough to make up for the increase in Bitcoin price.
In a bear market, the opposite principle holds: Revenue is depressed until miners begin to turn off their devices en masse. To avoid being outcompeted, existing Bitcoin miners must find a winning combination of location and hardware that would allow them to maintain their edge. They must also constantly maintain and reinvest their capital, as more efficient hardware can throttle older miners’ profits completely.
Comparison of mining hardware profitability
There are several calculators online on websites such as AsicMinerValue, CryptoCompare and Nicehash, where the profitability of a mining device can be quickly checked. It’s also possible to estimate profit manually with the following formula:
This is the formula that many of these calculators use, and it simply represents your share of the overall hash rate divided by the network’s total issuance in dollars. The input values required are either fixed parameters (the block time for Bitcoin is 10 minutes, so there are six blocks mined in an hour and 144 in a day), or they can be found on data websites like Blockchain.com or Coinmetrics.
To find the profit, one also needs to subtract the cost of electricity. Thanks to the equivalence between kilowatts and kilowatt hours, this can be as simple as multiplying the device’s power usage by 24 hours in a day and the electricity price per kilowatt hour.
Below is a table illustrating major ASICs currently on the market and their payback period — that is, how long it would take for the investment to break even on current revenues. It’s worth noting that a Bitcoin miner’s profit fluctuates wildly over time, and extrapolating a single day into the future can lead to inaccurate results. Nonetheless, it’s a useful metric to understand the relative effectiveness of each device.
As can be seen in the table, none of the ASICs turn a profit at prices of $0.20 per KWh. The relative performance is mostly the same for each of the new-generation ASICs, while older models can be an attractive proposition if electricity is cheap.
For example, the Canaan AvalonMiner 1066 has low energy efficiency but also a very low price, making it fairly competitive at the low electricity price bracket despite being a fairly old model. The Bitmain S17 Pro, a previous-generation ASIC, still holds its ground due to its lower cost, but quickly becomes unattractive when the reference electricity price rate is raised. MicroBT’s devices appear to have the most balanced performance overall for mining.
One final issue to consider is that this table was compiled in a bull market. Profits may be higher than average, though the halving of 2020 is still fresh and may counterbalance the effect with lower Bitcoin issuance.
Buying and setting up the hardware
Several shops sell ASICs to retail customers, while some manufacturers also allow direct purchases. Though they are more difficult to source than common graphics cards, it is still possible for anyone to buy an ASIC at an acceptable price. It is worth noting that buying mining equipment from shops or manufacturers shipping from foreign countries may result in hefty import dues.
Depending on the manufacturer or the shop, ASICs may be offered without a power supply unit, which will then need to be purchased separately. Some ASIC manufacturers sell their own units, but it is also possible to use PSUs built for servers or gaming computers, though they are likely to require special modifications.
ASICs need to be connected to the internet via an ethernet cable, and they can only be configured through a web browser by connecting to the local IP address, similar to a home router.
Before carrying on, it is necessary to set up an account with a mining pool of choice, which will then provide detailed information on how to connect to its servers. From the ASIC’s web panel, you need to insert the pool’s connection endpoints and account information. The miner will then begin working and generating Bitcoin.
Mining through an established pool is strongly advised, as you will be able to generate constant returns by pooling your hardware with others. While your device may not always find the correct hash to create a block, your mining contribution will still be rewarded.
Considerations and risks of Bitcoin mining
In addition to the financial risk of not turning a profit, there are technical risks involved in managing high-power devices such as ASICs. Proper ventilation is required to avoid the mining equipment burning out components due to overheating. The entirety of the miner’s electricity consumption is dissipated into its environment as heat, and one ASIC is likely to be the single-most powerful appliance in your home or office.
That also means you need to carefully consider the limits of your electrical grid when Bitcoin mining. Your home’s electricity network is rated up to a maximum level of power, and each socket has its own rating too. Exceeding those limits could easily result in either frequent outages or electrical fires. Consult an expert to determine whether your Bitcoin mining setup is safe.
Regular maintenance against dust and other environmental factors is also required to keep the mining devices healthy. While failures are relatively rare, ASICs can go out of commission earlier than expected without proper maintenance.
While single ASICs may fail, the largest threat to their profitability is the prospect that they may become obsolete. More efficient miners will eventually crowd out older devices.
Historic generations of miners like the Bitmain S9, released around 2016, lasted approximately four years before becoming unprofitable under any electricity price configuration (except zero). However, the speed of advances in computing technology is largely unpredictable.
Bitcoin mining is no exception to any other venture. There is potential for rewards as well as risks. Hopefully, this guide provided a decent starting point to further evaluate both.