Skip to content

[High] Solver Reputation Score v2 with Time Decay and Transparency #444

Description

@james2177

Description:
Design and implement a reputation score combining fill rate, fill latency, slashes, quote-honouring, and volume with exponential time decay, exposed with a full breakdown via API.

Problem Statement & Context:
The leaderboard ranks by simple counters. It rewards historical volume over current reliability and offers no insight into why a solver ranks where it does, which matters for routing and for community trust.

Scope & Acceptance Criteria:

  • Documented formula (RFC in docs/rfcs/) with configurable weights and half-life.
  • Computed from solver_fills and slash records; recalculated incrementally.
  • GET /solvers/:addr/reputation returns score, components, and history (daily snapshots).
  • Leaderboard supports sort=reputation; quote tie-breaking uses it.
  • Out of scope: on-chain reputation.

Implementation Guidelines:

  1. Key Files/Modules: new src/solvers/reputation.service.ts, src/solvers/leaderboard-query.ts, docs/rfcs/.
  2. Design/Architecture: Pure scoring function + persistence of snapshots; deterministic and reproducible from raw data.
  3. Edge Cases/Constraints: New solvers (cold start) must not be unfairly ranked last — Bayesian prior.
  4. Testing: Deterministic fixture tests; property tests (more slashes never raise score).

Definition of "Done": Common DoD; RFC merged.

Resources:


Common Definition of "Done" (applies in addition to the criteria above):

  • Code written, tested, and documented (TSDoc on public APIs, README/runbook/ADR updates where behaviour changes).
  • All acceptance criteria met; npm run lint, npm run typecheck, npm test, npm run test:e2e pass in CI.
  • PR follows .github/PULL_REQUEST_TEMPLATE, uses a Conventional Commit title (enforced by commitlint), includes test output / metrics screenshots, and references the issue.
  • New env vars are added to .env.example variants and src/config/env.validation.ts (the check:env-drift script must pass).
  • Reviewed and approved by at least one CODEOWNER.

Activity

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

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions