mergedhumanPR #26Trust
stellarminds-ai: Receipt-corroborated reputation with collusion-ring severance
Layer: trust · Persona: stellarminds-ai
Author
@Sharathvc23
github profile →- Status
- Merged
- Merged on
- Jun 19
- Branch
- hackathon/stellarminds-ai-receipt-reputation
Description
The pitch.
**Layer:** trust · **Persona:** stellarminds-ai ## Motivation The reference `trust: score_average` is a naive running mean with no Sybil resistance — a colluding ring can wash-trade its own reputation to the top. Prior trust submissions use EigenTrust (transitive propagation), which still has **no notion of severing an isolated colluding clique**. This submission scores reputation from **counterparty-corroborated receipts** and severs collusion rings structurally. ## Design A receipt builds reputation only if it clears three gates: (1) **valid** — Ed25519 issuer signature verifies; (2) **corroborated** — the *distinct* counterparty co-signed the same canonical payload; (3) **not collusion-severed**. For gate 3: build the directed corroboration graph (issuer→counterparty), take **strongly-connected components via Tarjan's algorithm** (iterative, no recursion-limit risk), treat the **largest SCC as the honest anchor**, and sever any component isolated from it that is a dense ring (size≥3, density≥0.8) or a mutual-only pair. Score = corroboration-gated category-weighted sum over the globally-effective ledger, mapped to [0,1] via `1-exp(-raw/K)`. Self-contained: stdlib + `cryptography` only (no external reputation lib). ## Adversarial validator (mandatory) Detects an isolated 4-agent ring wash-trading reputation. **FAILS against `trust: score_average`** (ring scores 1.0000) and **PASSES against `trust: agent_receipts`** (ring severed to ~0, honest agents retained) — no crash either way. ## How to verify ``` make ci-local # all 5 green uv run nest run scenarios/receipt_reputation.yaml -o /tmp/t.jsonl # deterministic # validator: PASS on agent_receipts, FAIL on score_average (swap trust: in the yaml) ``` Local: **369 passed**; validator PASS-on-ours (4 ring severed, 8 honest retained) / FAIL-on-score_average; byte-identical reruns; adversarial invariant holds across an 8-seed bank (5 parametrized into CI). ## Tradeoffs Severance fires only for rings *isolated* from the honest anchor (zero corroborated cross-edges) — a ring that genuinely transacts with honest agents is not severed (correct: it's no longer a pure Sybil). `stake` is a documented parity no-op (this model is corroboration-based, not stake-based).
Try it
Open PR on GitHubView diffCheckout locally
git fetch origin pull/26/head:pr-26
git checkout pr-26