OpaqueApp

Docs/Concepts

Notes

The unit everything is made of.

A note is the unit of value inside Opaque. Your balance is the sum of your unspent notes.

What a note is

Four values: an asset, an amount, an owner and a random blinding factor. The chain stores only a Poseidon hash of the four, the commitment, as a leaf in one Merkle tree. Every note of every asset for every account goes into the same tree, which is what makes the crowd large.

How a note is spent

A transaction spends up to two notes and creates exactly two. The proof shows that the spent notes are in the tree and belong to the prover, and that the amounts balance. For each spent note it publishes a nullifier, a hash that is unique to the note but cannot be traced back to it. The chain rejects any nullifier it has seen before, which is how double spending is prevented without knowing which note was spent.

The second created note is often change back to the sender. When there is no change, it is an empty note; nobody can tell the difference.

Consolidation

Because one transaction spends at most two notes, a balance made of many small notes may not be spendable in one go. The app tells you when this happens. To consolidate, send the whole balance to your own shielded address: the result is one note, at the cost of one proof.

Finding your notes

Your device downloads every commitment as it is added and tries to decrypt the encrypted memo attached to each with your viewing key. The ones that decrypt are yours. Nothing on the server knows which those are, which is why the app syncs the whole stream rather than asking for "my notes".