Lock alpha scope, tracker auth, TOPLOC fraud verification, and deferred multi-tracker money-path work; supersede legacy fraud issues with ADR-0018. Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
1.7 KiB
Markdown
40 lines
1.7 KiB
Markdown
Status: ready-for-agent
|
||
|
||
# 08 — FRAUD: Reputation model + persistence
|
||
|
||
## What to build
|
||
|
||
Implement graduated reputation per ADR-0018 §6: score derives only from tracker audit outcomes + uptime/latency. Slow build, instant loss, inactivity decay. ×0.8 routing multiplier per strike (not whole penalty — forfeiture stays full pending).
|
||
|
||
**Scope split:** issue 05 owns **schema + SQLite persistence**; this issue owns **scoring rules** (deltas, decay, strike→multiplier wiring) on top of persisted fields.
|
||
|
||
**Code refs:**
|
||
|
||
- `packages/contracts/meshnet_contracts/__init__.py` — extend `RegistryWallet` / persistence from issue 05
|
||
- `packages/validator/meshnet_validator/__init__.py` — `_slash_route` forfeiture path (~125–133)
|
||
- `packages/tracker/meshnet_tracker/billing.py` — `forfeit_pending` (~280–292)
|
||
- Research: `.scratch/alpha-hardening/research-verifiable-inference.md` §6
|
||
|
||
## Test-first
|
||
|
||
1. Red: no reputation field — add schema + default 1.0 for new wallets.
|
||
2. Green: clean audit +0.05 (tunable); failed audit −0.3 and strike; three strikes → ban persisted.
|
||
3. Inactivity decay after N days without completed jobs.
|
||
|
||
## Acceptance criteria
|
||
|
||
- [ ] `reputation_score` persisted in registry SQLite (issue 05)
|
||
- [ ] Audit pass/fail updates score with documented deltas
|
||
- [ ] Strike applies ×0.8 multiplier to routing weight (separate from forfeiture amount)
|
||
- [ ] Ban at 3 strikes; probation job count still enforced
|
||
- [ ] No peer-to-peer reputation inputs
|
||
|
||
## ADR links
|
||
|
||
- [ADR-0018](../../docs/adr/0018-fraud-detection-verification-and-reputation.md) §6
|
||
|
||
## Blocked by
|
||
|
||
- `05-a1-a5-persist-strike-ban-reputation.md`
|
||
- `07-fraud-commitment-bisection-blame.md` (audit outcomes feed reputation)
|