What is a nullifier?

A nullifier is a unique value published when a private note is spent. It lets the chain reject a second spend of the same note without revealing which note was spent.

Also called nullifier hash or serial number.

Explain it like I’m five

A school hands out lunch vouchers in sealed envelopes, and nobody can see whose envelope is whose. A child who spends one does not open it for the whole school. Instead the child writes a used code on a public wall, a code that only the voucher’s owner can work out from the voucher and a private secret. The code looks random to everyone else. If the same voucher is spent again, it produces the same code, and the clerk sees that the code is already on the wall.

What problem it solves

On an ordinary ledger, spending a coin is visible, so a second spend of the same coin fails. In a shielded pool the chain cannot see which note is being spent, and the note’s commitment stays in the tree forever, so the chain cannot cross it off. Something must still stop a note from being spent twice, without saying which note it was. A nullifier does both jobs. It is a public marker that is unique to the note and cannot be linked back to it.

How it works, step by step

  • Each note has exactly one nullifier. The owner computes it from the note and a secret key with a pseudorandom function, so only the owner can. Zcash feeds the calculation a value that is unique to each note, which for Sapling depends on the note’s position in the tree.
  • To spend the note, the owner publishes the nullifier and proves in zero knowledge that it was computed correctly from some note whose commitment is in the tree.
  • The proof hides which commitment it is. The chain learns only that some note was spent and that its marker is this nullifier.
  • Every validator keeps the set of all nullifiers seen, and a transaction that repeats one is invalid (Zcash’s consensus rule).
  • Without the owner’s key, nobody can match a nullifier to its commitment. A note counts as unspent while its commitment is public and its nullifier is not.
  • A wallet finds out whether its own note has been spent by computing the nullifier with its key and looking it up in the set. In Sapling and Orchard a separate nullifier key does this job, so a watch-only wallet can track spent notes without any power to spend.

A worked example

A pool holds 1,000 notes, and Alice spends one. The chain records the nullifier n1 and accepts the spend. An observer sees one marker and 1,000 possible notes, so a guess is right one time in a thousand. If Alice or anyone else tries to spend the same note again, the proof leads to n1 again, and the contract rejects it. Alice’s wallet can compute n1 itself and see that the note is spent, while everyone else sees only an unexplained marker. Her next note produces an unrelated marker, n2, which nobody can connect to n1.

What it guarantees

  • Each note has one nullifier, and Zcash’s specification requires that it is infeasible to create two notes with distinct commitments but the same nullifier.
  • Nullifiers of unknown notes cannot be linked to those notes better than by chance, even by an adversary who holds incoming viewing keys.
  • A repeated nullifier is rejected by the consensus rules, so a note can be spent only once. Because a pseudorandom function keyed by a secret produces the value, it looks random to everyone who lacks the key.
  • The nullifier sets of different pools are kept apart, so a marker in one pool never blocks a note in another.

Common misunderstandings

  • A nullifier is no hash of the note and no public ID. It needs the owner’s secret, so nobody can compute it from public data.
  • Publishing a nullifier does not reveal the spent note, since the marker cannot be linked to it. It carries no amount and no recipient either, because those stay inside the proof.
  • Spending does not delete a note from the tree. The commitment stays forever, and the nullifier marks it as used.
  • The idea reaches beyond payments. Semaphore uses a nullifier so that a group member cannot signal twice.

Where it is used

Zcash uses nullifiers in its Sprout, Sapling and Orchard pools, which keep separate nullifier sets. Semaphore, which World ID builds on, uses them to prevent double-signaling.

History

Zerocash (2014) used the idea under the name serial number, Zcash launched with it in 2016, and the Zcash specification now calls the value a nullifier.

In Redacted

In Redacted a nullifier retires each spent note forever, so a note can be spent only once, and the mark it leaves points to no note in particular. Nullifiers are computed with SHA-256.

Architecture →

Related terms

Sources: Zcash Protocol Specification, sections 3.2.3 and 3.9 · Zerocash: Decentralized Anonymous Payments from Bitcoin, Ben-Sasson et al., 2014 · What Is Semaphore?, Semaphore documentation · Zero-knowledge proofs, ethereum.org

Updated November 1, 2026. All terms