Skip to content

Commit

Permalink
BIP78: Clarify output substitution
Browse files Browse the repository at this point in the history
The original text is ambiguous to allowing transaction cut-through
or not. Transaction cut-through enables savings by posting multiple
transaction intents through a single 2-party payjoin and is used
in practice in payjoins today. Let's explicitly allow it in the text.

Co-authored-by: Martin Habovstiak <[email protected]>
  • Loading branch information
DanGould and Kixunil committed May 31, 2024
1 parent d5fc59b commit ef7f352
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bip-0078.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ The payjoin proposal MUST:
* Only fill the <code>witnessUTXO</code> or <code>nonWitnessUTXO</code> for the additional inputs.
The payjoin proposal MAY:
* Add, remove or modify the outputs belonging to the receiver.
* Add, or replace the outputs belonging to the receiver unless output substitution is disabled.
The payjoin proposal SHOULD NOT:
* Include mixed input types until May 2024. Mixed inputs were previously completely disallowed so this gives some grace period for senders to update.
Expand Down Expand Up @@ -348,7 +348,7 @@ On top of this the receiver can poison analysis by randomly faking a round amoun

===<span id="output-substitution"></span>Payment output substitution===

Unless disallowed by sender explicitly via `disableoutputsubstitution=true` or by the BIP21 url via query parameter the `pjos=0`, the receiver is free to decrease the amount, remove, or change the scriptPubKey output paying to himself.
Unless disallowed by sender explicitly via `disableoutputsubstitution=true` or by the BIP21 url via query parameter the `pjos=0`, the receiver is free to decrease the amount, or change the scriptPubKey output paying to himself.
Note that if payment output substitution is disallowed, the reveiver can still increase the amount of the output. (See [[#reference-impl|the reference implementation]])

For example, if the sender's scriptPubKey type is P2WPKH while the receiver's payment output in the original PSBT is P2SH, then the receiver can substitute the payment output to be P2WPKH to match the sender's scriptPubKey type.
Expand Down

0 comments on commit ef7f352

Please sign in to comment.