Skip to main content
Version: 1.0.1

Reputation

Reputation

  • The reputation in UniRep protocol includes
    • posRep: is the positive reputation given by the attester
    • negRep: is the negative reputation given by the attester
    • graffiti: is the message given by the attester
    • signUp: indicates if the attester authenticates the user
  • The hash of the reputation is computed by the Poseidon hash function.
const hashReputation = hash(posRep, negRep, graffiti, signUp)
  • The overall reputation status of a user is stored in the user's User State Tree
    • where the index of the leaf is the attester ID
    • the leaf value is the accumulated hashReputation that the attester gives

Attestation

  • The attestation is almost the same as reputation, but it includes an attesterId
  • The hash of attestation is computed by
const hashAttestation = hash(attesterId, posRep, negRep, graffiti, signUp)
  • The attestations to an epoch key would be chained together. A hashchain would be formed by the hashes of the attestations.

    • For example, Hash chain is computed by
    const hashChainResult = hash(hashAttestation_3, hash(hashAttestation_2, hash(hashAttestation_1, 0)))
    • So user can not omit any attestation because the circuit requires each attestation in the hashchain to be processed.
      -> Non-repudiable
    • if user omits an attestation, then the computed hashchain would not match the one in the Unirep contract