In this article, we learn about mining pools, a pooling of resources by miners to achieve PoW and share in the reward proportional to their contributions.
Table of contents.
- Mining Pools.
- Managed Pools.
- P2P Pools.
- Sharing rewards.
In the prerequisite article, we learned about Bitcoin's hashing race and looked at various graphs depicting the exponential growth of the difficulty and the hashing rate since Bitcoins conception back in 2009.
We saw how competitive the mining industry is. Miners need huge amounts of computational power to be able to compete in this industry. This means that they have to invest in high-end computers such as ASIC miners which are not cheap.
Additionally, a single miner is not enough to be able to compete. Since Bitcoin's mining industry is at the edge of Moore's law, miners now focus on how many of these ASIC miners can they can fit in a warehouse, their heat dissipation, and consumption.
This means that to be able to compete effectively, one needs a lot of these miners a large enough room to store them, good heat dissipation, and huge amounts of electricity.
Mining Pools consist of a group of miners who pool their computing resources to solve the blockchain network cryptographic puzzle together and share the reward according to their contributions. They allow anyone, even those with a single miner to be able to compete in the very competitive world of Bitcoin mining.
In such a competitive industry an individual miner with limited capital cannot compete effectively with those with enough capital that translates into computational power. The chances of an individual miner with limited computational power to find a block to compensate for the electricity and hardware costs is very low and can be compared to gambling.
To keep up, individual miners collaborate to form mining pools whereby each miner contributes their hashing power and then shares in the reward. Miner participating in mining pools are rewarded daily when their mining pool is able to find the next block. This reduces the uncertainty in mining Bitcoin.
The chances of an individual miner finding a block are based on luck. It can take years for him/her to find a block. Considering that the mining rig is running 24 hours a day and consuming large amounts of electricity that is paid for could mean that the miner incurring huge losses of huge profits. All this depends on the reward and the current market price of Bitcoin. In addition to this, the Proof-of-Work algorithm increases in difficulty over time due to regulating the number of bitcoins released over time and keeping it to a 10-minute interval. This means the individual miner has at least a year to break even before the current hardware he/she is using is rendered obsolete and needs replacement. In the case of mining, having a single ASIC miner in the first year might not be enough for the next year. The miner will need to add to the current one to increase the computing power that gives him/her a chance to break even.
An individual miner stands a better chance of joining a mining pool where he/she can earn on a daily or weekly basis. Regular payouts from this pool mean that the miner can cover the hardware and electricity costs over time without taking a huge risk. Note that this does not keep the hashing rate at bay, it will still increase and more computing power will be needed to keep up.
Mining pools can have hundreds to thousands of miners over specialized pool mining protocols. Individual miners configure their mining rigs to connect to a pool server. A user account is needed. In exchange for the miner contributing mining power, he/she can share in the reward after the pool mines a block. In such cases, the reward is sent to the mining pool's wallet address. The pool server then distributes the reward according to the mining power contributes. The server also keeps a small percentage as its payment for providing the pool-mining services.
A mining pool sets a higher target(lower difficulty) for individual miners to earn shares for their contributions. In a mining pool, the puzzle is 1000 times easier than Bitcoin's specified puzzle. When a mining pool participant solves the puzzle, the reward is shared with the rest of the participants proportional to the computing power each contributes.
Mining pools are open to anyone willing to contribute mining power, meaning it can consist of a miner with a single miner to miners with high-end computers in a warehouse contributing significant mining power. This also means that different miners use different amounts of electricity for mining. To split reward proportional to the mining power each participant contributes, the PoW algorithm is used to measure each miner's contribution. As mentioned the algorithm has a lower difficulty to make sure even small miners earn rewards for their efforts. Now and then individual miners will solve the Bitcoins network puzzle and earn rewards for the entire pool.
These are mining pols that have centralized authority such as a company. The pool operator charges pool miners a small percentage of the earnings for maintaining the pool server.
The server runs specialized software that can coordinate the activities of the pool miner. The server is connected to Bitcoin network full nodes and therefore has direct access to a full copy of the blockchain at all times. This allows servers to validate blocks and transactions on behalf of the pool miner thereby relieving them from having to run full nodes that take up a lot of computational resources such as disk space and network bandwidth.
Pool miners in such an organization connect to the server using mining protocols such as Stratum or GetBlockTemplate. These blocks can create block templates containing a template of a candidate block. The server constructs candidate blocks by aggregating transactions, adding coin base transactions, calculating the Merkle roots, and linking the previous block hash. The candidate block header is sent to the block template that sends successful results back to the pool server to earn shares.
Managed pools a central authority meaning the pool operator can cheat by directing pool effort towards double-spending transactions or invalidating blocks. These also present a single point of failure, meaning if the pool is down or is facing a DDoS attack, miners cannot mine.
To avoid such issues P2P pools were introduced in 2011. These lack a central authority meaning that all pool server functions are decentralized, kind of like a parallel blockchain-like system referred to as a share chain.
A share chain enables collaboration between pool miners to be able to mine shares on the share chain at the rate of a single share block after every 30 seconds. Each block on the share chain records a proportionate reward for contributing miners carrying shares forward from previous share blocks.
When a share block achieves the bitcoins network target, it is propagated to all peers and included in Bitcoin's main chain thereby rewarding pool miners according to the contributed shares of each miner. In this case, instead of a pool server tracking pool miner shares and rewards, the share chain enables the miner to track all shares using a decentralized consensus mechanism.
This form of pool mining is complex since it requires miners to run dedicated computers. Miners connect their hardware to a local P2Pool node that simulates the functions of a pool server by sending block templates to the mining hardware. In this case, miners construct their own candidate blocks aggregate transactions and miners collaboratively on the share chain.
P2Pool reduces the concentration of power by mining pool operators however it is still vulnerable to a 51% attack whereby a centralized party managed 51% of the peers in the pool.
As we have said, miners in a mining pool after collectively solving the reward share it among themselves. In this section we look at the common ways the rewards are distributed among the miners;
PROP(Proportional Method) - Here all mining pool participants are rewarded Bitcoins proportional to their contributions(their share in the mining pool's total hashing power). Rewards are shared at the end of each mining round.
PPS(Pay-Per-Share) - Here every miner in the pool receives a fixed amount for every share they submit. The pool tracks a miner's work based on the shares they submit. Here miners don't have to worry about mining a block rather, the operator recognizes a miner's contributions are given shares.
PPLNS(Pay-Per-Last-N-Shares) - Here miners are rewarded shares when the pool succeeds in finding the nonce that solves the puzzle and earns the right to mine a block. After a new block is mined, the pool checks the last N shares submitted, and to calculate the reward the operators divides the number of a miner's shares by N and then multiplies the result by the block reward.
SMPPS(Shared-Maximum-Pay-Per-Share) - This is similar to PPS except it limits payouts to the maximum the pool has earned.
ESMPPS(Equalized-Shared-Maximum-Pay-Per-Share) - This is similar to SMPPS except it distributes rewards equally among all miners in the pool.
DGM(Double Geometric Method) - This is a hybrid between PPLNS and Geometric reward types. Here the operator absorbs the risk and receives payouts in short rounds then return it on longer rounds to normalize payments.
RSMPPS(Recent Shared Maximum Pay Per Share) - Here the pool pays the shares in the current round first and then pays the shares of the previous rounds thereby making this method hoppable whereby mining in long rounds results in delayed payments of the submitted shares.
POT(Pay on Target) - this is a high variance PPS whereby miners are paid on the difficulty of work returned to the pool instead of the difficulty of work served by the pool.
FPPS(Full Pay Per Share) - this is the same as PPS but divides the block reward and some transaction fees. It calculates the standard transaction fee within a period of time and distributes it to miners according to their contributions to the pool.
A single miner with a very powerful ASIC miner cannot compete with a warehouse full of ASIC miners locates close to a hydroelectric mining power plant. This results in miners with different amounts of computational power pooling their resources to form a pool that is large enough to compete in the hashing race.
Mining pools after solving the puzzle are rewarded by the procotol and share in the reward proportional to their contributions.
P2Pools increase the robustness of Bitcoin by diversifying the mining economy.