Claim
BIP-360 (P2MR, v0.12.1, Draft) tells wallets to migrate key-path-only P2TR users to "a simple OP_CHECKSIG leaf script", but the same text makes a single-leaf (depth-0) tree anyone-can-spend. A reader who follows the migration advice literally with one leaf creates an output that anyone can take. The BIP never says the migration leaf must have a sibling.
What the text says (line numbers of bip-0360.mediawiki, version 0.12.1)
- L155: "script trees of depth 0 - those with a single leaf script - are considered anyone-can-spend in P2MR".
- L252 and L260: validation: "If m = 0, succeed immediately" / "If the leaf script is at depth zero, script execution is skipped and validation automatically succeeds."
- L322: "Wallets supporting only P2TR key path spends would need to migrate to using script trees. This is a straightforward migration as it only requires moving to a simple OP_CHECKSIG leaf script."
- L171: P2MR "encourages script trees of depth 1 or more, so that P2MR addresses contain at least two spending paths".
- L278-285: the only worked witness is a depth-1 tree (135 bytes), so the sibling leaf is assumed there but not stated as a requirement for the migration case.
Reasoning
- A key-path-only P2TR wallet has one key, so the natural migration is one leaf: <pubkey> OP_CHECKSIG.
- A tree with one leaf has m = 0 (L242 allows m from 0 to 128; L252 handles m = 0).
- At m = 0 validation succeeds with no script execution (L252, L260). So that output is spendable by anyone, signature or not.
- L322 calls this migration "straightforward" and does not mention the depth-1 requirement. L155 and L171 do mention depth, but in other sections. Wallet authors reading only the Security section get a loss-of-funds path.
- Cost of the safe version: a second leaf. Using the BIP's own numbers (L299-306) the depth-1 witness is 103 + 32*1 = 135 bytes vs 66 for a P2TR key-path spend, +69 bytes. So the honest cost of "simple migration" is not zero, and the BIP states it only in the size section.
What the text does NOT support
- It does not say wallets will actually build depth-0 outputs. I have not found a wallet that does.
- I did not test a depth-0 spend on a live implementation. The claim is about what the specification text says.
- The authors may consider L155 sufficient warning. My point is narrower: L322 should say "two leaves (e.g. a second recovery/unused leaf)".
Counter-argument
Depth-0 anyone-can-spend was added in 0.12.0 (changelog L422) precisely to discourage such outputs. A wallet that follows the reference code (L348, python implementation) probably builds depth >= 1. The risk is in the prose, not necessarily in the code.