Unirep
  • 👏Welcome
  • 🧩Introduction
  • 🎮Getting Started
    • Install & build 🛠
    • Start with cli commands 🔌
      • 0. Install and build
      • 1. Spin up the testing chain
      • 2. Deploy Unirep contract
      • 3. User generates semaphore identity
      • 4. User signs up
      • 5. Attester signs up
      • 6. User generates epoch key and epoch key proof
      • 7. Attesters/Users verify epoch key proof
      • 8. Submit epoch key proof to Unirep smart contract
      • 9. Attester attest to epoch key
      • 10. Epoch transition
      • 11. User state transition
      • 12. User generates reputation proof
      • 13. Attesters/ Users verify the reputation proof
      • 14. User generates sign up proof
      • 15. Attesters/ Users verify the sign up proof
    • Start with Typescript 📠
      • 0. Install packages
      • 1. deploy
      • 2. User signs up
      • 3. Attester signs up
      • 4. Epoch key proof
      • 5. Attest
      • 6. Epoch transition
      • 7. User state transition
      • 8. Reputation proof
    • Computation happens off-chain ℹ️
  • ☀️Protocol
    • Glossary
      • Users and Attesters
      • Epoch
      • Epoch Key
      • Reputation
      • Trees
      • Nullifiers
      • Epoch Transition
      • User State Transition
    • Circuits
      • Epoch Key Proof
      • Reputation Proof
      • User Sign Up Proof
      • User State Transition Proof
    • Contract
      • Sign up
      • Attestations
      • Epoch transition
      • User state transition
      • Verify proofs
  • 🌈Package usage
    • @unirep/crypto
    • @unirep/circuits
    • @unirep/contracts
    • @unirep/core
    • @unirep/subgraph
    • cli
      • Deploy Unirep Contract
      • User Identity
      • User Sign Up
      • Epoch Key And Proof
      • Attestation
      • Epoch transition
      • User state transition
      • Reputation Proof
      • Airdrop Reputation
      • Spend Reputation
  • 🌻Applications
    • Unirep Social
Powered by GitBook
On this page
  • Reputation
  • Attestation

Was this helpful?

Edit on GitHub
  1. Protocol
  2. Glossary

Reputation

Definition of reputation in UniRep

PreviousEpoch KeyNextTrees

Last updated 2 years ago

Was this helpful?

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 function.

const hashReputation = hash(posRep, negRep, graffiti, signUp)
  • The overall reputation status of a user is stored in the user's

    • 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 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

See also

☀️
Trees
Epoch Transition
User State Transition
User State Transition Proof
Poseidon hash
circuit
User State Tree