Skip to content

docs(adr): close #453 risk 4 — wash-trading economics appendix - #523

Closed
thiras wants to merge 4 commits into
mainfrom
adr-453-wash-trading-appendix
Closed

thiras wants to merge 4 commits into
mainfrom
adr-453-wash-trading-appendix

Conversation

@thiras

@thiras thiras commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Resolves the ADR-set's dependency on a non-existent reference document. Four canonical ADR sites cited internal/ideas/wash-trading-economics.md as the quantitative backing for the gauge-pool launch prerequisite and the per-operator gauge-share cap rationale:

  • adr/008-reputation.md:253 — reputation-as-off-chain-signal mechanism
  • adr/026-gauge-boost-tokenomics.md:97 — Pre-launch gauge accumulation launch prerequisite
  • adr/026-gauge-boost-tokenomics.md:158 — Per-operator gauge-share cap rationale
  • adr/026-gauge-boost-tokenomics.md:619 — Risks section quantitative-analysis pointer

The target file never existed in the internal repo (verified via ls internal/ideas/ and git log --all --diff-filter=D on the internal repo). The four references were dangling, and the launch-gating economic argument was not auditable from the canonical ADRs.

This PR authors the analysis as adr/appendix-wash-trading-economics.md, following the conventions of appendix-fraud-detection.md and appendix-l2-deployment.md:

  • Breakeven derivation. Per \$1 wash-traded, leakage is 8c (treasury 5% + safety 3%), gain is min(share_fraction, cap) × 40c (gauge bucket). Setting gain = cost yields a breakeven working_bytes share fraction of 20%. Cap default 5% leaves a 15-percentage-point margin; cap upper bound 25% sits just above breakeven — rationale for that being the upper bound rather than higher.
  • Sybil expansion. Per-pseudo-operator capital lockup of 50,000 TOKEN (ADR 026 §7) scales linearly with operator count, while the per-cycle USDC margin remains net-negative at the cap. Converts wash-trading from heuristic-bypass into stake-proportional capital lockup. The ADR 008 §4.1 distinct-counterparty discount adds reputation-layer cost.
  • TOKEN-price interaction. Capital lockup denominated in TOKEN, gain in USDC; sybil expansion is cheapest at genesis-low TOKEN prices — precisely the window the ADR 026 §2 Pre-launch gauge accumulation prerequisite addresses by escrowing the 40% gauge bucket until the cap is enforced.
  • Residual risk. Cross-operator collusion, real-traffic operator concentration (intended), and FeeRouter share drift via governance are bounded by supplementary mechanisms named in the appendix; the analysis is conditional on the current shares and the cap being enforced.

The four citation sites are updated to point at the new appendix.

Test plan

This is docs-only; no code changes. Verification:

  • pre-commit run --files adr/008-reputation.md adr/026-gauge-boost-tokenomics.md adr/appendix-wash-trading-economics.md passes
  • grep -rn 'internal/ideas/wash-trading-economics' adr/ returns zero matches (was 4 before this PR)
  • All appendix anchor links resolve — spot-checked #pre-launch-gauge-accumulation, #per-operator-gauge-share-cap, #3-gauge-boost-formula, #2-feerouter-split-40407553, #7-operator-economics-and-minimum-stake, #11-governable-parameters-with-safety-bounds, #12-gauge-pool-wash-trading-reputation-as-off-chain-signal, #41-distinct-counterparty-discount
  • Reviewer to verify the 8c-leakage / 20%-breakeven derivation is consistent with the internal design spec's full wash-trading analysis (the appendix is conservative — it treats burn and delegator as recoverable for a wash-trader who is also a staker/ve-locker; treating either as leakage strengthens the defense)

Refs #453

🤖 Generated with Claude Code

Resolves the ADR-set's dependency on a non-existent reference document. ADRs 008 §12, 026 §2 Pre-launch gauge accumulation, 026 §3 Per-operator gauge-share cap, and 026 § Risks each cited `internal/ideas/wash-trading-economics.md` as the quantitative backing for the launch prerequisite and the cap-bound safety argument. That file never existed in the internal repo. The four references were dangling and the launch-gating analysis was not auditable from the canonical ADRs.

This PR authors the analysis as `adr/appendix-wash-trading-economics.md`, following the conventions of `appendix-fraud-detection.md` and `appendix-l2-deployment.md`. The appendix derives the per-cycle breakeven for the per-operator gauge-share cap from the canonical FeeRouter shares: with 8c treasury+safety leakage per `$1` wash-traded and 40c of recoverable gauge share weighted by the wash-trader's `working_bytes` fraction, the breakeven share fraction is 20%. The default cap of 5% leaves a 15-percentage-point margin below breakeven; the governance upper bound of 25% sits just above breakeven (rationale for that being the upper bound rather than higher). Sybil expansion is bounded by per-pseudo-operator `StakingRegistry` lockup (50,000 TOKEN × N) and the ADR 008 §4.1 distinct-counterparty discount. Token-price interaction is the converse of the naive concern — sybil expansion is cheapest at genesis-low prices, which is the precise window the §2 launch prerequisite addresses.

The four citation sites are updated to point at the new appendix.

Refs #453

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

@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 a new appendix document, adr/appendix-wash-trading-economics.md, which provides a detailed quantitative analysis of wash-trading economics, the 5% per-operator gauge-share cap, and sybil expansion costs. Existing references in adr/008-reputation.md and adr/026-gauge-boost-tokenomics.md have been updated to link to this new appendix. Feedback was provided to correct a logical inconsistency in adr/026-gauge-boost-tokenomics.md where the text incorrectly identified high TOKEN prices as the primary risk factor for wash-trading, whereas the appendix correctly identifies that low prices make sybil expansion more affordable.

Comment thread adr/026-gauge-boost-tokenomics.md Resolved

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

thiras and others added 3 commits May 11, 2026 13:02
…tation

Three review fixes:

1. Reframe the FeeRouter-bucket walkthrough so the 8¢ figure is explicitly the *minimum non-recoverable* leakage (treasury + safety), not a net-of-recoverable-buckets figure. The prior wording said burn and delegator were "treated as recoverable below" with a contradictory "conservative direction is to exclude it" qualifier. Burn recovery is bounded above by the wash-trader's pro-rata supply share (≈0.005% for a min-stake wash-trader, effectively zero); delegator recovery depends on the wash-trader's ve-position. Classifying either as additional leakage only strengthens the defense, so 8¢ is a lower bound on the actual per-cycle leakage. The breakeven derivation in the next section is unchanged — it was already conservative.

2. Disambiguate `c` notation. Cap variable `c = MAX_GAUGE_SHARE_PER_OPERATOR` collided with `c` as the cents unit (`40c`, `8c`, etc.) — easy to misread. Cap variable is now `cap`; dollar amounts are now `$0.40` / `$0.08` / etc. throughout the breakeven derivation, the cap-vs-net table, the sybil-extraction formula, and the launch-prerequisite section.

3. Fix terminology slip in References: "sybil-extension reputation discount" → "sybil-expansion" to match the section title above.

Refs #453, PR #523

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ivation

The pre-launch gauge accumulation paragraph at §2 said wash-trading is "net-profitable at TOKEN price 3–5× genesis" — a claim inherited from the previously-cited internal/ideas analysis. The new appendix's TOKEN-price-interaction section derives the opposite: per-cycle wash-trade margin is +$0.32 per $1 without the cap regardless of TOKEN price (the gain is denominated in USDC; the cap, not the price, governs profitability per cycle), and the *sybil-expansion* attack vector — multiple pseudo-operators each below the cap — is cheapest at *genesis-low* TOKEN prices because per-pseudo-operator stake lockup is denominated in cheap TOKEN. The hazard the launch prerequisite addresses is therefore the genesis-low sybil window, not high prices.

Reword §2 to state both: wash-trading is net-profitable without the cap (the per-cycle claim), and the hazard is highest at genesis-low TOKEN prices (the sybil-expansion-cost claim). This is consistent with the appendix derivation and removes the internal inconsistency Gemini flagged on PR #523.

Refs #453, PR #523

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…ution and ve-boost amplification

Substantive revision in response to the comprehensive review (PR-review-toolkit). The prior derivation was mathematically incorrect: it wrote gain per `$1` wash-traded as `min(s, cap) × $0.40` and derived a 20% breakeven, but ignored that the wash-trader pays into the same gauge bucket they claim from. The corrected per-`$1`-wash slice is `min(s, cap) × $0.40 × X_total / X_wash = (min(s, cap) / s) × $0.40`, which collapses to `$0.40` whenever `s ≤ cap` (the slice equals the wash-trader's own contribution to the bucket) and to a strictly smaller value when the cap binds.

The corrected derivation:

1. **Closed-pool argument.** Under uniform ve-share assumptions, the wash-trader's net gauge revenue is exactly zero when the cap doesn't bind and negative when it does. With the `$0.08` minimum non-recoverable leakage to treasury + safety, single-operator wash-trading is **structurally net-negative at any cap value the protocol could plausibly configure** — the cap is not the binding mechanism; the closed-pool dilution is.

2. **Ve-boost amplification.** The actual `working_bytes` formula creates an asymmetry: a ve-locked wash-trader's effective share can exceed their raw byte share by up to 2.5× when the honest set is non-ve. This is the regime the cap defends against — without the cap, ve-boost amplification can flip the per-cycle payoff net-positive against the leakage floor. The cap bounds per-operator gauge capture at `cap × $0.40` per `$1` of bucket, closing off the amplification route below the leakage floor at any cap below ~20%.

3. **Sybil expansion is the binding defense at multi-operator scale.** When a wash-trader splits across N pseudo-operators each below the cap, every pseudo-operator falls back to the closed-pool result and the per-operator cap stops binding. The structural defense becomes the per-pseudo-operator capital lockup (50,000 TOKEN × N from ADR 026 §7) plus reputation-layer cluster detection (ADR 008 §4.1, §12). Capital lockup is cheapest at genesis-low TOKEN prices — the precise window the §2 launch prerequisite addresses.

Other accuracy fixes from the review:
- `$0.08` figure now explicitly conditional on steady-state FeeRouter shares; launch-time shares require re-derivation
- Collusion bullet now correctly states 4+ operators are needed at the default 5% cap (not "two or more")
- 7-day unbonding default attributed to ADR 026 §7 (not ADR 009, which only specifies the [3d, 30d] bounds)
- `+$0.32` framing is now upper-bound qualified throughout, not presented as typical margin
- Burn-recovery framing acknowledges price-impact dimension as out-of-scope for per-cycle accounting
- Working_bytes vs raw bytes parenthetical inconsistency removed
- Cap-near-upper-bound and gauge-share-drift added as residual risks
- Bootstrap `total_ve == 0` edge case noted as residual

Cross-citation updates:
- `adr/026-gauge-boost-tokenomics.md:97` reworded to align with the corrected derivation: cites ve-boost amplification (not unconditional "net-profitable") and identifies the §7 capital lockup as the structural defense at multi-operator scale
- `adr/architecture.md` adds the appendix to the Appendices reference list for discoverability (previously not indexed)

Refs #453, PR #523

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
alpergundogdu added a commit that referenced this pull request May 11, 2026
The four wash-trading-defense citations pointed at `internal/ideas/wash-trading-economics.md`,
a file in the private repo that never existed and never will — the `internal/` repo will
not be made public. Replace the pointers with self-standing structural prose:

- adr/008-reputation.md §12: drop parenthetical pointer; the design claim ("economically
  marginal at any reasonable TOKEN price") stands alone.
- adr/026-gauge-boost-tokenomics.md §2 Pre-launch gauge accumulation: replace the
  quantitative claim ("net-profitable at 3-5× genesis") with the structural reason
  already public via §3's formula — ve-boost amplification opens an effective-slice >
  fee-contribution-share asymmetry. Link to §3 for the defense.
- adr/026-gauge-boost-tokenomics.md §3 Rationale: drop the trailing
  "Quantitative analysis: …" sentence; the paragraph above already explains the
  closed-pool dilution + sybil capital-lockup defense.
- adr/026-gauge-boost-tokenomics.md Risks: drop the "see … for the quantitative analysis"
  clause from the wash-trading bullet.

Refs #453 risk 4. Supersedes #523 (which created a public appendix derived from the
internal source spec — that is a leak in the opposite direction).
@thiras
thiras deleted the adr-453-wash-trading-appendix branch May 14, 2026 17:16
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.

3 participants