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:
- Key Files/Modules: new
src/solvers/reputation.service.ts, src/solvers/leaderboard-query.ts, docs/rfcs/.
- Design/Architecture: Pure scoring function + persistence of snapshots; deterministic and reproducible from raw data.
- Edge Cases/Constraints: New solvers (cold start) must not be unfairly ranked last — Bayesian prior.
- 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.
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:
docs/rfcs/) with configurable weights and half-life.solver_fillsand slash records; recalculated incrementally.GET /solvers/:addr/reputationreturns score, components, and history (daily snapshots).sort=reputation; quote tie-breaking uses it.Implementation Guidelines:
src/solvers/reputation.service.ts,src/solvers/leaderboard-query.ts,docs/rfcs/.Definition of "Done": Common DoD; RFC merged.
Resources:
docs/rfcs/0000-template.mdCommon Definition of "Done" (applies in addition to the criteria above):
npm run lint,npm run typecheck,npm test,npm run test:e2epass in CI..github/PULL_REQUEST_TEMPLATE, uses a Conventional Commit title (enforced by commitlint), includes test output / metrics screenshots, and references the issue..env.examplevariants andsrc/config/env.validation.ts(thecheck:env-driftscript must pass).