Skip to content

Remove the advisory deliveryCeiling rate bound (ADR 003) #1441

Closed

Description

@alpergundogdu

Decision (2026-07 ADR simplification audit). Filed under the Protocol simplifications milestone — sibling to #1396, #1394, #1419. Verdict: DROP the advisory deliveryCeiling. The enforced deliveryFloor (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

  1. The ADR concedes it enforces nothing: deliveryCeiling is "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).
  2. 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.
  3. 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).
  4. Dropping it collapses RateBounds from 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 exposes floor > 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.

Activity

  1. self-assigned this
    on Jul 24, 2026
  2. altanoruc commented on Jul 24, 2026

    @altanoruc
    Contributor

    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.

  3. assigned and unassigned on Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions