PPLNS Mining Explained

Pacific Pool
4 min readApr 28, 2020

--

Learn how PPLNS payouts are calculated and how we are making PPLNS mining as transparent as possible.

To understand PPLNS we first need to introduce pool “shares” and “difficulty”. In basic terms miners receive work assignments from the pool at regular intervals. Each work assignment has a difficulty value that is customized for the miner based on their mining (hash) power. When the miner completes the work assignment it submits the results to the pool. After the pool verifies the results it rewards the miner with a share with the given difficulty value. The miner can observe this in realtime with their mining software, for example using xmrig:

Two shares each with difficulty 12870 accepted by the pool

The pool keeps track of all shares submitted by the miner and uses this information when computing the PPLNS rewards. PPLNS rewards are issued for each block found by the pool after the block unlocks (matures). A block unlocks after a set number of blocks are mined on top of it on the blockchain. Our “Pool Blocks” page lists all blocks found by the pool and the remaining number of blocks until they unlock in the “Status” column:

Pool Blocks

Once a block is unlocked the pool will compute the PPLNS rewards. Starting with the shares that found the block the pool works backwards in time tabulating the shares submitted by all miners. This continues until the total difficulty of the shares reaches “N” times the block difficulty. Note for Pacific Pool the “N” in PPLNS is always two. The block reward is then split among the miners based on their contributed shares.

If blocks are found easily by the pool the same shares may earn multiple rewards. On the other hand, if the pool struggles to find a block shares from early in the round may not earn any rewards. This discourages “pool hopping” and rewards loyal miners.

For maximum transparency we have added a “PPLNS Statistics” page:

PPLNS Statistics

Starting at the top the four boxes contain:

  • The total blocks unlocked with PPLNS rewards
  • The average PPLNS difficulty (normally twice the block difficulty)
  • The overall share utilization
  • The average block window

Share utilization measures how often a share is used when computing PPLNS rewards. A share utilization of 100% means every share is rewarded “N” times, where “N” is the difficulty factor in PPLNS. Given constant block difficulty, constant hashpower, and consistent “luck” finding blocks the share utilization will be 100%. However in the real mining world these criteria are rarely met in the short term. The block difficulty is constantly changing, hashpower increases and decreases, blocks are orphaned, etc. Over the long term we expect the pool share utilization to hover around the 100% mark. For individual miners, especially those that “pool hop”, the variance can be much larger.

The block window details which shares earned PPLNS rewards for a found block. When a miner submits a share the pool keeps track of the target block height. After the pool calculates the PPLNS rewards it uses this height information to form the block window. For example if the pool finds block 100 with little effort the block window could be from blocks 98 to 100.

The two graphs display the PPLNS difficulties and block windows over the recently unlocked blocks. In general the greater the difficulty the larger the expected block window, assuming constant hashpower and pool luck.

The bottom table gives a block by block breakdown of the pool PPLNS rewards. For each unlocked block the PPLNS difficulty, reward, fees (before Hashback), block window, and miner counts are listed.

To help miners track their PPLNS rewards a new section has been added to the “Worker Statistics” page:

Worker PPLNS Statistics

The section contains the latest miner PPLNS reward and share difficulty. Also included are the averages over recent blocks and a reward graph. Finally the worker specific share utilization is given, see above for description.

Shares submitted by a miner are first added to the miner’s “Pending Hashes” count. After a block found by the pool is unlocked the PPLNS rewards will be calculated as described above. The PPLNS rewards will then be added to the miner’s “Pending Balance” and any shares no longer eligble for rewards will be removed from “Pending Hashes”. Once the “Pending Balance” reaches the minumum payout for the miner a payout will be scheduled and included in the next round of pool payments (30 minute interval).

No configuration changes are required in any miner software for PPLNS payouts. The pool will automatically choose share difficulties to optimize PPLNS rewards. Each miner is of course welcome to set their own static difficulty when connecting to the pool by appending “.” followed by a difficulty value to their username.

Please contact us with any questions or concerns.
Stay tuned for more articles on mining and cryptocurrencies. Happy Mining!

--

--