JoinMarket Analyzer: Understanding CoinJoin Change Outputs
I've released a tool called joinmarket-analyzer to match inputs and change outputs in JoinMarket transactions, identifying who the taker was.
Goal: The purpose is not to spread FUD, but to raise awareness. It's crucial to understand that this analysis only affects change outputs. The equal-amount outputs—which provide the actual privacy in a CoinJoin—remain indistinguishable.
The tool uses Integer Linear Programming (ILP) to match inputs with their respective changes and determine which participant is the likely "Taker" (the one initiating the transaction and paying fees) and which are the "Makers" (liquidity providers earning fees).
Example Usage
You can run it easily with Docker:
docker run --rm ghcr.io/m0wer/joinmarket_analyzer:master \
0cb4870cf2dfa3877851088c673d163ae3c20ebcd6505c0be964d8fbcc856bbf \
--max-fee-rel 0.001 --max-solutions 1
Results
The tool outputs the probable structure of the transaction:
...
Taker: Participant 4 (pays 21,368 sats)
💰 Participant 1 (maker)
Inputs: [0]
Outputs: Equal=6.3M sats, Change=113M sats
Fee receives: 458 sats
...
🎯 Participant 4 (taker)
Inputs: [4]
Outputs: Equal=6.3M sats, No change output
Fee pays: 21,368 sats
...
Future Possibilities
This tool lays the groundwork for more advanced privacy research:
- Entropy Evaluation: Measure how "ambiguous" change outputs are. If multiple valid solutions exist, the Taker is harder to pinpoint.
- Algorithm Design: Evaluate and improve taker algorithms to intentionally create ambiguous change structures.
- Market Stats: Analyze historical CoinJoins to gather statistics on fee limits used by takers and earnings by makers.
Check out the code and contribute: https://github.com/m0wer/joinmarket-analyzer