A note is a private UTXO: an amount of one token owned by one inbox key. Only its commitment is public.

Fields

Commitment

The commitment is inserted into the note tree and emitted in NoteAdded(index, noteCommitment, noteCiphertext). nullifiersHash makes every commitment unique. Two notes with the same owner, value and trapdoors still differ, because they come from different spends. This prevents the Faerie Gold attack, where a sender creates two identical notes and only one can ever be spent.

Special cases

Created by the contract on approval:
  • rkTrapdoor = 0
  • valueTrapdoor = revocationPublicKeyHash from the gatekeeper
  • nullifiersHash = depositIndex, which is unique per deposit
The deposit is public anyway, so the ciphertext body is written in the clear.

Lifecycle

A note is never deleted. Spending only records its nullifier.