Repository navigation
docs(adr): drop multi-token PaymentChannel; StablePaymentChannel multi-stablecoin from day 1 - #585
alpergundogdu wants to merge 1 commit into
Conversation
89c7bb5 to
4ea6577
Compare
There was a problem hiding this comment.
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.
| #### 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). |
There was a problem hiding this comment.
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
- 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]>
4ea6577 to
e590d04
Compare
|
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 This supersedes the entire direction of this PR and the Replacement work is tracked in the issue tracker:
Branch |
Closes #583.
Summary
Team decision: drop the separate arbitrary-ERC-20
PaymentChannelcontract and the PoC/production payment-channel split.StablePaymentChannelaccepts 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
Dropped); rationale only, surface moved out.addToken/removeToken), per-token rate bounds (RateBoundsmapping), token-keyed channel IDs,forceCloseChannelon token removal, Stablecoin Vetting Checklist (adds a fiat-peg requirement), per-tokenTokenInfo/decimals()cross-check, day-1RateBoundsUpdated(token, …). All "PoC USDC-only / superseded by ADR 010" framing flipped.PaymentChannelreferences + 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.#stablecoin-vetting-checklist,#force-close-channels-in-removed-tokens,#stablecoin-allowlist-governance-managed); no dangling#token-vetting-checklist/#migration-from-adr-003.isStablecoinEquivalentflag.channel_id; voucher already carriestoken), so it iscdn/client/v1-compatible — no version bump.Verification
ADR 010mentions are intentional (Dropped record + architecture reading-order/summary).adr/stays self-contained (no issue/PR/repo coupling in any ADR body).make check-book-listgreen (24 ADRs + 12 appendices); all pre-commit hooks (markdownlint, etc.) pass.Open questions for reviewer (carried from #583)
FeeRouteraccumulators now.Dropped). Alternative: move detail to_history/and make 010 a pure pointer.Dropped(no corpus precedent; matches "set its status to drop"). Confirm vs.Superseded by ADR 003.Test plan
cd adr && make(mermaid build) renders without broken cross-refs