Research
Analysis of Input-Output Mappings in Coinjoin Transactions with Arbitrary Values
Existing tools that estimate coinjoin privacy assume every possible input-output mapping is equally likely and oversimplify fees, so their anonymity estimates are unreliable.

- arXiv
- 2510.17284
- Published
- 2025-10-20
- Authors
- Jiri Gavenda, Petr Svenda, Stanislav Bobon, Vladimir Sedlacek
AI summary
Overview
Research area: Bitcoin on-chain privacy, specifically the anonymity provided by coinjoin transactions with arbitrary output values (Whirlpool, Wasabi 1.x, Wasabi 2.x, JoinMarket), and the input-output mapping problem faced by chain analysts.
Technical level: Advanced. The paper assumes familiarity with Bitcoin transaction structure, address clustering heuristics, subset-sum/backtracking enumeration, and Bayesian probability; it also contains formal definitions (sub-mappings, mappings, entropy).
Scope (one sentence): The paper measures how much coinjoin anonymity erodes through users' post-mix consolidation behavior and builds a fee-aware, implementation-aware, parallelizable algorithm for enumerating and probabilistically weighting all possible input-output mappings of a coinjoin.
What This Paper Is About
Existing tools that estimate coinjoin privacy assume every possible input-output mapping is equally likely and oversimplify fees, so their anonymity estimates are unreliable. The authors ask two questions: how real users behave after mixing (and how that shrinks the anonymity set of everyone in the same denomination), and how to compute anonymity more precisely when information about wallet implementation, fee rules, and observed on-chain behavior is available. They answer both by extending the open-source BlockSci tool and by designing a new mapping-enumeration method, then evaluating it on real and emulated Wasabi 2.x coinjoins.
Key Contributions
-
Extended BlockSci for coinjoin analysis. The authors add three improved coinjoin detection algorithms (based on Stütz et al.) plus two Wasabi 2.x-specific rules, add analysis of the transaction context surrounding coinjoins, and replace the outdated address clusterer. They report a perfect match for Whirlpool transactions and a near-perfect match for Wasabi 1.x and Wasabi 2.x when verified against the Dumplings project and against lists of finished coinjoins obtained by actively querying running coordinators. The tool is released at github.com/crocs-muni/blocksci.
-
A measurement of anonymity-set loss over time. Using consolidation heuristics (non-coinjoin transactions with at least two inputs coming from coinjoins), they compute anonymity set loss for intervals d ∈ {1, 7, 31, 365, ∞} days across Whirlpool, Wasabi 1.x, and Wasabi 2.x, showing when the loss occurs and when it stabilizes.
-
A generic, parallelizable mapping-enumeration method. The method handles fee preprocessing, implementation-specific restrictions, and additional attacker knowledge, and produces numeric mappings (mappings up to permutation of same-valued coins) as a lower bound on full enumeration complexity.
-
A new privacy metric and a probability model. Instead of assuming uniform mappings, they define entropy over non-uniform mapping probabilities and propose p(I,o) = max over i in I of p(i,o) as a conservative bound on how well a user's output is mixed given that the user owns the set of inputs I.
Main Findings
-
Overall anonymity-set decrease of 10-50%: The abstract reports "a significant (10-50%) average post-mix anonymity set size decrease for all three major designs with a central coordinator: Whirlpool, Wasabi 1.x, and Wasabi 2.x."
-
Loss is front-loaded: For all designs, the largest degradation caused by post-mix behavior usually happens within the very first day after the coinjoin; degradation after one year is usually negligible.
-
Whirlpool: Averaged over all pools, A_∞ is between 30% and 50%, with later coinjoins tending to have lower loss. The 0.001, 0.01, and 0.05 BTC pools show roughly comparable loss; the largest 0.5 BTC pool has a smaller loss overall, possibly because a large output creates less need to consolidate.
-
Wasabi 1.x: Loss is around 25-40% soon after its start until the first quarter of 2023, then decreases significantly; later-period results are less representative because the number of Wasabi 1.x coinjoins fell from more than a thousand to smaller tens per month.
-
Wasabi 2.x: Loss is below 20%, with a larger loss from June to August 2024 due to several contesting coordinators after the shutdown of the zkSNACKs coordinator; afterwards the kruw.io coordinator became dominant and loss returned to zkSNACKs-era levels. Post-mix consolidations are significantly less frequent for Wasabi 2.x because of its high remix rate.
-
Smaller denominations consolidate more: For arbitrary-value designs (Wasabi 1.1 and Wasabi 2.x), smaller output denominations are consolidated more frequently than larger ones, and the transaction-level averages sit close to the small-denomination values because of their higher relative frequency.
-
Detection thresholds had to change: Wasabi 2.x detection requires inputs and outputs to belong to at least five different addresses, and after May 1st, 2024, at least 20 inputs instead of 50, to account for smaller coordinators emerging after zkSNACKs stopped. The resulting false positives were mitigated by flagging candidates with no connection to any other coinjoin and/or address reuse above 70%, then manually verified onto an exclusion list.
-
The enumeration does not miss valid mappings: Across 220 emulated transactions with known ground truth, the real mapping was among the enumerated numeric mappings in all cases.
-
Enumeration complexity grows exponentially: The number of numeric mappings grows exponentially with coinjoin size (inputs plus outputs) with high variance. Extrapolating to median coinjoins under the zkSNACKs coordinator (2022-2024) and the kruw.io coordinator in 2025, after lowering the size by the consolidation percentage from Section 3, full enumeration would be infeasible in both cases — suggesting users get sufficient privacy unless an attacker has extra information.
-
Output selection has low entropy: With 100 emulated coinjoins of realistic size (hundreds of inputs and outputs) and a modified Sake simulator run 100 times per wallet, the exact matching sub-mapping was produced on the first try for 29% of wallets. The provided text is truncated at the sentence reporting that in 3% of cases the emulated mapping did not occur among the simulated results.
-
Overall conclusion: Despite users' undesirable post-mix behavior, correctly attributing coins to their owners remains very difficult, even with the improved algorithm.
Methodology in Plain English
The authors take the public Bitcoin blockchain and make it answer two questions: who merged their mixed coins back together, and how many ways could a given coinjoin have been assembled.
For the first question, they patch BlockSci, an open-source chain-analysis framework that uses a MapReduce-style parallel design, so it can recognize coinjoins from each design and then watch for later non-coinjoin transactions that spend two or more coinjoin outputs together. Such a merge is strong evidence that one person owns both outputs, so those outputs stop hiding the other same-valued outputs in the mix. They define the anonymity set of an output as all outputs of the same value in that coinjoin, then measure what fraction of that set has been merged away within 1, 7, 31, 365 and unlimited days. The method is deliberately conservative: it assumes every detected merge is actionable for an analyst and that any misclassified consolidation counts, both of which inflate the reported loss, so real user privacy is at least as good as the numbers suggest. They ran this on the full chain up to 6 April 2025 (block height 891137) on a machine with two 64-core AMD EPYC 7713 2.0 GHz processors (256 threads) and 2TB of DDR4 3200 MHz RAM, typically using about 400GB, containerized with Podman on an Ubuntu 20.04 image.
For the second question, they treat the search for who-put-in-what as a subset-sum problem, solved by backtracking: find all groups of inputs whose value matches a group of outputs plus that user's fees. Because coinjoins contain many identical values, they enumerate "numeric" mappings, which ignore permutations of same-valued coins, and count the full number of mappings from those. Fees are handled by preprocessing: predictable fees (Whirlpool, Wasabi 1.x) are subtracted up front; unpredictable ones (Wasabi 2.x decomposition leftovers) become a tolerance range; user-to-user payments (JoinMarket) allow negative differences with at most one such sub-mapping. Implementation rules — how many inputs and outputs a wallet registers, how it decomposes values — filter out impossible sub-mappings. Then, instead of assuming all mappings are equally likely, they assign probabilities by simulating each wallet's output selection individually, using the emulator and a modified version of the Sake output-selection simulator, and combine sub-mapping probabilities into mapping probabilities.
Why This Matters
Impact on research: The paper directly challenges the uniform-probability assumption used in earlier mapping work (Maurer et al. and the Boltzmann tool), shows that a purely structural anonymity number is not the end of the story, and supplies an empirical timeline for when anonymity loss actually happens. It also provides reproducible tooling and data (github.com/crocs-muni/coinjoin-mappings, permissive license), which had been scarce because real coinjoins lack ground truth.
Real-world applications:
- Wallet users deciding when to stop mixing: since loss concentrates in the first day and is negligible after a year, and each additional mix costs mining and coordination fees, users get a data-backed stopping rule.
- Forensic analysis of past transactions: law enforcement and chain-analysis firms get calibrated expectations about what a mapping can and cannot prove, including a conservative bound via p(I,o).
- Coinjoin design evaluation: the entropy metric E(T) = −Σ p(M)·log p(M) lets designers compare protocols rather than just counting same-valued outputs.
- Detection engineering: the improved Wasabi 2.x detection rules and exclusion-list methodology are reusable for anyone maintaining a coinjoin dataset.
Industry relevance: The zkSNACKs shutdown and the shift to smaller, competing coordinators (eventually kruw.io) visibly changed both coinjoin size and anonymity-set loss, which matters to compliance teams interpreting activity across that period. The finding that only 29% of wallets reproduce their exact sub-mapping on a first simulation attempt, while full enumeration becomes infeasible at real coinjoin sizes, is a concrete counterpoint to claims that coinjoin privacy is easily broken.
Future Directions
-
Generalizing to consecutive coinjoins. The paper defers to Appendix 0.D an outline of how to extend enumeration across multiple chained coinjoins; making that practical for real remix-heavy Wasabi 2.x data is an open step.
-
Keeping detection current. The authors state explicitly that if false consolidations rise — for example, from a new coinjoin design with a large number of inputs — the coinjoin and consolidation detection algorithms will need updating, so maintaining the exclusion list and thresholds is ongoing work.
-
Computing p(M) at real scale. Because mapping probabilities are currently derived from per-wallet simulation rather than from the full joint distribution, and full enumeration is infeasible for median real coinjoins, scalable approximations of p(M) remain an open problem.
-
Accounting for off-chain linkage. The setting assumes a passive observer with public chain data plus coordinator/API information; incorporating real-world identity links (for example, withdrawals to regulated exchanges, which the introduction names as a deanonymizing factor) is not modelled in the reported results.
Target Audience
Bitcoin privacy researchers and PhD students working on anonymity metrics and transaction graph analysis; blockchain forensics and anti-money-laundering analysts who need to interpret what a coinjoin proves; wallet and coinjoin-protocol developers who need to know how output decomposition and fee rules leak information; and engineers maintaining large-scale chain-analysis infrastructure, who will find the BlockSci modifications and the parallel backtracking design directly reusable. Readers should already be comfortable with Bitcoin transaction mechanics and basic probability.
Authors’ abstract
A coinjoin protocol aims to increase transactional privacy for Bitcoin and Bitcoin-like blockchains via collaborative transactions, by violating assumptions behind common analysis heuristics. Estimating the resulting privacy gain is a crucial yet unsolved problem due to a range of influencing factors and large computational complexity. We adapt the BlockSci on-chain analysis software to coinjoin transactions, demonstrating a significant (10-50%) average post-mix anonymity…
The full abstract on arXiv