Bitcoin mining

AGnq...31Gz
1 Feb 2024
20

What Is Bitcoin Mining?

Bitcoin mining is the process by which transactions are verified on the blockchain. It is also the way new bitcoins are entered into circulation. "Mining" is performed using hardware and software to generate a cryptographic number that matches criteria. The first miner to find the solution to the problem receives the bitcoin reward and the process begins again.


The bitcoin reward that miners receive is an incentive that motivates people to assist in the primary purpose of mining: to legitimize and monitor Bitcoin transactions, ensuring their validity. Before you invest the time and equipment, read this explainer to see whether mining is really for you.

KEY TAKEAWAYS

  • Bitcoin miners receive bitcoin as a reward for completing "blocks" of verified transactions, which are added to the blockchain.
  • Mining rewards are paid to the miner(s) who discovers a solution, and the probability that a participant will be the one to discover the solution is related to the portion of the network's total mining power.
  • You need either a graphics processing unit (GPU) or an application-specific integrated circuit (ASIC) in order to set up a mining rig.

 Throughout, we use "Bitcoin" with a capital "B" when referring to the network or the cryptocurrency as a concept, and "bitcoin" with a small "b" when we're referring to a quantity of individual tokens.

Why Bitcoin Needs Miners

Blockchain "mining" is a metaphor for the computational work that network nodes undertake to validate the information contained in blocks. So, in reality, miners are essentially getting paid for their work as auditors. They are doing the work of verifying the legitimacy of Bitcoin transactions and being rewarded for it. This convention is meant to keep Bitcoin users honest and to prevent the problem of "double-spending." 


Double spending is a scenario in which a Bitcoin owner spends the same bitcoin twice. With physical currency, this isn't an issue: When you hand someone a $20 bill to buy a bottle of vodka, you no longer have it, so there's no danger you could use that same $20 bill to buy lotto tickets next door. Counterfeit cash is possible, but it is not the same as spending the same dollar twice.


Only 1 megabyte of transaction data can fit into a single Bitcoin block. The 1MB limit was set by the creators. This limit has become controversial because some miners believe the block size should increase to accommodate more data, which would effectively mean that the Bitcoin network could process and verify transactions more quickly.

Why Mine Bitcoin?

In addition to supporting the Bitcoin ecosystem, mining serves another vital purpose: it is used to release new cryptocurrency into circulation.


But in the absence of miners, Bitcoin as a network would still exist and be usable, but there would be less incentive to participate. Sometime around 2140, there will be no more bitcoin rewarded. This does not mean that transactions will cease to be verified or that there won't be rewards. Miners will continue to verify transactions and be paid transaction fees to keep the integrity of Bitcoin's network.1

How Much Is the Reward?

The rewards for Bitcoin mining are reduced by half roughly every four years.2
 When Bitcoin was first mined in 2009, mining one block would earn you 50 BTC. In 2012, this was halved to 25 BTC. By 2016, this was halved again to 12.5 BTC. On May 11, 2020, the reward halved again to 6.25 BTC. The reward will halve again to 3.125 BTC sometime in 2024.

Image by Sabrina Jiang © Investopedia 2021
On Oct. 18, 2023, the Bitcoin's price was around $28,400, which meant one block would award about $177,500.3


 If you want to estimate how much bitcoin you could mine with your rig's hash rate, the mining pool NiceHash offers a helpful calculator on its website.4
 Other web resources provide similar tools.

What You Need to Mine Bitcoins

It is still possible to participate in Bitcoin mining with a regular at-home personal computer if you have some of the latest and fastest hardware, but you still might only make a few cents per day. The reason for this is that Bitcoin mining difficulty changes over time.


To ensure the blockchain functions smoothly and can process and verify transactions, the Bitcoin network aims to have one block produced every 10 minutes or so. Bitcoin is designed to evaluate and adjust the mining difficulty every 2,016 blocks or roughly every two weeks (based on the number of participants).2

Mining Hardware

To be able to mine, you'll need to invest in one of the top graphics processing units (GPUs, often called video cards) for your computer or an application-specific integrated circuit (ASIC). Capable GPUs can range in price from about $1,000 to $2,000; ASICs can cost much more, into the tens of thousands of dollars.
Today, most of the Bitcoin mining network's hashing power is almost entirely made up of ASIC machine mining farms and pooled individual miners. Today's ASICs are many orders of magnitude more powerful than CPUs or GPUs and gain more hashing power and energy efficiency every year as new chips are developed and deployed. For the right price (more than $11,000), you could mine at 335TH for 16.0 joules per tera hash.5
 There are much more affordable versions, but the more you pay, the faster you can hash.6


The Mining Process

Mining is a complex process, but in a nutshell, transactions are entered into blocks on the blockchain. The block is assigned some information, and all of the data in the block is put through a cryptographic algorithm (called "hashing"). It gets a 64-digit hexadecimal number (called a hash), which is part of what miners are solving for.

The Hash

Here is an example of a hash: 

0000000000000000057fcc708cf0130d95e27c5819203e9f967ac56e4df598ee


The number above has 64 digits. As you probably noticed, that number consists not just of numbers but also letters. Why is that?
The decimal system uses factors of 100 as its base (e.g., 1% = 0.01). This, in turn, means that every digit of a multi-digit number has 100 possibilities, zero through 99. In computing, the decimal system is simplified to base 10, or zero through nine.
"Hexadecimal," on the other hand, means base 16 because "hex" is derived from the Greek word for six, and "deca" is derived from the Greek word for 10. In a hexadecimal system, each digit has 16 possibilities. But our numeric system only offers 10 ways of representing numbers (zero through nine). That's why you have to add letters—specifically, the letters A, B, C, D, E, and F.

Image by Sabrina Jiang © Investopedia 2021

Target Hash and Nonce 

What miners are doing with their mining rigs is guessing a number that is lower than the target hash. The target hash is a hexadecimal number set higher than that of the hashes being solved.


Miners make these guesses by generating as many hashes and "nonces" as possible. Nonce is short for "number only used once," and the nonce is the key to generating these 64-bit hexadecimal numbers (called the hash). When information is hashed, it always produces the same hash unless something changes. So, miners generate a random hash and use zero as the first nonce. If that number is wrong, one is added to the nonce, and the random hash is generated again. This continues until a hash that matches the block hash and is less than the target hash is generated.


The screenshot below, taken from the site Blockchain.info, might help you put all this information together at a glance. You are looking at a summary of everything that happened when block No.490163 was mined. The nonce that generated the "winning" hash was 731511405 (remember, the nonce starts at zero, and one is added every attempt). The target hash is shown on top. The term "Relayed by AntPool" refers to the fact that this particular block was completed by AntPool, one of the more successful mining pools.
As you see here, the contribution to the Bitcoin community is that the pool confirmed 1,768 transactions for this block. If you really want to see all 1,768 transactions for this block, go to this page and look through the Transactions section.



Blockchain.info
Here are some examples of randomized hashes and the criteria for whether they would lead to success for the miner:

Note: These are made-up hashes.Image by Sabrina Jiang © Investopedia 2021

What Are Mining Pools?

The miner who discovers a solution to the puzzle first receives the mining rewards and the probability that a participant will be the one to discover the solution is equal to the proportion of the total mining power on the network. 
Participants with a small percentage of the mining power stand a very small chance of discovering the next block alone. For instance, a card you can purchase for a couple of thousand dollars would represent less than 0.001% of the network's mining power. With such a slight chance of finding the next block, it could be a long time—if ever—before you solve a hash because it's all about how many hashes per second your machine can generate. You may never recoup your investment. The answer to this problem is mining pools. 
Mining pools are operated by third parties and coordinate groups of miners. By working together in a pool and sharing the payouts among all participants, miners have a better chance of being rewarded than alone. Statistics on some of the mining pools can be seen on Blockchain.info.
 Most pools use a payout system based on how much work you contribute. For instance, if you have a GPU providing 121 mega (million) hashes per second and the pool has a total hash rate of 121 exa (quintillion) hashes per second, your reward would be based on the shares of work you contributed (and be very small).

Downsides of Mining 

The risks of mining are often financial and regulatory. As mentioned, Bitcoin mining, and mining in general, is a financial risk because one could go through all the effort of purchasing hundreds or thousands of dollars worth of mining equipment only to have no return on their investment.
If you are considering mining and live in an area where it is prohibited, you should reconsider. It may also be a good idea to research your country's regulatory stance and overall sentiment toward cryptocurrency before investing in mining equipment.
Another potential risk from the growth of Bitcoin mining (and other PoW systems) is the energy usage required by the computer systems running the mining algorithms. Though microchip efficiency has increased dramatically for ASIC chips, the growth of the network itself is outpacing technological progress. As a result, there are concerns about Bitcoin mining's environmental impact and carbon footprint.7
 Mining equipment also generates a lot of heat, so your cooling bill will likely increase—especially if you have one or more ASICs running 24 hours daily.

There are, however, efforts to mitigate this negative externality by seeking cleaner and green energy sources for mining operations (such as geothermal or solar sources) and utilizing carbon offset credits. Switching to less energy-intensive consensus mechanisms like proof-of-stake (PoS), which Ethereum has transitioned to, is another strategy; however, PoS comes with its own set of drawbacks and inefficiencies, such as incentivizing hoarding instead of using coins and a risk of centralization of consensus control.

Why Do Bitcoins Need to Be Mined?

Because they are entirely digital records, there is a risk of copying, counterfeiting, or double-spending the same coin more than once. Mining solves these problems by making it extremely expensive and resource-intensive to try to do one of these things or otherwise "hack" the network. Indeed, joining the network as a miner is far more cost-effective than trying to undermine it.

How Does Mining Confirm Transactions?

In addition to introducing new BTC into circulation, mining serves the crucial role of confirming and validating new transactions on the Bitcoin blockchain. This is important because there is no central authority such as a bank, court, government, or other third party determining which transactions are valid and which are not. Instead, the mining process achieves a decentralized consensus through proof of work (PoW).

Why Does Mining Use So Much Electricity?

In the early days of Bitcoin, anybody could simply run a mining program from their PC or laptop. But as the network grew and more people became interested in mining, the algorithm became more difficult. This is because the code for Bitcoin targets finding a new block once every 10 minutes, on average.2
 If more miners are involved, the chances that somebody will solve the hash quicker increases, so the difficulty increases to restore that 10-minute goal. Now imagine if thousands, or even millions more times that mining power joins the network. That's a lot of new machines consuming energy.

Is Bitcoin Mining Legal?

The legality of Bitcoin mining depends entirely on your geographic location. The concept of Bitcoin can threaten the dominance of fiat currencies and government control over the financial markets. For this reason, Bitcoin is completely illegal in certain countries, such as Tunisia, Algeria, Nepal, Morocco, Bangladesh, and China. Bitcoin ownership and mining are legal in more countries than not.8

Does Crypto Mining Damage Your GPU/Computer?

Because blockchain mining is very resource-intensive, it can put a large strain on your GPU or other mining hardware. In fact, it is not unheard of for GPUs to wear out or for mining rigs to burst into flames.9
 But if you keep your rigs clean and cool with a surge protector, they're generally safe.

Can You Mine Bitcoin on Your iPhone?

No. Bitcoin mining today requires vast amounts of computing power and electricity to be competitive. Running a miner on a mobile device, even if it is part of a mining pool, will likely result in no earnings.

The Bottom Line

Bitcoin "mining" serves a crucial function to validate and confirm new transactions on the blockchain and to prevent double-spending by bad actors. It is also the way that new bitcoins are introduced into the system. It is possible to mine on various hardware and machines, but to truly be profitable and competitive, you'll need to join a mining pool.
Compete Risk Free with $100,000 in Virtual Cash
Put your trading skills to the test with our FREE Stock Simulator. Compete with thousands of Investopedia traders and trade your way to the top! Submit trades in a virtual environment before you start risking your own money. Practice trading strategies so that when you're ready to enter the real market, you've had the practice you need. Try our Stock Simulator today >>


ARTICLE SOURCES

Compare Accounts
Advertiser Disclosure



PART OF
Bitcoin Basics

Related Articles

What Is Bitcoin Mining?

Nonce: What It Means and How It's Used in Blockchain



Is Bitcoin Mining Profitable?

How Do You Mine Litecoin (LTC)?



What Is Block Time? What It Measures, Verification, and Example

What Is Bitcoin? How to Mine, Buy, and Use It
Related Terms
What Is Bitcoin Mining?
Breaking down everything you need to know about Bitcoin mining, from blockchain and block rewards to proof of work and mining pools. more
Nonce: What It Means and How It's Used in Blockchain
A nonce is an encrypted number uniquely identifying a block in a blockchain. Miners rush to decipher the nonce to generate new blocks, confirm transactions, and enhance network security. more
What Is Block Time? What It Measures, Verification, and Example
Block time, in the context of cryptocurrency, is the average amount of time it takes for a new block to be added to a blockchain. more
What Is Bitcoin? How to Mine, Buy, and Use It
Bitcoin (BTC) is a digital or virtual currency created in 2009 that uses peer-to-peer technology to facilitate instant payments. more
Mining Pool: Definition, How It Works, Methods, and Benefits
A mining pool is a group of cryptocurrency miners who combine their computational resources over a network. more
What Is Bitcoin Halving? Definition, How It Works, Why It Matters
Bitcoin halving explained. Find out about Bitcoin's halving process works and what it means for Bitcoin's price and its users. more








Investopedia is part of the Dotdash Meredith publishing family.

Please review our updated Terms of Service.



Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to Adeolami

0 Comments