When it comes to mining cryptocurrencies, the words "miner" and "pool" cannot be literally translated as "miner" and "pool". They have already received their content in Russian. “Miner” is the one who mines bitcoins, and “pool” is a vital thing for mining cryptocurrency. The process of selecting a block signature, otherwise called mining, has a high computational complexity (difficulty). It is one of the most important parameters for the miner, since his income depends on the change in complexity. During the existence of Bitcoin, the complexity in the long term has been continuously growing, therefore, it is more and more difficult for the miner to calculate the block signature alone.

The Bitcoin network is built in such a way that the reward (first 50 BTC, then 25, and soon only 12.5 BTC) for a valid block signature is the only method of issuing a cryptocurrency. In addition to this fixed amount, the miner who found the block also receives the amount of commissions included in all transactions included in the block. Now these are tenths of bitcoin, but in the future, perhaps, the payment for transactions will exceed the emission component. While the difficulty was not high, there was a single, so-called "solo" mining. The solution to the computational problem could be obtained even on the processor of one computer, so each miner worked alone and himself received a reward in the form of a whole block. With increasing difficulty, solo mining is a thing of the past. Now, even with the most powerful specialized equipment, you can mine for years, but you still can't find a hash to sign a block - you need hundreds of such devices. Therefore, when Bitcoin gained popularity, the technology of joint mining appeared - the pooling of many independent miners.

## How the pool works

A mining pool is a server that distributes the task of calculating a block signature among all connected participants. The contribution of each of them is assessed using the so-called "share" (share), which are potential candidates for obtaining a precious signature. As soon as one of the "balls" hits the target, the pool announces the readiness of the block and distributes the reward.

## pool mining

When calculating the reward, all accepted balls are taken into account (there are nuances in some payment systems), regardless of whether the "ball" has turned into a block signature or not. This is what achieves a fair distribution of the mined coins. A miner with low power can work for a very long time without finding a single block, but at the same time he will receive his share of the total pie - he is paid for the probability that exactly one of his decisions will turn out to be correct. Sometimes it does happen. In this case, rejection of some balls inevitably occurs. Between 0.5% and 1.5% of potential results are lost due to stale share and inevitable technical errors. The "wage fund" of the miner is calculated as follows:

The pool sets the minimum difficulty for the ball that it takes. The value is usually an integer power of 2. It is chosen to minimize user traffic while maintaining a steady flow of decisions. For modern devices, the minimum accepted complexity is usually set in the range of 16-128, and the optimal operating value is in the range of 64-512. As a rule, this complexity is set manually by the miner or automatically selected by the server. It has nothing to do with the actual complexity of the network and is used only for internal accounting. Then, the pool sums up all the balls received from the user for a period of time and multiplies them by the set working complexity. Thus, it turns out as if the miner was sending balls of difficulty 1, but in a huge amount. This is the basic value for calculating the earnings of miners: the number of solutions of complexity 1 (Diff 1 shares). When the pool finds a block and receives a reward (25 BTC + commissions), the server divides this value by the number of balls of difficulty 1 received from all miners, and then for each miner multiplies by the sum of decisions made from him. After 120 confirmations of the found block, the pool gets the opportunity to dispose of the mined bitcoins and distributes the reward to the accounts or wallets of the miners minus its commission, if any. Large pools pay out faster, often upfront, is one way to attract more miners. When withdrawing from a pool, you should take into account the size of its commission, as well as the size of the commission for withdrawing funds.

## Block reward distribution

Each pool has its own rules and payout modes. For the service provided, the pool receives its share by paying the miners using one of thirteen systems. Basic reward systems.

## cryptocurrency mining

PROP (Proportional) is a proportional model, in which the block reward is divided strictly in proportion to the share sent by each miner. As soon as the block is found - the counter of accepted balls is reset and the counting starts from zero. This is the simplest system, but payouts are extremely volatile, especially for small pools. If a miner came and went during a "long" block, he will receive very little, and if he mined in a good period, he may receive a reward several times higher than the average by the calculator. PPLNS (Pay Per Last N Shares) - also proportional distribution, but smoother. One of the most difficult systems to understand, at the same time the most efficient for both the pool and stable miners. Payment is calculated for the number of balls sent not in the time elapsed between the two found blocks, but for a fixed number of certain time intervals, called "shifts" (shift). Each pool chooses the number and duration of "shifts" at its discretion.

Payments are made after the pool finds the next block. The amount of the reward is much less dependent on the time intervals between blocks. If the block is not found for a long time, then the payment rises smoothly, if the pool is lucky and the blocks are pouring out, as if from a cornucopia, then the payment for each separate block decreases, but during the N * duration_shift, the amount of payments remains more or less constant. Let's look at a simple example. The pool has a PPLNS system with 10 shifts, the duration of each is 1 hour. The hashrate of user devices is 1/100 of the total pool capacity. The miner begins to receive a full reward, similar to the proportional system, only after he has worked at full speed of his devices for more than 10 hours. If at the time of receiving a block by the pool, he mined only 1 hour - he will earn only 10% of his share with proportional distribution, if 3 hours - then 30%.

Seemingly pure robbery. But if the user stops working on the pool, then in the next 10 hours he will still receive a reward - after 3 hours - 70% of the "normal" share, after 5 hours - 50%, and so on. The accrual will stop completely after the same 10 hours. Let's say the pool found 3 blocks in 10 hours. In this case, the miner will receive 25 BTC * 3/100, that is, 0.75 BTC. If one block is found in 10 hours, then the actual income of the miner will be only 0.25 BTC. But, unlike the PROP system, the balls "accumulated" by it are counted for another 10 hours, and if several more blocks are quickly mined, they will compensate for the unfortunate period. That is, the PPLNS system smooths out the influence of the factor of randomness, but cannot completely eliminate it. It is best suited for miners who are constantly working on the same pool. Another advantage is low or zero commissions, since the pool does not bear risks to users, paying only what is actually mined. Some pools include in the distribution and commissions received for conducting transactions. PPLNS has several flavors that do not fundamentally change the schema. PPS (Pay Per Share) - a fixed payment for each share accepted by the pool. In this case, the pool assigns a fixed reward for the ball. It is calculated based on the block reward divided by the current difficulty in the network, and then multiplied by the number of balls sent by the user with difficulty 1. From the user's point of view, such a system is the most "fair", since all work is paid, regardless of its result - that is, it doesn't matter if the blocks are found or not. But for the pool, this approach carries serious risks - since long periods between blocks, orphans (blocks not accepted by the network) lead to losses - the pool pays the reward to the miners in advance from the reserves, but does not receive income itself. Therefore, pools with a PPS system usually set a high commission - usually from 3 to 7%.

## The PPS mode, in turn, has varieties:

SMPPS - each ball is valued at face value, but at the cost of a delay before payment so that the pool can find blocks to replenish the reserve. The interval is usually 120 blocks (the standard number required to spend bitcoins from an issuing transaction). Usually pools with this method of accrual do not take commission. Examples: Eligius (0%). RSMPPS - when a block is found, the reward is distributed in proportion to the number of shares received from the miners for the last block, excluding the debt for previous blocks. If after this distribution there is something left, the remainder is distributed in proportion to the debt for the penultimate block. If after that there is something left, the debt for even earlier blocks is paid. Such a payment system is beneficial for new participants in the pool, since the debt on old blocks is paid on a residual basis and does not affect the amount of payments to new participants. But the accumulated debt can become critical for the pool when the block reward halves, as happened with tzod.ru. Currently, no large pool uses this mechanism. In the long term, for a miner working on the same pool, it doesn't matter which payment system is used. Of course, systems without commissions are more profitable. On the Bitcoin Wikipedia page Comparison of mining pools, you can find the most complete comparison table of pools with their characteristics. But it is not updated very often and many data may be out of date. Many of the pools that started first have already closed.