BitcoinMachine
TECHNICAL_DOC // KEYS / PAY-TO-ANCHOR
PAY TO
ANCHOR
Pay to Anchor (P2A) is a standardized ephemeral output type added in Bitcoin Core 28.0, designed specifically for CPFP fee bumping. A P2A output has a fixed, keyless 1-sat scriptPubKey that anyone can spend — its sole purpose is to let a child transaction attach fees to an unconfirmed parent, replacing the cumbersome per-party anchor outputs previously used in Lightning.
P2A OUTPUT STRUCTURE
scriptPubKey (4 bytes): OP_1 0x02 0x4e73 └──┘ └──┘ └────┘ ver=1 2-byte push magic value "4e73" This is a SegWit v1 (Taproot-family) output with a 2-byte witness program = 0x4e73. Decoded: Version: 1 (same as Taproot / P2TR) Program: 4e73 (not a valid pubkey — intentionally keyless) Bech32m address: bc1pfeessrawgf (mainnet) tb1pqqqqp399et... (testnet) Spending (anyone can): witness: [] (empty — no signature required) Weight cost: minimal
CPFP FEE BUMPING
HOW P2A ENABLES CPFP
Parent tx (stuck, low fee): Input: Alice's UTXO Output 0: Bob's payment (main output) Output 1: P2A 1-sat (anchor output) Child tx (fee bump): Input 0: Parent tx Output 1 (P2A output — anyone spends) Output 0: Alice change (optional) Fee: 2000 sat (makes package fee rate acceptable) Miner sees package: Combined fee = parent_fee + child_fee Combined size = parent_size + child_size Package fee rate = (combined fee) / (combined size) If package rate ≥ mempool min fee rate: → Both parent and child confirmed in same block ✓
Lightning Anchor Outputs — Before P2A
LIGHTNING CONTEXT
Before P2A, Lightning channels used per-party anchor outputs — each party had their own 330-sat P2WSH anchor. This required two outputs per channel commitment transaction.
Old Lightning anchor design (BOLT 3): Commitment tx outputs: to_local ← Alice's funds to_remote ← Bob's funds to_local_anchor ← Alice's CPFP anchor (330 sat) to_remote_anchor ← Bob's CPFP anchor (330 sat) Script (each anchor): OP_16 OP_CSV OP_DROP (anyone-can-spend after 16 blocks) + immediate spend by anchor owner Problems: - Bloats commitment tx by 2 outputs (~172 bytes extra) - 660 sat locked per channel - Complex script with time-delayed anyone-can-spend path - Dust pinning attacks still possible on some paths
BITCOIN CORE 28.0
P2A combined with the "ephemeral anchors" policy (also called "TRUC" — Topologically Restricted Until Confirmation) simplifies Lightning fee management significantly.
New design with P2A (single shared anchor): Commitment tx outputs: to_local ← Alice's funds to_remote ← Bob's funds P2A 0-sat ← shared ephemeral anchor Zero-value output rules (ephemeral anchor policy): - 0-sat P2A allowed if child CPFP spends it immediately - Parent + child broadcast as a package - P2A output must be spent in same package (ephemeral) - After confirmation, 0-sat output disappears Benefits over old anchors: ✓ One anchor per tx instead of two ✓ Zero-sat (no locked funds) ✓ No CSV delay complexity ✓ Either party (or a third party) can bump fees
The "ephemeral" property means the 0-sat output must be spent within the same package — it cannot persist in the utxo-set/">UTXO set.
CPFP vs RBF
RBF: replace the stuck tx with higher fee version. Requires signing authority.

CPFP + P2A: attach a child tx. Anyone can bump — no signing key needed for anchor.
P2A is only useful with package relay (BIP 331) — the ability to submit parent + child together to miner mempools. Deployed in Bitcoin Core 28.0.
TERMINOLOGY_INDEX
P2A
Pay to Anchor. A SegWit v1 output with 2-byte program 0x4e73. Keyless — anyone can spend. Used for CPFP bumping.
CPFP
Child Pays For Parent. Fee-bumping technique where a child transaction spends a parent output, adding fees for both.
Ephemeral Anchor
A 0-value P2A output that must be spent in the same package it is created in. Does not persist in UTXO set.
Package Relay
Broadcasting a parent + child transaction together as a unit, so miners evaluate fee rate of the combined package.
TRUC
Topologically Restricted Until Confirmation. The mempool policy enabling zero-value ephemeral outputs with P2A.
Anchor Output
A small output in a pre-signed transaction reserved for CPFP fee bumping when the transaction needs urgency.