What are Hash Functions?
A cryptographic hash function is an essentially one-way encryption without a key. It takes an input and returns a seemingly random, but fixed length hash value.
For example, if you use Movable Type’s SHA-256 Cryptographic Hash Algorithm:
Message: How does mining work?
Hash Value: 46550fef 26f87ddd 5e15407f 45a0b8d2 9513291c 4e0f0acc 24a974de 907a1569
If you change even one letter of the original input, a completely different hash value will be returned. This randomness makes it impossible to predict what the output will be.
How Are Hash Functions Useful For Bitcoin?
Because it is practically impossible to predict the outcome of input, hash functions can be used for proof of work and validation. Bitcoin miners will compete to find an input that gives a specific hash value (a number with multiple zeros at the start). The difficulty of these puzzles is measurable. However, they cannot be cheated on. This is because there is no way to perform better than by guessing blindly.
The aim of mining is to use your computer to guess until it comes up with a hash value that is less than whatever the target may be. If you are the first to do this, then you have mined the block (normally this takes millions and billions of computer generated guesses from around the world). Whoever wins the block will get a reward of 12.5 bitcoins (as long as it becomes part of the longest blockchain). The winner doesn’t technically make the bitcoin, but the coding of the blockchain algorithm is set up to reward the person for doing the mining and thus helping to verify the blockchain.
Each block is created in sequence, including the hash of the previous block. Because each block contains the hash of a prior block, it proves that it came afterward. Sometimes, two competing blocks are formed by different miners. They may contain different transactions of bitcoin spent in different places. The block with the largest total proof of work embedded within it is chosen for the blockchain.
This works to validate transactions because it makes it incredibly difficult for someone to create an alternative block or chain of blocks. They would have to convince everyone on the network that theirs is the correct one, the one that contains sufficient proof of work. Because everyone else is also working on the ‘true’ chain, it would take a tremendous amount of CPU power to beat them. One of the biggest fears of Bitcoin is that one group may gain 51% control of the blockchain and then be able to influence it to their advantage, although thankfully this has been prevented so far.
Who Are Bitcoin Miners?
Initially, bitcoin miners were just cryptography enthusiasts. People who were interested in the project and used their spare computer power to validate the blockchain so that they could be rewarded with bitcoin. As the value of bitcoin has gone up, more people have seen mining as a potential business, investing in warehouses and hardware to mine as many bitcoin as possible.
These warehouses are generally set up in areas with low electricity prices, to further reduce their costs. With these economies of scale, it has made it more difficult for hobbyists to profit from Bitcoin mining, although there are still many who do it for fun.
Bitcoin Mining: What You Need
First, you need a bitcoin wallet. Each wallet has its own unique bitcoin address. This wallet is basically an encrypted online bank account that holds your reward during the mining process. In addition to the wallet, you also need the right tools – and those tools have changed significantly over the past few years. Here is a quick breakdown.
CPU/GPU bitcoin mining. During the early years, miners relied on simple CPUs to mine bitcoins. At the time, these basic desktops were powerful enough to complete the required tasks. But later on, cracking the codes became harder, and miners found a more robust alternative: GPU mining on graphic cards.
GPUs were nearly 100 times faster than CPUs, and when it comes to bitcoin mining, faster translates to greater success. GPUs could also be used to mine a variety of cryptocurrencies, not just bitcoins. But as time progressed, faster and even more robust options emerged, and many miners do not use these options today.
FPGA bitcoin mining: A field-programmable gate array (FPGA) enables mining hardware manufacturers to purchase chips in volume and customize them for bitcoin mining prior to putting them into their equipment. Since this technology is customized specifically for the task of bitcoin mining, it usually performs much better than CPUs and GPUs.
ASIC bitcoin mining: Application-specific integrated circuits (ASICs) are the newest thing in bitcoin mining. They’re designed to provide mining power at crushing speeds and use very little electricity – which is a bonus for miners with high electricity bills slowly eating away profits.
These chips, however, must be designed for the specific task, which does make them time consuming and expensive to produce. Yet many bitcoin miners find the investment is worth the speed. In fact, ASIC devices can run up to 2 terahashes/sec.
Key takeaway: Much of the hardware used in the early days is no longer relevant for bitcoin mining; it’s simply too slow. However, newer options have a large price tag. There is a third option that reduces cost while increasing speed (more on that in a minute).
Depending on what type of equipment is selected, you also need software to make it work. If using GPUs and FPGAs, a host computer is needed that runs a standard bitcoin client and the mining software. Here’s a breakdown of each and their roles.
Standard bitcoin client: This type of software allows you to interact with the bitcoin clients. Basically, it relays data between the miner and the bitcoin network.
Bitcoin mining software: The bitcoin mining software is at the heart of successful cryptocurrency mining because it tells the hardware to do the hard work, passing along transaction blocks to solve. Most of the time, you’ll need software for the ASIC miner as well, but manufacturers of some new models say they don’t require it.
All this equipment and software can make the cost of mining bitcoin add up. In the previous example, Eric, who earned $191,000 through bitcoin mining, estimates that he spent $50,000 in graphic cards, CPUs, circuit boards and memory. He also deployed water-cooling technology to run his mining operation at optimal efficiency. These costs do not include electricity, which can add up quickly.
Collectively, miners are estimated to use about 3,176 megawatt hours of electricity per day. With mining becoming increasingly difficult and expensive, many miners are joining pools to ease the expense and workload.
Key takeaway: Bitcoin software helps the hardware do what is required to mine bitcoins, making it a crucial piece of the mining setup.
Bitcoin Mining Hardware
Odds are your PC already has the necessary hardware to run as a bitcoin miner and to setup your PC for bitcoin mining should ultimately be a snap, albeit not with any speed when compared with modern purpose built bitcoin miners. Just as Intel and AMD are making faster processers each year, bitcoin miners have evolved from their humble days as just running using the power of your graphics card to current day Application-specific integrated circuit (ASIC) miners which boast up to a few terahashes per second. If you are just trying bitcoin mining out of curiosity, then there is no need to buy any additional hardware. If you are serious about it, however, then there will be some significant initial investment to be made to get your operation started. ASIC miners range from $200 to $1000 or more per unit, and to reach a hashrate that is profitable you will need to invest in many machines. A single ASIC miner is more of a curiosity than anything as the return per month can range from 0.2 bitcoins on the low end and 0.4 bitcoins or more on the high end. This calculates to a range of about $35 per month to $100 per month, before accounting for energy costs. So, just from some initial calculation you can see that the limiting factor on making a profit from mining is definitely your energy bill. The ideal setup for bitcoin mining will ultimately be such that you are able to pay off your initial investment in hardware and monthly energy bill in a reasonable amount of time. No one wants to wait years for an investment to pay off if it even will, so taking these costs into consideration is a must.
Popular hardware for bitcoin mining is primarily focused in a handful of brands. BITMAIN makes the very popular AntMiner, which is a very efficient ASIC miner and usually sells out of units quickly. Top of the line AntMiner machines can churn out more than 12 terahashes per second put come at a cost of more than $1,500 brand new. Avalon is also another popular miner, but comes at higher price on average.If you are sourcing hardware while on the cheap it may be worth your while to buy used hardware. As mentioned earlier, profitability has diminished and along with that the hardware that was once top of the line has come down in price as it is surpassed by newer units and is less profitable due to the rising difficulty of mining.
What Is Bitcoin Mining Pools
Remember when we talked about the expense and cost of bitcoin mining, and another option that lowers that cost? Mining pools provide one such solution. These pools formed when mining became more difficult and it could take years for slow miners to generate a single block. They needed a method that would help pick up speed, without too much expense.
Miners decided that if they pooled resources and joined forces, they could generate blocks faster and receive block rewards on a more consistent basis, rather than every few years. However, all mining pools are not created equal, and they use a variety of operational methods. Here are a couple of examples:
Pay-per-share: This method offers instant payout for each share that is solved by a miner. Payment is made from the pool’s balance and a miner can withdraw his or her money immediately. This method offers low risk for miners and transfers a large amount of the risk to the pool’s operator.
Proportional: This method allows miners to earn shares until the pool finds a block (which is basically the end of the mining round). After that, each user gets a set number of shares within the round, based on a specific formula.
Bitcoin pooled mining: This is known as a “slush system” because older shares from the beginning of a block are given less weight than more recent shares. This method minimizes the risk of cheating the mining pool system by switching pools during a round for maximized profit.
This isn’t a complete list of methods, but it shows that before joining a pool, it’s important to do a little research on the payout method used. Ask a few questions, such as how do they calculate payments? What is the method they use? And how long has the pool been in existence? Getting answers to these questions will help you better understand the best option for your situation.
Key takeaway: More people are mining for bitcoins, and the mining is getting more difficult. It’s harder today than several years ago to uncover the “gold” because as more people get involved the bitcoin difficulty rises. Mining pools make the task easier by allowing miners to pool their resources for greater efficiency.
Some Fact About Bitcoin
|Total Bitcoins in circulation:
|Total Bitcoins to ever be produced:
|Percentage of total Bitcoins mined:
|Total Bitcoins left to mine:
|Total Bitcoins left to mine until next blockhalf:
|Bitcoin price (USD):
|Market capitalization (USD):
|Bitcoins generated per day:
|Bitcoin inflation rate per annum:
|Bitcoin inflation rate per annum at next block halving event:
|Bitcoin inflation per day (USD):
|Bitcoin inflation until next blockhalf event based on current price (USD):
|Blocks until mining reward is halved:
|Total number of block reward halvings:
|Approximate block generation time:
|Approximate blocks generated per day: