Search

A technology, a device or an article

How Zcash detects a double spend without identifying the hidden note

A nullifier lets Zcash reject a repeated note spend without publicly identifying its earlier commitment. Disclosure boundaries and chain state.

Closed frosted vessels stand beside a separate public glass pane bearing a pattern.
ITNWS AI-generated conceptual illustration. A public spend mark is not an openly linked name for the earlier note commitment; this is not a cryptographic schematic.ITNWS · image_gen · Original ITNWS AI-generated conceptual editorial illustration

To prevent spending the same thing twice, the network must recognize repetition. To maintain the privacy of a shielded payment, the network must not publicly name the note received by the person. At first glance, these demands pull in different directions: recognition seems to require showing the previous object. Zcash separates the information that is needed for verification and the information that a person is accustomed to considering the natural history of money. A unique spend tag may become public, while its connection to a specific previous commitment remains hidden to the average observer.

This mark is called nullifier. The name suggests invalidation, but it is not an instruction to erase the record of receiving funds. It denotes the value by which the validator checks whether the corresponding spend has already been recorded. A note is not a public coin with a serial number that was first seen when received by the wallet and then read again when paying. Such a simple scheme would immediately link receiving with spending. In a shielded protocol, public evidence is structured differently, and it is this difference that makes the question interesting.

The Zcash Protocol Specification, sections on notes and nullifiers describes the distinct roles of commitments and spend tags. A commitment lets the protocol place an obligation concerning a note in a verifiable tree without revealing its contents to a normal observer. When spent, a nullifier and proof of the necessary connections are presented. The word “links” is important here: you can’t just come up with a new random tag every time you try and ask the network to consider it an unused permission. The public mark must be cryptographically consistent with what is actually being spent.

Imagine a hypothetical note N, for which a valid calculation yields a mark F. The first actual spend reveals F. A second attempt to spend the same note should again result in the same specified tag, rather than a freely chosen G. If the owner could change it at will, the set of values already seen would not protect against repeated spending. Therefore, the inability to bypass the connection between note and nullifier is part of the protocol design. A unique label is only useful when accompanied by proof that it cannot be arbitrarily replaced.

The observer does not need to know which previous commitment corresponds to F. A valid proof establishes the required statements without publishing a full witness. The note data and relevant key material are used in the pool-specific rule calculation. This is not a public hashing of a visible commitment string, which anyone could repeat for all records and get a table of correspondences. If we explain nullifier as a regular public number of the previous output, the main private boundary disappears in the explanation itself.

Repetition is visible, origin does not have to be visible

For a validator, after checking the evidence, the task becomes completely defined. In the state of the selected chain there is a nullifier set for the relevant pool. New marks should not repeat those already taken into account. In addition, repetitions are prohibited both within a single transaction and between transactions on a valid chain. Therefore, two competing attempts to spend one note do not become two valid payments because they came from different connections or have different complete transaction bytes. A common mark connects the conflict at the right level.

This is a different kind of connection than public ownership history. An observer sees that a particular nullifier is present in a transaction and is able to compare that value with other values presented. However, such a comparison does not in itself reveal the name of the recipient of the original note, its amount and the place of receipt. The protocol reveals the relation necessary to prohibit repetition, without promising to reveal all other relations. Privacy here does not mean the absence of any public data. It means limiting what conclusions can be drawn from the data given the accepted cryptographic assumptions.

In the conceptual illustration, the closed vessel and the separate public mark maintain this distance. The vessel does not have an external mark that matches the imprint on the glass. This is more important than an attractive lock: the picture should not imperceptibly draw a direct connection that the text explains as hidden. But the analogy is still limited. The network does not have a physical box and a caretaker comparing seals. Its decision follows from formal data, proofs and chain state. The image helps frame the question, rather than prove the security of the construction.

A sealed envelope lies beside a ledger of marks and a rejected repetition on a loose slip.
ITNWS AI-generated conceptual illustration. A matching mark identifies repetition without itself revealing the envelope’s hidden contents. — ITNWS · image_gen · Original ITNWS AI-generated conceptual editorial illustration

There is a subtlety that clearly shows the difference between public and known to the owner. A wallet with suitable data is able to calculate the expected marks of its notes and note their spending in history. The corresponding monitoring capability can be conveyed by appropriate viewing data. Therefore, the statement "no one can link a nullifier to a note" is too strong. We are talking about an ordinary external observer without such information. The owner and authorized observer may know more, and the data they reveal changes the boundary of available knowledge.

ZIP 315 on Wallet Practices discusses recognizing the spending of notes known to a wallet and the consequences of disclosing the information. On the date of verification, the document has the Draft status; it cannot be presented as a new binding consensus rule. For our argument it is useful as a document of how technical knowledge becomes a user-visible balance. The wallet links its own stored data with public history. The validator does not need to receive the wallet’s entire private record to prohibit repetition.

The receiving tree and the spending set follow different rules

Once spent, the previous commitment does not have to disappear from the tree as if a note were crossed off the list of goods. The tree accumulates commitments, and the set of nullifiers takes into account the marks used. If you look only at the presence of commitment in the historical tree, you cannot conclude that the corresponding value is still available to spend. To do this, you need to take into account the other part of the state. This separation allows you to preserve evidence of the existence of the note and separately prohibit its repetition. Removing the old leaf is not a necessary way to express prohibition.

This implies a requirement for an explanation of zero knowledge. Just saying "my note existed somewhere" is not enough if the same note can be used again. The check must match it with the disclosed nullifier and other validity conditions. And the set of already used tags should eliminate repetition. These parts work together. A beautiful proof of existence is not a substitute for tracking spends; a neat set of random strings is no substitute for proof of their origin. Without either connection, the human phrase “I have money” would be technically incomplete.

Different shielded pools have their own definitions. ZIP 224 about Orchard, created on February 27, 2021 with status Final, explains differences with Sapling and refers to the protocol specification. Therefore, you cannot mechanically transfer a nullifier formula from one pool to another just because of a common name. The public role remains similar, but the composition of the note, cryptographic functions, and proof details differ. This material explains the general architectural idea and does not offer its own formula for implementing a wallet.

In particular, an Orchard Action combines spend and output components. The protocol also provides dummy components necessary for the intended form of transaction. Therefore, the mere number of visible marks cannot be indiscriminately declared as the number of actual payments between people. The consensus mechanism works with certain objects and evidence; social events do not have to have a one-to-one correspondence with them. Strong statistics on the number of fields can reveal more about the author’s counting method than about actual user behavior.

The scope of the set is also significant. The specification treats nullifiers from different pools as belonging to different spaces, even if the bit pattern matches somewhere. Therefore, the validation key cannot be mentally reduced to a single string without a pool context. Coincidence of bytes in different areas does not have to mean a double spend. Conversely, repetition cannot be ignored within the desired area because the transactions externally look completely different. The comparison derives its meaning from what objects the protocol declares to be comparable.

The state of the chain adds time. If a transaction is only in the mempool of one node, this does not equate to its final presence in the consistent history. A node may use local rules for conflicting unconfirmed transactions. But a public set in a protocol sense is associated with the treestate of a particular chain. When the selected branch changes, the check must match the new state. You cannot save “saw a nullifier somewhere on the Internet” once and forever consider it the equivalent of a confirmed spend.

When reorganizing, it is not the cryptographic properties of the mark that are canceled, but the assumption of its inclusion in the selected history. A transaction from an abandoned branch may be a candidate for reincorporation if the remaining rules and the new state allow it. This is not a second independent spend of the note in a single valid chain. The distinction is especially important for a wallet: its local mark must have a connection with the confirmation and branch, otherwise the user will see the balance disappear forever after a history change that the program did not take into account.

It is also impossible to deduce the complete anonymity of human behavior from the very presence of nullifiers. There remain open parts of transactions, boundaries between pools, network observations and voluntary disclosures. This is not a list of analysis methods or an assessment of a specific payment. It is enough to preserve the scale of the inference: the mechanism in question hides the desired connection under certain conditions and at the same time prohibits repetition. It does not erase any external knowledge that the observer may have had before reading the blockchain or acquired independently of it.

For the interface, this means the need to state precisely what has been established. “Our wallet recognized the spend of this note” is based on its own data. "Node rejected repeated nullifier" describes the public conflict check. “This person paid this person” would require a different basis. Mixing these sentences makes the shielded protocol either an incomprehensible magic or a promise of omniscience. Technical accuracy allows each participant to be left with their own knowledge, without requiring the validator to read personal financial history for the sake of simply prohibiting repetition.

Nor should nullifier be considered a secret that the network must hide after it is spent. For the repetition check itself, it must be available to the validator. What remains secret to an outside observer is a specific connection to a previously received note, and not necessarily every byte involved. This difference changes the human formulation: a shielded payment may intentionally leave evidence open if it does not reveal an unnecessary relationship. The public visibility of an element and the privacy of the entire structure are not mutually exclusive.

Therefore, the saved nullifier does not replace the authorization key. Knowing an already published tag does not authorize an arbitrary new valid spend and does not allow you to select another note for the same amount. It helps you recognize a conflict or associate an event with one’s own viewing data. The right to spend remains subject to the specified keys, proofs, and conditions. You cannot rename a useful check ID into a standalone payment instrument just because it is unique.

Sources were checked on November 6, 2026. ZIP creation dates and their statuses are separate from the reading date; activation of network updates, wallet versions and the state of a specific node were not established here. All examples are logical, ZEC transactions were not created. The original question no longer asks to publicly name the hidden note. The network only needs to check the intended connection and remember the unique mark in its valid history. Privacy is preserved due to the fact that proving the prohibition of repetition and telling the origin of money are different tasks that do not necessarily require the same amount of information.

Sources & documentation

  1. Zcash Protocol Specification, v2026.7.0-318-ga34cfc [NU6.2] ↗
  2. ZIP 224: Orchard Shielded Protocol (Final, created 27 February 2021) ↗
  3. ZIP 315: Best Practices for Wallet Implementations (Draft, created 26 April 2022) ↗