Repository navigation
Description
Decision (2026-07 ADR simplification audit). Filed under the Protocol simplifications milestone — sibling to #1396, #1394, #1419. Verdict: DROP the advisory
deliveryCeiling. The enforceddeliveryFloor(wash-trade / vote-weight defense) stays.
Remove the advisory deliveryCeiling rate bound (ADR 003)
Status: proposal for discussion, not a decision.
Summary
The enforced deliveryFloor (the ADR 036 wash-trade / vote-weight defense) stays; only the advisory ceiling half of setRateBounds and its node-side refresh plumbing are dropped.
Motivation
- The ADR concedes it enforces nothing:
deliveryCeilingis "an advisory coordination ceiling nodes self-apply … a hard maximum buys no on-chain safety and risks rejecting legitimate high-egress pricing" (ADR 003:509). - A seller self-clamping its own advertised rate down to a ceiling gains nothing — a seller never wants to charge less. Buyer protection is the buyer seeing the signed rate before paying (
StreamResponse), not a governance cap. - It costs real surface at every layer: on-chain storage + governance setter + constructor arg, plus a node-side u64-bounds-check and hourly authoritative re-read (
rate_bounds_watcher.rs). - Dropping it collapses
RateBoundsfrom an atomic(floor, ceiling)pair to a single floor — deleting the ArcSwap-for-pair-consistency machinery whose sole reason to exist is the "raising the band exposesfloor > ceiling" panic (rate_bounds.rs:11-28).
What removal touches (blast radius)
contracts/src/PaymentChannel.sol (deliveryCeiling storage, setRateBounds 2nd param, getRateBounds tuple, constructor arg + RateBoundsInvalid guard); crates/node/src/rate_bounds.rs + rate_bounds_watcher.rs; ADR 003 §Rate Bounds / 005 §Rate Bounds Validation. Confirm: grep -rn deliveryCeiling contracts/src/PaymentChannel.sol crates/node/src. ADR 016 is the canonical contract surface — reconcile there too.
What we keep
The whole deliveryFloor path — settlement enforcement (_advanceClaimWatermark), off-chain verify_rate, refresh, and ADR 036 vote-weight binding. The floor is load-bearing and untouched.
Counter-argument
The ceiling is a cheap coordination signal against a fat-finger mispricing or a rate cartel ceiling; it touches the ADR-016-canonical contract surface, so the change is wide even if each site is small. [your call] on whether the coordination-signal value justifies keeping a governance-tunable no-op.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
altanoruc commentedon Jul 24, 2026
Automated implementation triage follow-up: dispatch stopped with no PR because the floor-only public API is not pinned. Removing deliveryCeiling leaves at least three defensible shapes: (A) keep getRateBounds()/setRateBounds(...) with one floor value, (B) rename to getDeliveryFloor()/setDeliveryFloor(uint256) plus DeliveryFloorUpdated, or (C) make deliveryFloor public and use its generated getter with a separately named setter/event. Please pin the exact getter, setter, event names/signatures and compatibility posture. The remaining substantive production change was about 169 lines before Rust call-site migration.