Nullifiers
The definition of nullifiers used in Unirep
Attestation nullifier
Attestation nullifiers are used to prevent an attester attests to the same epoch key twice.
Definition:
hash5(ATTESTATION_NULLIFIER_DOMAIN, identityNullifier, attesterId, epoch, epochKey)
ATTESTATION_NULLIFIER_DOMAIN = 1
Epoch Key nullifier
Epoch key nullifiers are used to prevent an epoch key be generated twice.
If an epoch key is used more than once, we cannot differentiate which user receives the reputation.
Definition:
hash5(EPOCH_KEY_NULLIFIER_DOMAIN, identityNullifier, epoch, nonce, 0)
nonce
is used to limit the number of epoch keys, if the nonce is more thannumEpochKeyNoncePerEpoch
the epoch key proof will be invalid.EPOCH_KEY_NULLIFIER_DOMAIN = 2
Reputation nullifier
Reputation nullifiers are used to prevent a user double spending his reputation to perform actions.
If the same reputation nullifiers submitted to Unirep contract, the transaction will be rejected.
Definition:
hash5(REPUTATION_NULLIFIER_DOMAIN, identityNullifier, epoch, nonce, 0)
nonce
is used to limit the number of spent reputation, if the nonce is more thantransitionedPosRep - transitionedNegRep
the reputation proof will be invalid.REPUTATION_NULLIFIER_DOMAIN = 3
Last updated