Scope nullifier
n, the value a claim leaves on chain, the same for one person in one scope from any wallet.
The scope nullifier n is what a claim leaves on chain. It is the same for one person every time they claim in one scope, from any wallet, and unrelated across scopes.
How n is made
n = Poseidon(s, scope_id), where s is the person secret and scope_id is the scope's numeric ID. The claim circuit computes n from the same s that opens the claimant's leaf in the person tree, so a person can't pick a different n for a scope they already claimed in.
Two scope nullifiers of the same person look unrelated without s, and so does a scope nullifier next to the person's person nullifier N. An app that opens several scopes sees a separate list of nullifiers for each and can't tell which of them belong to the same person.
The claim receipt
A claim creates a receipt account at the address derived from ["claim", scope, n], with the scope's address as bytes and n as 32 big-endian bytes. The receipt records the scope, n, the relayer that paid its rent, when it was claimed and, for a poll, the option. claim creates the receipt in the same instruction that verifies the proof; when the account already holds a receipt, it refuses with AlreadyClaimed.
Because the address depends only on the scope and n, anyone can tell whether a person has claimed in a scope by deriving it and reading the account, and the device can do it for its own n without asking anyone. Check a claim from another program shows it from a program and from the SDK.
What the claim proves
The claim proof has one public input, a Poseidon digest of five values. The program rebuilds the digest from what it trusts, so each value is checked:
| Value | Where the program gets it |
|---|---|
root | From the instruction, then checked against the root history |
n | From the instruction; it also derives the receipt's address |
scope_id | From the scope account |
closes_at | From the scope account; the circuit proves the leaf's expiry is later |
binding | From the instruction, then checked against the payout or the option |
The binding ties the proof to one outcome. For a drop it is the owner hash of the note the payout goes to, and the program checks the payout output against it, so the relayer can't redirect the payout. For a poll it is the option's index, so the relayer can't change the vote.
The public ledger
Every scope's claims can be read as a list of scope nullifiers with their times and transactions, and nothing that names a person:
$ curl "$ONCE_API/v1/scopes/<id>/claims"The app's scope list shows an enrolled person which open scopes they have claimed in. It does this on the device, by computing the person's n for each scope and looking for it in that scope's ledger.