Research·Privacy

Payjoin: Breaking a Heuristic by Paying

In a payjoin the person being paid contributes one of their own inputs to the payment. The result is a transaction with inputs from two parties that looks exactly like an ordinary one, which falsifies the assumption chain analysis is built on — and it costs nothing extra, because it is the payment.

Level
Advanced
Reading
8 min
Published
2026-11-25
Reviewed
2026-11-25

Most Bitcoin privacy tools announce themselves. A CoinJoin is visible as a CoinJoin, a mixing service leaves a pattern, and several venues treat both as a flag. Payjoin is the exception: it is an ordinary payment that happens to break the single most important assumption an analyst makes, and nothing distinguishes it from a payment that did not.

What is the heuristic being broken?

That all the inputs of a transaction belong to one party.

BIP 78’s motivation names three assumptions that chain analysis rests on. Common input ownership: in most transactions every input belongs to the same person. Change identification by script type: if the inputs are all one address type, the change output probably is too. Change identification by round amount: a round-numbered output is probably the payment rather than the change.

The first is the load-bearing one, because it is close to a proof rather than a guess — producing signatures for two inputs requires both keys. Cluster the addresses that have been spent together and you have the backbone of every attribution product on the market.

A payjoin falsifies it directly. The receiver contributes an input, so the transaction has inputs from two unrelated parties and the inference is simply wrong. Not weakened: wrong, in a way the analyst cannot detect.

How does the payment work?

The sender proposes, the receiver adds and returns, the sender signs again.

The receiver’s payment request is an ordinary BIP 21 URI with one extra parameter pointing at an endpoint. A sender whose wallet understands it builds the payment as normal and sends the unsigned proposal to that endpoint instead of broadcasting. The receiver adds one of their own inputs, increases their output by the same amount, returns the modified transaction as a partially signed transaction, and the sender checks the changes, signs and broadcasts.

The checking step is the security of the scheme. The sender verifies that the only differences are the ones agreed — their own outputs unchanged, the amount they are paying unchanged — so a malicious receiver cannot quietly redirect funds. What a receiver can do is abort, in which case the sender broadcasts the original transaction and the payment happens normally.

Two side effects are worth noticing. The receiver consolidates one of their own outputs for free, because the input they added is being spent in a transaction somebody else is paying the fee for. And the amount visible on the chain is not the amount paid, since the receiver’s output includes their own contributed input — so the recorded value is larger than the real payment.

What can go wrong between the two halves?

Two failure modes, both handled, and one of them is subtle enough to have needed a rule.

The obvious one is a receiver who modifies the transaction in ways the sender did not agree to — adding an output, raising the amount, or substituting a destination. The sender’s final check catches all of it, because the sender signs last and signs only what they have inspected. A receiver who tampers gets nothing; the sender falls back and broadcasts the original.

The subtle one is a receiver who probes. By repeatedly asking a sender to construct payjoins and then aborting, a receiver can learn which outputs the sender holds, because each proposal reveals a set of inputs the sender was willing to spend. The specification addresses this by requiring the sender to reuse the same inputs when the same payment is re-proposed, so a probing receiver learns nothing new after the first attempt.

Both of these illustrate the shape of the protocol. The cryptography is trivial — it is one extra input and a second signing round — and essentially all of the design work is in deciding what each party is allowed to learn and to change.

Does it cost anything?

Marginally more block space, and no extra transaction.

A payjoin is one transaction with one additional input compared with the payment that would otherwise have happened. That is tens of virtual bytes, paid by the sender at the prevailing rate, and it is the entire on-chain cost.

Compare CoinJoin, which is a separate transaction made specifically for privacy, costing a fee that buys no payment, usually a coordinator fee as well, and leaving a recognisable output pattern. Payjoin’s privacy is a by-product of a payment somebody was making anyway.

That difference explains why payjoin is the technique most often recommended to merchants and least often implemented by them. A CoinJoin is something a user does alone; a payjoin requires the person being paid to participate, which means software, an endpoint, and a reason to care about the payer’s privacy.

Why has nobody deployed it?

Because the receiver has to be online at the moment of payment, which suits almost nobody.

BIP 78 requires an interactive exchange: the sender posts the proposal, the receiver modifies it, the sender signs. A merchant whose server is down, or an individual whose phone is in a pocket, simply does not answer, and the payment falls back to the ordinary path. That fallback is good design and it means the feature silently does nothing most of the time.

BIP 77 — Async Payjoin — addresses exactly this by relaying the proposal through an intermediary so the two parties need not be online simultaneously. It is in draft, with implementations, and it is the difference between a technique that requires a running service and one a mobile wallet can offer by default.

The honest position is that the design has been sound since 2019, the deployment problem is the whole problem, and the asynchronous version is the thing to watch rather than any further cryptography.

What came before it?

Bustapay, which was the same idea and did not survive contact with implementation.

BIP 79 proposed a receiver-contributes-an-input protocol in 2018 and is marked Closed. BIP 78’s authors explain why they deviated from it, and the reasons are instructive about how specifications mature: Bustapay did not use the partially-signed-transaction format, so a receiver wanting to adjust the fee would have needed the full unspent output set to work out what the inputs were worth.

That is a small-looking detail with a large consequence. A protocol that requires one party to hold the whole chain state is a protocol that hardware wallets and light clients cannot participate in, which removes most of the devices people actually use.

The lesson generalises past payjoin. Several Bitcoin proposals have been functionally correct and practically dead because they assumed a participant had information only a full archival node holds. Designing for the devices in people’s hands is not a nicety; it decides whether a specification gets implemented.

What does it do for people who do not use it?

This is the part that makes it unusual, and BIP 78 says so explicitly.

Every payjoin that happens makes the common-input heuristic less reliable for all transactions, because an analyst can no longer treat multi-input transactions as single-owner without a confidence penalty. The technique degrades the surveillance of people who have never heard of it.

That is close to the opposite of how privacy tools usually behave. A technique with few users normally creates a small, identifiable anonymity set — joining it marks you. Payjoin produces transactions indistinguishable from ordinary ones, so there is no set to join and no mark, and the benefit spreads outward rather than concentrating.

The corollary is that adoption has an unusual shape. A merchant implementing payjoin improves the privacy of their customers and of everybody else’s customers, and captures none of it. That is a public good, with the funding problem public goods have.

Check it yourself

The marker is in the payment request rather than on the chain. A BIP 21 URI offering payjoin carries an extra parameter naming the endpoint: anything of the form bitcoin:ADDRESS?amount=…&pj=https://… is an invitation, and a wallet that understands it will take it silently.

On the chain there is nothing to find, which is the point. A two-input transaction may be one person spending two outputs or two people cooperating, and no amount of inspection separates them. If you want to see the effect rather than the mechanism, pick any multi-input transaction in a recent block and notice that you cannot tell — then consider that every attribution product in existence assumes you can.

What remains uncertain

Whether async payjoin gets adopted. The design removes the only serious objection to the original, and the remaining obstacles are the ordinary ones: wallet support on both sides, a relay to run, and a merchant willing to add a feature that benefits their customers rather than themselves.

How much heuristic poisoning is already happening. Analysts adjust their confidence when a technique becomes common, and nobody publishes how much payjoin they believe is in the data. Estimates circulate and none is verifiable, which is the expected state for a technique whose success is being indistinguishable.

Whether receivers will accept the trade. Adding an input exposes one of the receiver’s outputs to the sender, who learns an address and an amount they would not otherwise have seen. For most merchants that is a small cost; for some it is a reason not to, and the privacy improvement is asymmetric in a way the literature rarely dwells on.

Sources

Nearby