> For the complete documentation index, see [llms.txt](https://unirep.gitbook.io/unirep-social/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unirep.gitbook.io/unirep-social/definition/nullifiers.md).

# 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 than `numEpochKeyNoncePerEpoch`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 than `transitionedPosRep - transitionedNegRep`the reputation proof will be invalid.
* `REPUTATION_NULLIFIER_DOMAIN = 3`
