Skip to content

[ZK] ZK reputation proofs #36

Description

@Gbangbolaoluwagbemiga

User story

A freelancer wants to prove "I have completed ≥ N jobs" or "my average rating ≥ X" to a
prospective client without revealing which clients, projects, or amounts are behind that record.

Background

Reputation is tracked on-chain (ratings.rs: get_average_rating, get_completed_escrows,
get_badge). Today these expose the full history. ZK lets the freelancer prove a threshold while
keeping specifics private.

What needs to be done

  • Circuit: input = the freelancer's private rating/completion records (+ Merkle membership in
    the on-chain reputation set); public = threshold N / X and a commitment root
  • Verifier per the architecture chosen in [ZK] Research spike: ZK verification on Soroban #35 (on-chain or attested)
  • Contract entrypoint: verify_reputation_proof(...) returning pass/fail, with a nullifier to
    prevent replay
  • Frontend: generate the proof and show a "verified reputation" badge

Acceptance criteria

  • A valid proof for a true statement verifies; a false statement fails
  • No private record is revealed on-chain
  • Replay-protected

Relevant files

contracts/secureflow/src/ratings.rs, src/components/reputation-score.tsx

Depends on #35.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew product capabilityzkZero-knowledge / privacy

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions