How it works
Notes, a tree, and a proof.
Notes
A note says: this token, this amount, this owner. The pool stores only its fingerprint, called a commitment. You cannot read a note from its fingerprint.
owner = H(spending key, 1) commitment = H(H(owner, random), token, amount) tag = H(spending key, commitment, position)
The tree
All commitments sit in one Merkle tree with room for about a million notes. The root is a single number that stands for the whole pool.
Spending
To spend, your browser proves that your note is somewhere in the tree. It also publishes a tag for that note. A tag can appear only once, so a note can be spent only once. Nobody can tell which note a tag belongs to.
Finding your money
Each note comes with an encrypted message. Your app downloads every message and tries to open each one with your key. The server never learns which ones opened.
Swaps
A swap spends your notes, trades a public amount against the market, and puts the result in a new note. The proof is locked to your price limit and your output note, so the relayer cannot change them.