// schema · p2pool · decentralized mining

A mining pool with no pool.
Just two chains locked together.

P2Pool solves a problem the previous Stratum schema only hinted at: traditional pools are centralized choke points. A handful of operators control most of Monero's hashrate, decide which transactions to include, hold miner funds in custody, and can be coerced, hacked, or attack the network themselves. P2Pool eliminates the operator entirely by replacing the pool's database with a sidechain — a separate blockchain where every share is a real block, and payouts are settled trustlessly in the Monero coinbase itself.

peer-to-peer · no operator 0% fee 10s sidechain blocks pplns window 2160 blocks ~0.00027 xmr min payout
01 · the problem

§1The centralization problem with traditional pools

The previous Stratum schema described how a pool dispatches jobs and aggregates shares. What it glossed over is the structural issue with that model: the pool operator is a single point of trust. They choose which transactions to include in blocks, hold the rewards before paying miners out, and can — as the August 2025 selfish-mining incident on Monero demonstrated — actively attack the network they're supposed to secure. Solo mining avoids this but punishes small miners with brutal income variance. P2Pool is the third option.

CENTRALIZED POOL · today's default
"Trust the operator"
  • Custodial — pool holds your earnings until threshold, then pays out
  • Operator picks txs — can censor or front-run mempool
  • Pool fee — typically 1-2% off the top
  • Can be coerced — courts, sanctions, hacks all aim at one server
  • Can attack the chain — selfish mining, reorg incentives if hashpower share is large
  • Hashrate concentration — top 3 pools often >50% of network
P2POOL · since 2021
"Trust the math"
  • Non-custodial — payouts are part of the Monero coinbase, never held
  • You pick your own txs — your local monerod builds the template
  • 0% fee — no operator to pay
  • No single point of failure — every node is independent
  • Cannot meaningfully attack — no central hashpower to direct
  • Distributed hashrate — thousands of independent nodes

P2Pool is the brainchild of SChernykh

The same developer (also known as sech1) who co-authored RandomX. He took P2Pool — a concept attempted on Bitcoin in 2011 and largely abandoned — fixed its critical orphan-block problem with uncle blocks, and rebuilt the whole thing from scratch in C++. Launched October 2021. By 2024 it was carrying a meaningful chunk of Monero's network hashrate.

02 · the big idea

§2Two chains, one proof of work

P2Pool runs its own blockchain — the sharechain. It has its own blocks, its own difficulty, its own ~10-second target time. Crucially, both chains use the same RandomX proof of work. A miner hashing a Monero block template is simultaneously testing it against two difficulty targets: the easy one (sharechain) and the hard one (Monero). The same hash satisfies whichever target it falls below.

THE TWO CHAINS · merge-mined MONERO MAIN CHAIN 2 min block · difficulty very high Block N ≈2 min ago Block N+1 ★ NEW BLOCK found via P2Pool! future… same hash
satisfies both P2POOL SHARECHAIN 10 sec block · difficulty much lower s.1 s.2 s.3 s.4 s.5 s.6 s.7 s.8 ★s.9 s.10 s.11 ... most hashes ↓ satisfy sharechain only → become shares (10s) occasional lucky hash satisfies Monero too → becomes a Monero block (~2 min)

Three numbers that define P2Pool

10 s
sidechain block time
2160
blocks in PPLNS window
6 h
PPLNS window duration
0%
protocol fee · ever
03 · architecture

§3What you actually run

A P2Pool miner runs three processes locally. There is no remote pool server — your laptop is the pool. The three processes chain together: monerod gives you the chain state, p2pool builds block templates including payouts to PPLNS-window miners, XMRig hashes them.

1

monerod

tcp :18080 · :18081 rpc

Your local Monero full node. Holds the chain, the mempool, gossips with peers. The same daemon described in the P2P schema. Note: must be a full node, not a remote — P2Pool builds templates from your mempool view.

2

p2pool

tcp :3333 stratum · :37889 p2p

The sidechain daemon. Connects to your monerod, gossips with other P2Pool peers worldwide on its own P2P network, maintains the sharechain, and pretends to be a Stratum pool for your local XMRig.

3

XMRig

connects to 127.0.0.1:3333

The actual miner. Identical to the XMRig you'd run with a centralized pool — it sees P2Pool as just another Stratum server. Same login / submit flow from the prior Stratum schema.

The Stratum interface is preserved

Your existing miner doesn't know it's mining on a sidechain. P2Pool implements the same JSON-RPC Stratum dialect the Stratum schema documented — login, getjob, submit, keepalived. The only difference is the target values it ships, which correspond to the sharechain difficulty instead of an arbitrary pool difficulty. This is by design: any existing miner works.

04 · the sharechain

§4How shares become payouts

In a traditional pool, a "share" is just a database row in the pool operator's ledger. In P2Pool, a share is a real block on the sharechain — gossiped over a P2P network, validated by every node, with its own proof of work. Each share is also a complete Monero block template with a coinbase that pays out to every miner currently in the PPLNS window. If the proof of work happens to also satisfy the Monero network target, that template gets relayed to monerod as an actual Monero block, and those payouts settle on the main chain.

1

You build a template

Your p2pool daemon asks your local monerod for a block template, then modifies the coinbase to include payouts to every miner with shares in the current PPLNS window — proportional to share difficulty.

2

XMRig hashes it

Your miner runs RandomX on the template, iterating the nonce just like in the Stratum schema. Each hash is checked against both targets: sharechain (easy) and Monero (hard).

3a

Sharechain hit → share

If the hash < sharechain target, you found a sharechain block. It's broadcast over the P2Pool P2P network. Every other P2Pool node validates and appends it. You now have one share in the PPLNS window.

3b

Monero hit → block!

If the hash < Monero target (much rarer), the template is a real Monero block. P2Pool submits it to monerod via submit_block. Everyone in the PPLNS window — including you — gets paid in the coinbase.

Uncle blocks · the fix that made P2Pool work

Bitcoin's P2Pool failed because of orphans: with a 10-second block time and global gossip, two miners would constantly find the same-height block independently and one would be discarded — wasting that miner's work. Monero's P2Pool borrowed Ethereum's solution: uncle blocks. If two shares are found at the same height, one becomes the main share and the other becomes its uncle. The uncle is included in the next block's references, earns its miner credit (worth ~80% of a regular share), and counts in the PPLNS window. Almost no work is wasted.

α

Same height, two finders

Miner A and Miner B both find a sharechain block at height H within a few seconds. Network sees both. Only one can be on the main chain.

β

One becomes uncle

By tie-breaking rules (typically first-seen), one block becomes the main share at height H. The other is recorded as its uncle. Uncles can be up to 3 blocks behind and still be included.

γ

Both miners earn

The uncle's miner gets credit (~80% of a full share). Their work isn't wasted. This is what makes 10-second blocks workable on a global P2P network.

05 · payouts

§5How the coinbase trustlessly pays everyone

When P2Pool finds a Monero block, the coinbase transaction inside it has not one output but typically tens to hundreds — one for each unique miner address in the PPLNS window. Each output's amount is the Monero block reward × (that miner's share difficulty / total PPLNS difficulty). This is final, on-chain, non-reversible the moment the Monero block is accepted. There is no separate payout step.

MONERO BLOCK REWARD 0.6 XMR + fees COINBASE TX · multi-output split one output per unique miner in PPLNS window Miner Alice 0.1842 XMR 31% of shares Miner Bob 0.0521 XMR 9% of shares Miner Carol 0.2018 XMR 34% of shares Miner Dan 0.0298 XMR 5% of shares ...N more 21% remaining Settled on Monero L1 the moment the block is accepted. No "withdraw" step. No operator.

How the math works

payouti = block_reward ×your_shares_difficulty) /all_PPLNS_shares_difficulty) Shares are weighted by their own proof-of-work difficulty (which varies per share since vardiff is per-miner). Uncles count at 80% weight. The sum runs over all 2160 sidechain blocks in the window.

The minimum payout floor (~0.00027 XMR) exists because every miner in the window must get a tx output, and outputs have a non-zero size cost. Below that floor, including the output would cost more in tx bytes than it pays out. Miners whose share contribution rounds below the floor get nothing this round — but their shares typically remain in the window for the next block, so the credit isn't lost over time.

06 · trade-offs

§6P2Pool vs centralized pool vs solo

P2Pool is not strictly better than centralized pools — it has real trade-offs. The big ones: you need a minimum hashrate to make sense, and you need to run more local infrastructure. The decision is mostly about your priorities.

PropertyCentralized poolP2PoolSolo
Fee1–2% typical0%0%
CustodyPool holds fundsNever — paid in coinbaseYou hold immediately
Payout cadenceHours / threshold~hours (when block found)Days to weeks for small miners
VarianceLowLow–mediumExtreme
Min effective hashrateAny~1 kH/s recommended (mini sidechain)~1 MH/s+ to see income
Local infrastructureNoneFull monerod + p2pool daemonFull monerod
Decides what to minePool operatorYouYou
Censorship resistanceWeakStrong — every miner sets their own templateStrong
Network centralization impactHigh (single operator's hashrate)Low (distributed across nodes)None

P2Pool mini · for smaller miners

The default P2Pool sidechain has a fairly high difficulty target — if your miner is below ~1-2 kH/s, you'll wait a long time between shares. P2Pool mini is a separate sidechain (same code, --mini flag) with lower difficulty, smaller blocks, and faster shares. Useful for laptops, single-board computers, low-end hardware. Same trustless properties; just a smaller pool.

07 · the broader picture

§7Why this matters for Monero specifically

P2Pool isn't just a nice-to-have for miners. It's structurally important to Monero in ways that go beyond payout convenience. A privacy coin where 60% of new blocks come from one company's servers is one subpoena away from a censorship event. A privacy coin where blocks come from thousands of independent home miners — each picking their own transactions, each holding their own monerod, each beyond any single jurisdiction — is much harder to leverage.

i

Censorship resistance at the block level

Every P2Pool miner builds their own block template from their own monerod's mempool. There is no central decision about which transactions land in blocks. Compares favorably to large pools that may filter txs.

ii

Attack resistance

The August 2025 selfish-mining incident — where a pool exploited timing to do short reorgs — would have been impossible with P2Pool, because the "pool" has no central decision-maker to coordinate the attack.

iii

Alignment with the RandomX premise

RandomX exists to make Monero mining CPU-friendly and accessible. Centralized pools partially undermined that goal by concentrating economic control. P2Pool restores it — solo-grade decentralization with pool-grade variance.