Skip to content

docs(adr): scope protocol ADRs to protocol — relocate watchtower side-business economics - #362

Merged
thiras merged 2 commits into
mainfrom
docs/scope-protocol-adrs
Apr 30, 2026
Merged

thiras merged 2 commits into
mainfrom
docs/scope-protocol-adrs

Conversation

@thiras

@thiras thiras commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Closes #257.

Why

#354 reclaimed 028-032 by relocating operational programs and future-product proposals to internal/ideas. #257 asks for a continuation: protocol ADRs should focus on protocol mechanisms, with residual economics moved to ADR 026, the relevant appendix, or trimmed to a cross-ref.

Audit summary

A workspace-wide grep produced a hit list of every economic-prose token (USDC|TOKEN|cost|fee|gas|economics|incentive|payback|break.even|ROI) in adr/0*.md and adr/architecture.md. After classification:

Status Reasoning
Targeted Operational/economic content that does not define a protocol mechanism, OR verbatim duplication of ADR 026 / 016.
Preserved Protocol-mechanism rationale (e.g. challenge bonds, rate-floor justifications, gas amortisation arguments) — load-bearing, not duplicative.

What

Two genuine cleanup targets, surgically addressed.

1. ADR 007 §"Break-Even Economics" → new appendix

The §Monthly cost model + break-even tables are operator-decision territory (sensitive to L2 gas markets and channel-deposit distributions); the protocol mechanism — heartbeat batching, fee formula, dispute-gas bonus — stays in ADR 007 §5 as a renamed §"Heartbeat batching" subsection. The cost-model content is preserved verbatim in adr/appendix-watchtower-economics.md.

ADR 007 loses ~22 lines of operational prose; gains 5 lines of cross-ref. Net: -17 LOC in the protocol ADR.

2. ADR 009:66 cashflow-rationale → cross-ref to ADR 016

The 20% node-base-share floor's "infrastructure cost" rationale was a verbatim duplicate across ADR 009 / ADR 016 / ADR 026 §11. ADR 009 now cross-refs the canonical statement in ADR 016 §FeeRouter (production) instead of restating it. The boostFloor justification (ADR-009-specific) is preserved.

Files

File Change
adr/appendix-watchtower-economics.md (new) Receives the §Break-Even Economics block from ADR 007.
adr/007-watchtower.md §"Break-Even Economics" → §"Heartbeat batching" with content moved to the appendix. -22 / +5 lines.
adr/009-governance.md Cashflow-rationale sentence replaced by cross-ref to ADR 016 §FeeRouter (production). 0 LOC delta.
adr/README.md Appendix-list prose updated in both Reading Order and Decision-Record-Context sections.
adr/architecture.md New entry 6 in §Appendices — Reference Patterns.

Things deliberately NOT touched after audit review

  • ADR 005 cost asides justify protocol mechanisms (RTT cost, handshake amortisation) — load-bearing, not duplicative.
  • ADR 012 §Economic threshold justifies the parallel-fetch --min-blob-size default with channel-lifecycle cost arithmetic cross-referenced from ADR 003 — protocol-policy rationale, not duplication.
  • ADR 014 challenge-bond economics are protocol mechanism (proportional rate-limiter against frivolous challenges).
  • ADR 016 §FeeRouter Cashflow invariant already cleanly cross-refs ADR 026 §11; the duplication is on the ADR 009 side, not on 016.
  • ADR 026, 027, 018, 010, 003 are themselves the tokenomics / payments ADRs — economic prose is in scope.

ADR 026 explicitly unchanged

Per the plan, ADR 026 is not edited in this PR to avoid conflicting with #355.

Test plan

  • No anchor break in ADR 007 (#8-poc-scope and #contract-watchtowerescrow still resolve).
  • No anchor break in ADR 009 — the cross-ref to #feerouter-production resolves.
  • Cost-model content preserved verbatim in the new appendix (only the surrounding prose changed).
  • markdownlint passes.

Note on conflicts with #360 and #361

This PR adds a new appendix as "entry 6" in adr/architecture.md and appends to the appendix-list prose in adr/README.md. Both #360 (operator-key-rotation) and #361 (operator-upgrade-path) do the same. Whichever lands second/third needs a trivial rebase to renumber and merge the prose appendix-list additions.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 30, 2026 19:02

@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 refactors the ADR documentation by moving the watchtower economic analysis from adr/007-watchtower.md to a new appendix file, adr/appendix-watchtower-economics.md. It also updates references in adr/009-governance.md, adr/README.md, and adr/architecture.md to reflect this change and ensure consistency. A review comment identified an outdated cross-reference in the new appendix that pointed to a renamed section in ADR 007, which should be updated to ensure link integrity.

Comment thread adr/appendix-watchtower-economics.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.

Pull request overview

Refines the ADR corpus to keep core protocol ADRs focused on protocol mechanisms by relocating operator-facing watchtower economics material into an appendix and replacing duplicated economic rationale with canonical cross-references.

Changes:

  • Added a new appendix for watchtower operating economics (cost model + break-even tables) previously in ADR 007.
  • Updated ADR 007 to keep protocol mechanism details while cross-referencing the new appendix for operational economics.
  • Updated ADR 009 to replace duplicated “cashflow invariant” rationale with a cross-reference to ADR 016, and updated ADR indexes/listing prose.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
adr/architecture.md Adds the new watchtower economics appendix to the appendices index.
adr/appendix-watchtower-economics.md New appendix containing the relocated watchtower cost model and break-even analysis.
adr/README.md Updates appendix descriptions to include operational economics in scope for appendices.
adr/009-governance.md Replaces duplicated node-base-share floor rationale with a canonical cross-reference to ADR 016.
adr/007-watchtower.md Renames the economics subsection to “Heartbeat batching” and moves operator economics to the appendix via a pointer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread adr/appendix-watchtower-economics.md Resolved
thiras added a commit that referenced this pull request Apr 30, 2026
This PR renames ADR 007 §5 from "Break-Even Economics" to "Fee Model"
and adds a new §"Heartbeat batching" subsection, but the new appendix
still cited the old path. Update to point at the canonical anchor.

Caught by reviewer follow-up on PR #362.
thiras and others added 2 commits April 30, 2026 22:45
…-business economics

Closes #257.

future-product proposals into internal/ideas. This PR continues that
scoping work for the remaining canonical ADR set: residual
operator-facing economics that don't define a protocol mechanism are
moved out of the protocol ADRs into a new appendix.

The audit was conservative — most "economic prose" in protocol ADRs
turns out to be load-bearing protocol-mechanism rationale (challenge
bonds, rate-floor justifications, gas amortisation arguments) rather
than duplicated operational analysis. Two genuine cleanup spots:

1. ADR 007 §Break-Even Economics → adr/appendix-watchtower-economics.md.
   The §Monthly cost model and break-even tables are operator-decision
   territory (sensitive to L2 gas markets and channel-deposit
   distributions); the protocol mechanism — heartbeat batching, fee
   formula, dispute-gas bonus — stays in ADR 007 §5 as a renamed
   §Heartbeat batching subsection. Net: ADR 007 loses ~22 lines.

2. ADR 009 §Governable Parameters with Safety Bounds → cross-ref to
   ADR 016 §FeeRouter (production) for the cashflow-invariant
   rationale. The 20% node-base-share floor justification was a
   verbatim duplicate across ADR 009 / ADR 016 / ADR 026 §11. ADR 009
   now cross-refs the canonical statement in ADR 016 instead of
   restating it. The boostFloor justification (ADR-009-specific) is
   preserved.

Things deliberately not touched after audit review:

- ADR 005 cost asides justify protocol mechanisms (RTT cost,
  handshake amortisation) — load-bearing, not duplicative.
- ADR 012 §Economic threshold justifies the parallel-fetch
  --min-blob-size default with channel-lifecycle cost arithmetic
  cross-referenced from ADR 003 — protocol-policy rationale,
  not duplication.
- ADR 014 challenge-bond economics are protocol mechanism.
- ADR 016 already cleanly cross-refs ADR 026 §11 / §8 for
  tokenomics; only the §Cashflow invariant block is a target,
  but ADR 009's pointer (this PR) is the cleaner path than
  shortening 016 itself.
- ADR 026, 027, 018, 010, 003 are themselves the
  tokenomics/payments ADRs and economic prose is in scope.

Index updates:
- adr/README.md: appendix-list prose updated in both Reading Order
  and Decision-Record-Context sections to mention the new appendix.
- adr/architecture.md: new entry 6 in §Appendices — Reference
  Patterns.

Net LOC for protocol ADRs: -17. Total workspace LOC: +37 (the
new appendix). The salient metric is protocol-ADR LOC reduction,
not total LOC; the cost-model content is preserved verbatim, just
relocated to its proper home.

ADR 026 is unchanged in this PR (per the plan, to avoid
conflicting with #355).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This PR renames ADR 007 §5 from "Break-Even Economics" to "Fee Model"
and adds a new §"Heartbeat batching" subsection, but the new appendix
still cited the old path. Update to point at the canonical anchor.

Caught by reviewer follow-up on PR #362.
@thiras
thiras force-pushed the docs/scope-protocol-adrs branch from c65720c to b7b2b7d Compare April 30, 2026 19:45
@thiras
thiras merged commit d5d3715 into main Apr 30, 2026
9 checks passed
@thiras
thiras deleted the docs/scope-protocol-adrs branch April 30, 2026 19:50
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.

Clear economical assumptions from ADRs

2 participants