← Duc V. Le
FC 2024

A Transaction-Level Model for Blockchain Privacy

One graph model, the PDAG, gives untraceability and unlinkability a single, consistent definition. The model is then used to compare Coinjoin, Tornado Cash, Monero and Zcash.

François-Xavier Wicht1, Zhipeng Wang2, Duc V. Le3, Christian Cachin1

1University of Bern  ·  2Imperial College London  ·  3Visa Research (main part of the work done at the University of Bern)

The PDF is the full version (Cryptology ePrint Archive 2023/1902, 11 December 2023). Every figure, definition, lemma and equation number on this page follows that version.

In three numbers

What the model delivers

Monero ring
16

Monero from v0.18.0.0 is $16$-untraceable, provided its bipartite graph $G^*$ equals its core (Lemma 6).

Linking relations
10

Linking heuristics from the literature, written as inferred relations $\tilde L$ in one notation (Eqs. 1–10).

Systems modelled
4

Coinjoin and Tornado Cash (add-ons), Monero and Zcash (privacy-preserving chains), all in one graph (§4).

The problem

Everyone says "untraceable". Nobody means the same thing.

Bitcoin and Ethereum show every sender, recipient and amount. The protections built on top take very different routes. Coinjoin merges many users' coins into one transaction. Tornado Cash uses zero-knowledge proofs to separate deposits from withdrawals. Monero hides the real input among decoys with ring signatures. Zcash hides it in a shielded pool. Each line of research uses its own model and notation, so they are hard to compare.

The paper asks three questions. How do these mechanisms compare? Which structures in a ledger protect privacy, and which break it? What forms does privacy take in a blockchain? To answer them, it extends the Transaction DAG (TDAG) of Cachin et al. into the PDAG, then defines two notions on that one graph:

Untraceability

Can the adversary tell which input a transaction really spent? The input states it cannot tell apart form the untraceability set. A transaction is $k$-untraceable if that set has $k\ge 2$ members after the graph is pruned to its core (Def. 6).

Unlinkability

Can the adversary tell which states belong together? It groups states with an inferred relation $\tilde L$. The unlinkability score $u$ measures how far that grouping is from the true relation $L$ (Def. 10).

Adversary model (§3.1): passive, computationally unbounded, idealised cryptography, and focused on the transaction layer. It only observes and records transactions.

Interactive 1 · Figure 2

Anatomy of a PDAG, and what the adversary sees

A PDAG has states ($\bigcirc$, coins), witnesses ($\Box$, one per transaction) and nullifiers ($\Diamond$). Nullifiers are Monero key images, Zcash nullifiers or Tornado withdrawal commitments; they block double-spends. The paper adds masking edges to the TDAG: a masking edge consumes a state, but to everyone except the author it looks like an observing edge. Switch to the adversary's view and every masking edge disappears into the ambiguous ones.

View
Transaction $T_{w_i}$ (click a witness or pick one)
    Table view — every edge of Figure 2

    Graph reproduced from figures/pdag_example.tex (Figure 2). Transaction descriptions follow §2.4.

    Interactive 2 · Figure 3 · Definitions 5–7

    Untraceability: prune to the core, then count

    The adversary keeps only the regular transactions and their inputs, which gives a bipartite graph $G^*$ of states and witnesses (§3.2). Every witness consumes at least one state, so the real spends form a maximum matching. Any edge that belongs to no maximum matching cannot be the real spend. Pruning those edges leaves the Dulmage–Mendelsohn core, the union of all maximum matchings (Def. 5). A transaction is $k$-untraceable when $k\ge2$ of its edges survive in the core. A PDAG is only as untraceable as its weakest transaction (Def. 7).

    Step

      Edit $G^*$ — which state may each witness have spent?

      With the paper's graph, the two maximum matchings are $M_1$ and $M_2$ (§3.2). Neither uses $s_1\to w_3$ or $s_2\to w_3$, so the core drops both, and $w_3$ is left with a single edge: traceable. The graph looks 2- and 3-untraceable, but the PDAG gives no untraceability at all.

      Computed live by listing every matching of the 3×3 graph. The paper's case reproduces the core stated in §3.2: $\{s_1w_1, s_2w_2, s_3w_3, s_1w_2, s_2w_1\}$.

      Interactive 3 · Definition 10 · Lemmas 2–4, 7

      The unlinkability score, and the paper's two readings of it

      The adversary puts $n$ states into one class $[s]_{\tilde L}$. In this calculator, $l$ of them form a single group that truly belongs together, and the other $n-l$ are unrelated singletons. Definition 10 describes the score in words as "the ratio of the number of unlinked pairs to all possible pairs". Its formula, however, counts only the pairs inside $[s]_{\tilde L}\setminus[s]_L$. The two agree in some places and not in others. The paper's worked values also split between them, so this calculator shows both: (A) is the formula for a member of the group, and (B) is the wording applied to the whole class.

      Jump to a case from the paper
      • (A) Def. 10 formula, for a group member
      • (B) Def. 10 wording, whole class: unlinked pairs / all pairs
      Table view — every place the paper gives a score

      (A) $=\binom{|[s]_{\tilde L}\setminus[s]_L|}{2}\big/\binom{|[s]_{\tilde L}|}{2}$, as written in Def. 10. (B) $=\big(\binom{n}{2}-p\big)/\binom{n}{2}$ over the whole class, where $p$ is the number of truly linked pairs: the Def. 10 wording, and the form used in the proofs of Lemmas 2, 4 and 7. Where the two kinds of state differ, (A) is given for both. $[s]_L$ always contains $s$, because $L$ is an equivalence relation (Def. 8). Fractions are left unreduced, as in the paper.

      Interactive 4 · Figure 6 · Lemma 1

      Coinjoin: beat the multi-input heuristic

      The multi-input heuristic (Eq. 1) assumes every input of a transaction has the same owner. Coinjoin breaks that assumption. In Figure 6, three users merge 7 inputs into one transaction, so the adversary's class is all 7 inputs. Each state's score depends only on how many of the 7 its owner holds. Click an input to change its owner.

        • bar = (A), per input, coloured by owner
        • Lemma 1 range
        • (B), whole class
        Table view — score of every input

        The paper's split reproduces its stated scores: $\frac{10}{21}$ for the four inputs of the two 2-address users, and $\frac{6}{21}$ for the three inputs of the 3-address user (§4.1.1). Lemma 1 bounds a Coinjoin with at least two owners between $\binom{|S_I|-|U|}{2}/\binom{|S_I|}{2}$ and $\binom{|S_I|-|u|}{2}/\binom{|S_I|}{2}$, where $U$ is the largest owner class and $u$ the smallest.

        Interactive 5 · Figures 8 and 9 · Lemmas 6 and 8

        Monero vs Zcash: where the decoys come from

        Both chains hide the spent input behind masking edges and stop double-spends with nullifiers. They differ in who ends up in the untraceability set. A Monero ring signature names its decoys explicitly: 16 ring members since v0.18.0.0. A Zcash shielded spend names none, so the set is implicitly every earlier state in the pool. Step through each chain's sample run from the paper.

        Chain
        View
        Transaction
          Table view — every edge of the selected figure

          Graphs reproduced from figures/pdag_monero_h2.tex (Figure 8) and figures/pdag_zcash_all_min.tex (Figure 9). Grey areas are the shielded pool, drawn exactly as in the figure source. The sample runs are toy-sized. The protocol-scale guarantees are the ones in the "At protocol scale" card.

          Properties

          What each system guarantees, in the paper's terms

          SystemUntraceabilityUnlinkabilityWhere
          Coinjoin
          add-on, Bitcoin
          ✕ None: consumption stays visibleUnder the multi-input relation (Eq. 1), the score lies in the Lemma 1 range, set by the largest and smallest owner classes§4.1.1 · Lemma 1
          Tornado Cash
          add-on, Ethereum
          ✕ None: consumption stays visibleAddress reuse gives a score of $0$. Otherwise the score is fixed by the heuristic, Eqs. 4–7: $\frac{2}{3}$, $1$, $\frac{12-l(l-1)}{12}$, or the Lemma 5 expression (all "or linkable")§4.1.2 · Lemmas 2–5
          Monero
          v0.18.0.0, ring size 16
          ✓ $16$-untraceable if $G^*=\mathbf{core}(G^*)$One-time addresses, so no two states share an address. The multi-output heuristic (Eq. 8) gives "linkable or $1$"§4.2 · Lemmas 6–7
          Zcash transparent pool✕ None§4.3
          Zcash shielded pool✓ $p$-untraceable if $G^*=\mathbf{core}(G^*)$, where $p=\min|\{s\mid s\prec w\}|$ over witnesses $w$Leaks through contact with the transparent pool: round-trip transactions (Eq. 9, Lemma 9) and mining-pool payouts (Eq. 10, a score of $1$ outside the pool)§4.3 · Lemmas 8–10

          "Linkable" means the heuristic was right and the score is $0$. The paper states the Tornado Cash, Monero and Zcash scores under the Def. 10 wording, reading (B) above; see source notes.

          Results

          Ten numbered linking relations, one notation

          This is a formal-model paper, so it has no measurements or benchmarks. Its main result is this catalogue: heuristics from Bitcoin, Tornado Cash, Monero and Zcash research, each rewritten as an inferred linking relation $\tilde L$ on the PDAG, with the score each one leaves.

          Eq.HeuristicSystemFromScore it leaves
          1Multi-input: all inputs of a transaction share an ownerBitcoinNakamotoCoinjoin: Lemma 1 range
          2Change address: a fresh-address output in a 2-output transaction belongs with an inputBitcoin
          3Multi-input + change address combined: the change output is linked to every inputBitcoin
          Address reuse: depositor and withdrawer use the same address (uses $A$)Tornado CashWang et al.$0$
          4Deposit address pays the withdrawal feeTornado CashWang et al.linkable or $\frac{2}{3}$ (Lemma 2)
          5Deposit and withdrawal addresses meet in a later transactionTornado CashWang et al.linkable or $1$ (Lemma 3)
          6An address splits into three, and all three depositTornado CashWang et al.$\frac{12-l(l-1)}{12}$ (Lemma 4)
          7Cross-pool: one address deposits into the pools the other withdraws fromTornado CashWang et al.linkable or $\big(\binom{2l}{2}-\binom{l}{2}\big)/\binom{2l}{l}$ (Lemma 5)
          8Multi-output: two outputs of one transaction appear in distinct rings of anotherMoneroKumar et al.linkable or $1$ (Lemma 7)
          9Round-trip: a unique amount enters the shielded pool and soon leaves itZcashKappos et al.$\binom{|S_I\cup S_O\setminus[s]_L|}{2}\big/\binom{|S_I\cup S_O|}{2}$ (Lemma 9)
          10Mining-pool payout: a $z\to t$ transaction with over 100 outputs, one of them a known poolZcashKappos et al.$1$ for non-miners (Lemma 10)

          Address reuse has no equation number, because it uses the address relation $A$ directly rather than a new $\tilde L$. Equation numbers are from main.aux of the ePrint build. Expressions are copied as printed in the paper, including Lemma 5's denominator (see source notes). "Maximal extractable privacy" (§3.3): the largest score a relation $\tilde L$ allows, i.e. what a user can gain by deliberately mixing unlinked states into a transaction that the heuristic misreads.

          Provenance

          Where the paper disagrees with itself

          This page shows these issues as the paper states them instead of silently choosing one version. They appear in the ePrint text that the PDF links to.

          1. Two readings of the unlinkability score. The words of Def. 10 ("unlinked pairs to all possible pairs") and its formula $\binom{|[s]_{\tilde L}\setminus[s]_L|}{2}/\binom{|[s]_{\tilde L}|}{2}$ disagree. Because $[s]_L\ni s$, the formula gives $0$ for any state that shares a class of two with one unrelated state, and the text says such a state should score $1$. The Coinjoin example, Lemma 1 and Lemma 9 follow the formula. The motivating example in §3.3 and the proofs of Lemmas 2, 3, 4, 7 and 10 follow the wording. Even the wording is used two ways. Lemma 2 scores the unlinked $s_w$ by the pairs of the whole class, including the $s_d$–$s_f$ pair, which does not involve $s_w$. Lemma 4 instead defines $l$ from $s$ itself, $l=|[s]_L\cap[s]_{\tilde L}|$. Interactive 3 puts both readings next to each other.
          2. Lemma 5 divides by $\binom{2l}{l}$, while every other score divides by a count of pairs, $\binom{\cdot}{2}$. It also subtracts a single $\binom{l}{2}$, although its proof describes two disjoint classes of size $l$. The two denominators agree only at $l=2$. The expression is reproduced here as printed.
          3. Coinjoin example (§4.1.1). The text lists the adversary's class as $\{s_1,\dots,s_6\}$ and numbers scores $u_1\dots u_6$. Figure 6 and the denominator $21=\binom{7}{2}$ both use 7 inputs, $s_0\dots s_6$. Interactive 4 uses the 7 inputs of Figure 6.
          4. Tornado Cash (§4.1.2). The text calls the deposit "$T_{w_1}$". Figure 7a and the rest of the paragraph call it $T_{w_0}$.
          5. Zcash (§4.3). The text sends $T_{w_4}$ to "shielded $s_{10}$ and transparent $s_8$, $s_{10}$". In Figure 9, $s_{10}$ sits inside the shielded area and $s_8$, $s_9$ sit outside. Interactive 5 follows the figure.
          6. Figure 3 text says "$1\le i\le 2$" for three transactions $T^*_{w_1},T^*_{w_2},T^*_{w_3}$.

          The FC 2024 camera-ready (lncs/ in the source repo) is a shorter version with different numbering. It keeps the same Def. 10 formula.

          Reference

          Cite this work

          @inproceedings{wicht2024transaction,
            title     = {A Transaction-Level Model for Blockchain Privacy},
            author    = {Wicht, Fran{\c{c}}ois-Xavier and Wang, Zhipeng and
                         Le, Duc V. and Cachin, Christian},
            booktitle = {Financial Cryptography and Data Security (FC)},
            year      = {2024},
            note      = {Full version: Cryptology ePrint Archive, Paper 2023/1902}
          }

          Code and data. This is a formal-model paper. It has no data availability statement and no accompanying implementation or dataset, so none is linked here. Every number on this page comes from the paper's text, figures and lemmas, or is computed live from its definitions.