diff --git a/bip-paytoanchor.mediawiki b/bip-paytoanchor.mediawiki new file mode 100644 index 0000000000..0e9ed9d284 --- /dev/null +++ b/bip-paytoanchor.mediawiki @@ -0,0 +1,76 @@ +
+ BIP: ? + Layer: Applications + Title: Pay To Anchor (P2A) + Author: Gregory Sanders+ +==Abstract== + +This document describes a new standard output script called PayToAnchor (P2A) and prescribes making spending of this output type standard. + +This output is "keyless" meaning no signature or witness data at all are required to spend this output typea. + +==Motivation== + +The "anchor" output type is a commonly used pattern in Bitcoin layer 2 systems such as Lightning Network and beyond. This pattern allows transactions which are presigned far in advance to leave a "hook" for CPFP fee bumping later, when prevailing feerates for block inclusion are better known. + +When the wallet user is unconcerned by *who* is able to bump the transaction fees as long as someone does, this output type may confer a couple of advantages: + +1. Using an output type with minimal output and spending input footprint saves fees on average +2. Keyless operation aids in interoperability of services like watchtowers as there is no privileged key material for bumping + +with the drawback that selection of this output type could result in griefing if anti-pinning measures are not taken. If unsure, use in conjunction with [https://github.com/bitcoin/bips/blob/master/bip-0431.mediawiki TRUC transactions]. + +===Specification=== + +A P2A output is defined as one with the exact witness output script + ++ Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-? + Status: Draft + Type: Informational + Created: 2025-09-23 + License: BSD-3-Clause + Post-History: 2024-06-27: https://github.com/bitcoin/bitcoin/pull/30352 Github PR + 2024-10-10: https://bitcoinops.org/en/bitcoin-core-28-wallet-integration-guide/ wallet integration guide +
OP_1 <0x4e73>
To be segwit it needs to be a witness version + witness program. This conforms to the smallest witness program size of two. The specific bytes cannot be zeros so they are chosen to spell "fees" in bech32m format.
+
+corresponding to the addresses bc1pfeessrawgf
on Bitcoin mainnet, on public testnets, and bcrt1pfeesnyr2tx
on regtest.
+
+P2A inputs are considered standard for spending if no witness data is attached. This avoids meaningless witness padding. Consensus meaning is unchanged.
+
+====Implementation====
+
+* https://github.com/bitcoin/bitcoin/pull/30352
+
+====Related Work====
+
+There are a number of related but separate historical concepts:
+
+[https://github.com/bitcoin/bitcoin/pull/30239 Ephemeral Dust]: Relay policies allowing a single dust output as long as it is spent in a transaction package. As an implementation detail, dust threshold for P2A is set at 240 satoshis by default, other dust levels remain unchanged, and the dust-having transaction must be zero fee. Any output script type may have down to 0-value outputs.
+
+[https://bitcoinops.org/en/topics/ephemeral-anchors/ Ephemeral Anchors]: Historically the union of P2A output type and ephemeral dust. Keyed anchors along with ephemeral dust are also an accepted pattern and as such they remain separate concepts.
+
+[https://github.com/bitcoin/bips/blob/master/bip-0431.mediawiki TRUC transactions]: TRUC transactions bound the topology including child transaction size, which aids in anti-pinning for the P2A output, as anyone can attach a child transaction including an oversized, low feerate one. There is no ineherent dependency on this concept and P2A.
+
+====Backward Compatibility====
+
+Creation of P2A outputs has been considered standard since the deployment of Segwit softfork on the network.
+
+Transactions with P2A inputs were previously nonstandard, reserved as an upgrade hook.
+
+There are no known conflicts with previous usage.
+
+==Acknowledgements==
+
+Thanks to collaborators who helped focus the historical ideas into deployed ones:
+Suhas Daftuar,
+Gloria Zhao,
+Pieter Wuille,
+Jeremy Rubin,
+and Bastien Teinturier.
+
+==References and Rationale==
+
+
+