Skip to content

Add invoice creator reputation aggregator #212

Description

@Kingsman-99

Label: complexity: high
Points: 200

Description

Beyond the on-chain per-payer reputation counter (contract issue #24), the SDK should expose a creator-side reputation score combining completion rate, average funding time, and dispute rate, for display in trust indicators.

Technical Context

New src/creatorReputation.ts. Aggregates across Invoice[] for a given creator: completed vs. total, average time-to-fund (reuse Issue 17's SLA tracker), and dispute count (if src/compliance.ts exposes dispute data).

Acceptance Criteria

  • computeCreatorReputation(creator, invoices) returns a 0-100 score plus the component breakdown
  • Score formula is documented and unit-testable (weights as named constants)
  • Handles creators with zero invoices (returns a clearly-marked "insufficient data" result, not 0)
  • Tests: high-performing creator scores high; insufficient-data case handled distinctly

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions