Skip to content

docs: enforce mandatory rate bounds on addToken in ADR 010 - #113

Merged
thiras merged 2 commits into
mainfrom
fix/adr010-rate-bounds-default
Apr 2, 2026
Merged

thiras merged 2 commits into
mainfrom
fix/adr010-rate-bounds-default

Conversation

@thiras

@thiras thiras commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • ADR 010's addToken now requires deliveryFloor and deliveryCeiling parameters, enforcing floor ≥ 1 base unit — closing the gap where newly added tokens had zero RateBounds (no rate floor enforcement), which contradicted ADR 009's free-riding protection
  • setRateBounds comments updated to reflect the same floor constraint
  • ADR 009's safety bounds table updated to reference both StablePaymentChannel (PoC) and PaymentChannel per-token (production)

Test plan

  • Grep for addToken, RateBounds, rate.*floor, and free-rid across all ADRs to confirm cross-ADR consistency
  • Verify addToken signature matches in all locations within ADR 010 (contract snippet, migration section, prose)
  • Confirm ADR 009's safety bounds table aligns with ADR 010's new enforcement

🤖 Generated with Claude Code

ADR 010's zero RateBounds default for newly added tokens bypassed
ADR 009's rate floor safety bound (Floor ≥ 1 base unit), allowing
zero-rate free-riding. Require deliveryFloor and deliveryCeiling
parameters in addToken so bounds are set atomically with allowlist
addition.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings April 2, 2026 04:30

@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 governance and multi-token ADRs to enforce mandatory rate bounds (floor and ceiling) whenever a new payment token is added to the protocol. The addToken function signature has been updated to include these bounds, ensuring that no token exists in an unconstrained state. Feedback was provided regarding a potential inconsistency in the USDC rate ceiling value used in the migration example, which appears to be significantly higher than the value specified in previous documentation.

Comment thread adr/010-multi-token.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

Updates the protocol ADRs to make rate bounds mandatory when adding a new payment token, aligning multi-token governance behavior with ADR 009’s “no zero-rate free-riding” safety rationale.

Changes:

  • Update ADR 010 addToken to require deliveryFloor/deliveryCeiling at allowlisting time and initialize rateBounds immediately.
  • Update ADR 010 setRateBounds documentation to reflect the same non-zero floor / ceiling>floor constraints.
  • Update ADR 009’s safety-bounds table row to reference PoC vs production contracts (StablePaymentChannel vs PaymentChannel per-token).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
adr/010-multi-token.md Makes rate bounds mandatory at addToken time; updates related prose and migration example.
adr/009-governance.md Updates the rate floor/ceiling safety-bounds table row to reference production per-token bounds via ADR 010.

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

Comment thread adr/009-governance.md Resolved
Comment thread adr/010-multi-token.md Resolved
…r rationale

Ceiling in migration example was 1000000 ($1/MB) — should be 1000
($0.001/MB) per ADR 003 defaults. ADR 009 rationale now clarifies
the floor applies per-token in production, not just USDC.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@thiras
thiras merged commit 2111a35 into main Apr 2, 2026
@thiras
thiras deleted the fix/adr010-rate-bounds-default branch April 2, 2026 04:40
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.

2 participants