Pay-Per-Last-N-Shares
3 min read
Pronunciation
[pey-per-last-en-shairz]
Analogy
Think of Pay-Per-Last-N-Shares as a sales team commission structure where bonuses are calculated based on each person's contribution over the past month, not just on who closed the final deal. When a major sale completes, the commission is distributed among team members proportional to their recent work, even if someone else happened to be the one who signed the contract. This approach rewards consistent participation and discourages opportunistic behavior where people might join only when a deal seems imminent. Similarly, PPLNS distributes mining rewards based on a miner's hash power contribution during a recent window (the last N shares or time period), ensuring those who steadily support the pool receive proportional rewards regardless of which specific share leads to finding a block.
Definition
A mining pool reward distribution method that allocates block rewards based on a miner's contribution of shares (partial solutions) over a recent window of time or share submissions, rather than their contribution since the beginning of the pool's operation or only for the specific block found. PPLNS reduces pool-hopping behavior by rewarding loyal miners who consistently contribute hash power across multiple blocks, regardless of which specific miner's share led to the block discovery.
Key Points Intro
Pay-Per-Last-N-Shares implements four key features that shape mining pool participation incentives and reward fairness.
Key Points
Loyalty Incentivization: Rewards consistent miners while discouraging pool-hopping by considering contribution over time rather than at specific moments.
Window-Based Calculation: Distributes rewards based on shares submitted during a limited time window or fixed number of shares before block discovery.
Variance Sharing: Exposes miners to some reward variance based on the pool's luck in finding blocks, unlike PPS which eliminates variance entirely.
Dynamic Participation Accounting: Automatically adjusts to changes in a miner's hash rate contribution without requiring administrative intervention.
Example
A Bitcoin mining pool implements PPLNS with a window of the last 2 million shares. When the pool successfully mines a block worth 6.25 BTC plus 0.2 BTC in transaction fees, the distribution system examines the record of all shares submitted during the window leading up to this block. Miner Alice has contributed 400,000 shares (20% of the window), Bob has contributed 100,000 shares (5%), and various other miners have contributed the remaining 1.5 million shares (75%). Although it was actually Bob's share that found the block, the reward is distributed proportionally based on contribution during the window: Alice receives 1.29 BTC (20% of the 6.45 BTC total reward), Bob receives 0.3225 BTC (5%), and the others receive their proportional shares. If Alice had just joined the pool moments before the block was found, she would receive minimal rewards despite having high hash power, as she would have few shares in the window. Conversely, if she temporarily disconnects but has contributed significantly during the window, she still receives proportional rewards even if offline at the moment of block discovery.
Technical Deep Dive
Pay-Per-Last-N-Shares implements sophisticated tracking systems to accurately attribute and weight mining contributions over time. The window size N is a critical parameter that affects both fairness and variance, typically set to approximate the expected number of shares required to find a block multiplied by a factor of 1-10, creating windows that span multiple blocks on average. There are two predominant PPLNS implementation approaches: Time-based windows measure contribution during a fixed time period (e.g., 24 hours), simplifying administration but potentially advantaging higher-difficulty shares; Share-count windows track a fixed number of the most recent shares regardless of submission time, providing more direct proportionality to hash power contribution. Most implementations use sliding windows that continuously update as new shares arrive, though some use discrete window shifts at block boundaries for computational efficiency. The accounting system typically employs specialized databases optimized for high-throughput time-series data with efficient filtering capabilities to quickly calculate each miner's percentage of the relevant window. Advanced variants include weight-based PPLNS where more recent shares receive higher weighting to further discourage intermittent mining, and geometric PPLNS where share values decay exponentially based on age. The technical challenge involves balancing accurate attribution with computational efficiency when processing thousands of shares per second while maintaining the window calculations, often addressed through incremental updates to running totals rather than recalculating from raw data for each block reward.
Security Warning
Caveat
While PPLNS effectively prevents pool-hopping and rewards loyalty, it exposes miners to short-term variance based on the pool's luck in finding blocks. Miners may experience periods of both above-average and below-average rewards compared to their theoretical expected value. Additionally, the window-based approach creates a ramp-up period for new miners, who must contribute consistently for the duration of a full window before receiving fully proportional rewards. This can create perceived unfairness for inconsistent miners or those frequently switching between pools. The optimal window size involves complex trade-offs: shorter windows reduce the entry barrier for new miners but increase vulnerability to pool-hopping, while longer windows enhance stability but may discourage new participants due to delayed reward equilibrium.
Pay-Per-Last-N-Shares - Related Articles
No related articles for this term.