Repository navigation
docs: add anti-wash-trading mitigations to reputation system (#155) - #178
Conversation
Addresses capital-intensive wash trading where an attacker cycles funds through self-dealing channels to build reporter credibility cheaply. Adds distinct-counterparty discount (min 5 unique counterparties for full credit) and settlement time decay (half-life ~7 weeks) to the reporter weight calculation, replacing total_settled_value with effective_settled_value in the formula. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
Pull request overview
Updates the reputation ADRs to add explicit anti–wash-trading mitigations by redefining reporter weight as “effective settled value” (counterparty-diversity discounted and time-decayed), and reflects that change in the architecture summary.
Changes:
- Replace
total_settled_valuewitheffective_settled_valuein the Section 4 reporter-weight formula and related definitions. - Add Sections 4.1–4.2 describing distinct-counterparty discount and exponential time decay, plus update the Mermaid flowchart.
- Update
adr/architecture.mdto summarize the new effective-settled-value weighting.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| adr/008-reputation.md | Introduces “effective settled value” adjustments (diversity + decay), updates formulas/diagram, and expands consequences/scope notes. |
| adr/architecture.md | Updates the high-level architecture summary to reference effective-settled-value weighting instead of total settled value. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request introduces anti-wash-trading mechanisms to the reputation system by replacing the raw settled value with an 'effective settled value.' This new metric incorporates a distinct-counterparty discount, requiring at least five unique counterparties for full weight, and an exponential time decay with a 6.9-week half-life to ensure ongoing economic activity. The documentation and architectural diagrams have been updated to reflect these changes. Feedback focuses on optimizing the recomputation of the maximum observed settled value to ensure scalability and improving the consistency of the Mermaid diagrams by using defined parameter names instead of literal values.
- Fix fee references from hardcoded 3% to 1.5–3% range with ADR 003 cross-reference (Copilot feedback) - Clarify diversity_factor scales time-decayed sum, not un-decayed gross (Copilot feedback) - Fix age_i → age_weeks_i in Mermaid diagram for unit clarity Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- Fix $37.50 → ~$30 with explicit derivation (3% of $1,000) - Replace orphaned total_settled_value parenthetical with plain English - Add "within the last 52 weeks" to distinct_counterparties definition - Add 52-week filter node to Mermaid diagram Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Summary
total_settled_valuewitheffective_settled_valuein the Section 4 formula and updates the Mermaid diagram, PoC scope table, and Consequences sectionarchitecture.mdsummary to reflect the new adjustmentsCloses #155
Test plan
total_settled_valueno longer appears in any formula (only in parentheticalgross_settled_valuedefinition)effective_settled_valueappears in Section 4 formula, Sections 4.1–4.2, and Mermaid diagram🤖 Generated with Claude Code