Skip to content

docs: add anti-wash-trading mitigations to reputation system (#155) - #178

Merged
thiras merged 3 commits into
mainfrom
anti-wash-trading-155
Apr 4, 2026
Merged

thiras merged 3 commits into
mainfrom
anti-wash-trading-155

Conversation

@thiras

@thiras thiras commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds distinct-counterparty discount (Section 4.1) requiring settlements with 5+ unique staked counterparties for full reporter weight credit — self-dealing with 1 counterparty gets only 20% credit
  • Adds settled-value time decay (Section 4.2) with exponential decay (λ=0.1/week, half-life ≈ 7 weeks, 52-week max age) forcing continuous capital cycling to maintain reporter weight
  • Replaces total_settled_value with effective_settled_value in the Section 4 formula and updates the Mermaid diagram, PoC scope table, and Consequences section
  • Updates architecture.md summary to reflect the new adjustments

Closes #155

Test plan

  • Verify total_settled_value no longer appears in any formula (only in parenthetical gross_settled_value definition)
  • Verify effective_settled_value appears in Section 4 formula, Sections 4.1–4.2, and Mermaid diagram
  • Verify Mermaid diagram renders correctly with new diversity_factor and time-decay nodes
  • Verify cross-ADR consistency: no stale references in other ADRs
  • Verify architecture.md summary matches the new ADR 008 content

🤖 Generated with Claude Code

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]>
Copilot AI review requested due to automatic review settings April 4, 2026 07:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_value with effective_settled_value in 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.md to 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.

Comment thread adr/008-reputation.md Resolved
Comment thread adr/008-reputation.md Resolved
Comment thread adr/008-reputation.md Resolved
Comment thread adr/008-reputation.md Resolved

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread adr/008-reputation.md Resolved
Comment thread adr/008-reputation.md Resolved
thiras and others added 2 commits April 4, 2026 17:21
- 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reputation system is gameable via capital-intensive wash trading

2 participants