Home › Glossary › CoinJoin

CoinJoin

Also called: coin join, CoinJoin transaction, coin mixing, collaborative transaction, joint transaction.

A CoinJoin is one transaction that combines inputs from several people, usually with equal-value outputs, so observers can't tell who paid whom.

A CoinJoin is a Bitcoin transaction built jointly by several people. Each participant adds their own inputs and receives outputs, often of identical amounts, and everyone signs only their own part. Anyone can see the transaction, but it is hard to tell which output belongs to which input.

How it works

Gregory Maxwell described the idea in 2013. It relies on a basic property of Bitcoin: each input carries its own signature, so a transaction is valid even when its inputs belong to different people. A typical round:

  1. A coordinator, or the participants themselves, collect everyone's inputs and the outputs they want.
  2. The unsigned transaction is shared with all participants.
  3. Each participant checks that their outputs are present and signs their own inputs, committing to the whole transaction.
  4. Once every signature is in, the transaction is broadcast.

No one can take another participant's coins, because each signature covers only the exact transaction that was agreed.

BIPs that touch CoinJoin

There is no BIP for CoinJoin itself, but several make it easier. PSBTs carry the transaction between participants: BIP 174 includes a manual CoinJoin workflow example, and BIP 370 lets inputs and outputs be added after creation. BIP 69 notes that its deterministic ordering of inputs and outputs also works for multi-party transactions such as CoinJoins. Payjoin (BIP 78) is a two-party CoinJoin disguised as an ordinary payment.

Why it matters

CoinJoin targets the common-input-ownership heuristic: the assumption that all inputs of a transaction share an owner. Equal-value outputs give each participant a set of coins that can't be told apart. Spending those outputs together later, or merging them with other coins, can undo much of the benefit, so careful UTXO management matters as much as the join itself.

BIPs that define CoinJoin

  • BIP 78: A Simple Payjoin Proposal: Deployed. Defines Payjoin, a way for the payer and the recipient to both contribute coins to a single payment transaction. Because the result looks like an ordinary payment but breaks common assumptions used…
  • BIP 174 (PSBT): Partially Signed Bitcoin Transaction Format: Deployed. Defines PSBT (Partially Signed Bitcoin Transaction), a standard file format for a transaction that is still collecting signatures. It lets different wallets, hardware devices, and co-signers pass a…
  • BIP 370: PSBT Version 2: Deployed. Updates the Partially Signed Bitcoin Transaction (PSBT) format, a standard file for passing an unfinished transaction between wallets and signing devices. Version 2 allows inputs and outputs to be…
  • BIP 69: Lexicographical Indexing of Transaction Inputs and Outputs: Complete. Proposes sorting transaction inputs and outputs in a standard, alphabetical-style order. Because wallets ordered them differently, observers could tell which wallet created a transaction; a shared…
  • BIP 79: Bustapay :: a practical coinjoin protocol: Closed. Describes Bustapay, a simple protocol in which the sender and receiver of a payment jointly build and sign the transaction, each adding their own coins. Mixing ownership this way undermines the…

Related terms

  • Payjoin: Payjoin is a payment where the receiver adds their own input to the sender's transaction, breaking the assumption that all inputs belong to the payer.
  • PSBT: A PSBT (Partially Signed Bitcoin Transaction) is the standard format, from BIP 174, for passing a not-yet-signed transaction between wallets and signers.
  • UTXO: A UTXO (unspent transaction output) is an amount of bitcoin locked to a script and not yet spent. A wallet's balance is the sum of its UTXOs.
  • Silent payments: Silent payments (BIP 352) are reusable static addresses: each payer derives a fresh, unlinkable Taproot output, with no notification transaction.

Learn more

Guides