Skip to content

docs(adr): drop multi-token PaymentChannel; StablePaymentChannel multi-stablecoin from day 1 - #585

Closed
alpergundogdu wants to merge 1 commit into
mainfrom
claude/determined-mcnulty-66703d
Closed

alpergundogdu wants to merge 1 commit into
mainfrom
claude/determined-mcnulty-66703d

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Closes #583.

Summary

Team decision: drop the separate arbitrary-ERC-20 PaymentChannel contract and the PoC/production payment-channel split. StablePaymentChannel accepts multiple governance-allowlisted stablecoins from day 1 (USDC at launch). Non-stablecoin assets are swapped off-protocol by the holder, so the contract needs no price oracle — that was the source of unacceptable contract complexity.

What changed

  • ADR 010 → self-contained Dropped record (status Dropped); rationale only, surface moved out.
  • ADR 003 absorbs the surviving surface, scoped to stablecoins: governance allowlist (addToken/removeToken), per-token rate bounds (RateBounds mapping), token-keyed channel IDs, forceCloseChannel on token removal, Stablecoin Vetting Checklist (adds a fiat-peg requirement), per-token TokenInfo/decimals() cross-check, day-1 RateBoundsUpdated(token, …). All "PoC USDC-only / superseded by ADR 010" framing flipped.
  • PaymentChannel references + PoC/prod payment seams removed across 005, 008, 009, 012, 013, 016, 018, 019, 024, 026, README.md, architecture.md, glossary.md, _build/part-3-payments.md, and the operator-key-rotation / operator-upgrade-path / poc-production-seams appendices.
  • ADR 010 inbound anchors repointed to ADR 003 (#stablecoin-vetting-checklist, #force-close-channels-in-removed-tokens, #stablecoin-allowlist-governance-managed); no dangling #token-vetting-checklist / #migration-from-adr-003.
  • ADR 008 cross-token reputation open-question closed: stablecoin peg makes decimal-normalization sufficient, no oracle / no isStablecoinEquivalent flag.
  • ADR 013 note rewritten: multi-stablecoin needs no new wire field (channel binds the token via channel_id; voucher already carries token), so it is cdn/client/v1-compatible — no version bump.

Verification

  • No dangling ADR-010 anchors; remaining ADR 010 mentions are intentional (Dropped record + architecture reading-order/summary).
  • MD001 heading levels clean on all edited files; new ADR-003 anchors resolve; adr/ stays self-contained (no issue/PR/repo coupling in any ADR body).
  • make check-book-list green (24 ADRs + 12 appendices); all pre-commit hooks (markdownlint, etc.) pass.

Open questions for reviewer (carried from #583)

  • O1 — FeeRouter is USDC-denominated (ADR 026). A note in ADR 003 § FeeRouter Integration gates a second settlement stablecoin on per-token router accounting being wired first (mirrors ADR 016 § Tunable Economics; launch is USDC-only in practice). Confirm this gating model vs. specifying per-token FeeRouter accumulators now.
  • O2 — ADR 008 open question closed by the stablecoin-peg assumption. Confirm OK to close vs. keep flagged.
  • O3 — Dropped ADR 010 kept in the book (per your instruction; file retained, status Dropped). Alternative: move detail to _history/ and make 010 a pure pointer.
  • O4 — Status word Dropped (no corpus precedent; matches "set its status to drop"). Confirm vs. Superseded by ADR 003.

Test plan

  • Reviewer confirms O1–O4 decisions
  • cd adr && make (mermaid build) renders without broken cross-refs

@alpergundogdu
alpergundogdu force-pushed the claude/determined-mcnulty-66703d branch from 89c7bb5 to 4ea6577 Compare May 18, 2026 17:13

@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 updates the deCDN architecture to support multiple governance-allowlisted stablecoins from launch, deprecating the previous plan for a separate multi-token contract in ADR 010. ADR 003 now incorporates a stablecoin vetting checklist, per-token rate bounds, and a force-close mechanism for tokens removed from the allowlist. The updates also include technical adjustments to channel ID derivation and EIP-712 vouchers to ensure cross-token replay protection. Feedback was provided regarding the constructor specification in ADR 003, noting that implementation-level deployment patterns should be deferred and that role-gated logic cannot be called directly during contract construction.

Comment thread adr/003-payments.md
#### Initial deployment values

The constructor takes `(usdc, feeRouter, disputeWindow)` and sets the remaining governable parameters to their PoC defaults: `maxVoucherIntervalMb = 1` (1 MB) and `maxChannelDuration = 7776000` (90 days). All values are within the hardcoded safety bounds table further below (see also [ADR 009](009-governance.md) for governance ranges). The constructor MUST reject `feeRouter == address(0)` and a `feeRouter` whose code size is zero (EOA / undeployed address).
The constructor takes `(initialStablecoin, feeRouter, disputeWindow)`, calls `addToken(initialStablecoin, 1, 1000)` at deployment (USDC at launch — floor = 1 base unit, ceiling = 1000 base units = $0.001/MB), and sets the remaining governable parameters to their launch defaults: `maxVoucherIntervalMb = 1` (1 MB) and `maxChannelDuration = 7776000` (90 days). All values are within the hardcoded safety bounds table further below (see also [ADR 009](009-governance.md) for governance ranges). The constructor MUST reject `feeRouter == address(0)` and a `feeRouter` whose code size is zero (EOA / undeployed address).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The ADR specifies implementation-level details for the constructor logic. According to repository guidelines, deployment-specific patterns should be treated as implementation details and deferred to implementation-focused documentation rather than being pinned in high-level protocol specifications. Additionally, a constructor cannot directly call an external function that requires a role check (onlyRole); this logic should be extracted into an internal function or handled via a governance-mutable setter as part of the deployment sequence.

References
  1. Deployment-specific patterns for resolving circular dependencies should be treated as implementation details and deferred to implementation-focused documentation rather than being pinned in high-level protocol specifications.

…i-stablecoin from day 1 (#583)

Team decision: no separate arbitrary-ERC-20 PaymentChannel contract and no
PoC/production payment-channel split. StablePaymentChannel accepts multiple
governance-allowlisted stablecoins from launch (USDC at launch); non-stablecoin
assets are swapped off-protocol by the holder, so the contract needs no price
oracle.

- ADR 010 deleted entirely: file removed; dropped from architecture.md
  (Chapter 3 reading order + numeric index) and the Makefile BOOK_SRCS list;
  "do not reuse 010" recorded in CLAUDE.md (same handling as 027/029).
- ADR 003 absorbs the governance stablecoin allowlist (addToken/removeToken),
  per-token rate bounds, token-keyed channel IDs, forceCloseChannel on token
  removal, the Stablecoin Vetting Checklist, and per-token decimal handling.
- All PaymentChannel references and PoC/production payment seams removed across
  005/008/009/012/013/016/018/019/024/026, README, architecture, glossary,
  and the operator/seams appendices; former ADR 010 inbound links repointed
  to ADR 003.
- ADR 008 cross-token reputation open-question closed (stablecoin peg makes
  decimal-normalization sufficient; no oracle).

Rebased onto main (#582 slim seams appendix / PoC-framing canon, #584):
seams-appendix conflict resolved by taking the slim version and fixing its
residual ADR-010 line; ADR 003 rate-bounds line merged (governance-tunable
from day one + per-token).

Verified: zero ADR-010 references corpus-wide, MD001 heading levels clean,
new ADR-003 anchors resolve, adr/ self-contained, make check-book-list green
(23 ADRs + 12 appendices), pre-commit clean. Open economics questions
(FeeRouter per-token accounting gating, etc.) tracked in #583.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@alpergundogdu
alpergundogdu force-pushed the claude/determined-mcnulty-66703d branch from 4ea6577 to e590d04 Compare May 18, 2026 17:17
@alpergundogdu
alpergundogdu marked this pull request as draft May 18, 2026 18:48
@alpergundogdu

Copy link
Copy Markdown
Contributor Author

Closing: superseded by a single-token launch decision.

We are launching with one payment token, USDC, with its address fixed at contract deployment (immutable constructor arg). The system accepts only that token — no governance allowlist, no addToken/removeToken, no per-token rate bounds, no Stablecoin Vetting Checklist, no oracle/swap on-protocol. Multi-token (even the multi-stablecoin form in this PR) adds too much contract complexity and attack surface for launch.

This supersedes the entire direction of this PR and the #583 framing it closes. The PR's open questions O1–O4 are moot under a single fixed token.

Replacement work is tracked in the issue tracker:

  • ISS-20260519-002 — Single-token launch: drop ADR 010 entirely, strip all multi-token/allowlist/vetting machinery corpus-wide, ADR 003 StablePaymentChannel becomes the launch and production contract with an immutable USDC address; touched Locked-for-implementation ADRs go Draft → re-approve.
  • ISS-20260519-003 — Short new appendix for client USDC swap mechanics (clients swap into USDC off-protocol before joining; possible main-binary integration later).

Branch claude/determined-mcnulty-66703d can be abandoned. Issue #583 is left open for separate triage rather than auto-closed here.

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.

Drop multi-token PaymentChannel; StablePaymentChannel accepts allowlisted stablecoins from day 1

1 participant