Mining is an integral component of the security of Proof of Work blockchains. By computationally processing hashes with certain properties, participants are able to protect cryptocurrency networks without the need for a central authority.
When Bitcoin was originally launched in 2009, anyone with an ordinary PC could compete against other miners trying to guess the valid hash of the next block. This was because the difficulty of mining was low. There was not much hash rate on the network. Therefore, you didn't need specialized hardware to add new blocks to the blockchain.
Logically, computers that could compute more hashes per second would find more blocks. And this would cause a major shift in the ecosystem. Struggling to find a competitive advantage, miners would eventually enter a sort of "arms race."
After iterating through different types of hardware (CPUs, GPUs, FPGAs), Bitcoin miners would end up adopting ASICs - Application Specific Integrated Circuits. These mining devices don't allow you to browse through Decentra University or tweet cat pictures.
As their name suggests, ASICs are made to perform a single task: computing hashes. But having been designed for this specific purpose, they do it incredibly well. So well, in fact, that using other hardware to mine Bitcoin has become quite infrequent.
WHAT IS A MINING POOL?
Good hardware will only help you so much. You could have several high-powered ASICs running, and you'd still be just a drop in the ocean of Bitcoin mining. The chances of you ending up mining a block are pretty slim, even if you've spent a lot of money on hardware and the electricity needed to get it up and running.
There are no guarantees as to when you'll get paid a block reward, or even if you'll ever get paid at all. If a steady income is what you are looking for, you will be much more successful in a mining pool.
Let's say you and nine other participants each have 0.1% of the total hash power of the network. This means that, on average, you would expect to find one out of every thousand blocks. Based on an estimate of 144 blocks mined per day, you would probably find one block every week. Depending on your liquidity and investment in hardware and electricity, this "solo mining" approach could be a viable strategy.
However, what if this income is not enough to generate profits? In such a case, you could join forces with the other nine participants mentioned above. If you all combined your hashing power, you would have 1% of the hash rate of the network. This means that you would find, on average, one out of every hundred blocks - that is, an estimated one to two blocks per day. You could then split the reward and share it among all the miners involved.
In short, we have just described what a mining pool is. These are widely used today because they guarantee their members a more constant income stream.
HOW DO MINING POOLS WORK?
Typically, a mining pool designates a coordinator who will be in charge of organizing the miners. The coordinator will make sure that the miners use different values for the nonce, so that they do not waste hash power trying to create the same blocks. The coordinators are also responsible for dividing the rewards and paying them to the participants. To calculate the work done by each miner and reward them accordingly, a number of different methods are used.
PAY-PER-SHARE (PPS) MINING POOLS
One of the most typical reward systems is the Pay-Per-Share (PPS). In this system, you receive a fixed amount for each "share" you have submitted.
A Share is a hash used to track the work of each miner. The amount paid for each share is nominal but accumulates over time. Note that a share is not a valid hash within the network. It is simply one that matches the conditions set by the mining pool.
In PPS, you are rewarded whether or not your pool solves a block. The pool operator assumes the risk, so it will likely charge a hefty fee, either upfront from users or from the eventual block reward.
PAY-PER-LAST-N-SHARES MINING POOLS (PPLNS)
Another popular scheme is Pay-Per-Last-N-Shares (PPLNS). Unlike PPS, PPLNS only rewards miners when the pool successfully mines a block. When the pool finds a block, it checks the last N number of shares sent (N varies by pool). To get your payout, you divide the number of shares you have sent by N, then multiply the result by the block reward (minus the operator's cut).
Let's take an example. If the current block reward is 12.5 BTC (assuming no transaction fees) and the operator fee is 20%, the reward available to miners is 10 BTC. If N was 1,000,000,000 and you provided 50,000 shares, you will receive 5% of the available reward (or 0.5 BTC).
You can find several variations of these two schemes, but these are the ones you will hear most often. Keep in mind that while we're talking about Bitcoin, the most popular PoW cryptocurrencies also have mining pools. Some examples include Zcash, Monero, Grin and Ravencoin.
ARE MINING POOLS A THREAT TO DECENTRALIZATION?
Alarm bells may be ringing in your head as you read this article. Isn't the reason Bitcoin is so powerful because no one entity controls the blockchain? What happens if someone gets the lion's share of hashing power?
These are very valid questions. If a single entity can acquire 51% of the hashing power of the network, they can launch a 51% attack. That would allow them to censor transactions and reverse old ones. Such an attack can cause massive damage to a cryptocurrency ecosystem.
Do mining pools increase the risk of a 51% attack? The answer is: maybe, but not likely.
In theory, the four main pools could collude to hijack the network. However, that wouldn't make much sense. Even if they succeeded in carrying out an attack, the price of Bitcoin would likely plummet as their actions would undermine the system. As a result, the coins they have acquired would lose value.
In addition, pools do not necessarily own the mining equipment. Entities point their machines to the coordinator's server but are free to migrate to other pools. It is in the best interest of participants and pool operators to keep the ecosystem decentralized. After all, they only make money if mining remains profitable.
There have been a few occasions where pools have grown to what could be considered a worrisome size.
In general, the pool (and its miners) takes steps to reduce the hash rate.
The cryptocurrency mining landscape changed forever with the introduction of the first mining pool.
They can be very beneficial for miners who want to get a more consistent payout. With many different schemes available, they are sure to find the one that best suits their needs.
In an ideal world, Bitcoin mining would be much more decentralized. At the moment, however, it is what we might call "decentralized enough." In any case, no one benefits from a single pool getting the majority of the hash rate in the long run. Participants are likely to prevent it from happening; after all, Bitcoin is not managed by miners, but by users.