Skip to content

[security] Tighten PaymentPool.setRateBounds ceiling — a high deliveryFloor selectively suppresses vote-weight #2036

Closed

Description

@alpergundogdu

Summary

deliveryFloor (µUSDC/MB, set by setRateBounds, GOVERNANCE_ROLE) is a soft floor that clamps bytes credited toward ADR-036 vote weight: bytesPaid = min(claimedBytes, claimed × BYTES_PER_MB / deliveryFloor). It does not gate serving/payment (below-floor vouchers still settle USDC); its intended job is anti-vote-inflation (cheap bytes can't pump weight).

Impact

  • Bound is [1, MAX_RATE_PER_MB], MAX_RATE_PER_MB = 1e12 µUSDC/MB — the wire rate cap (max price the wire decodes), which is ~1e11× realistic market price (~10 µUSDC/MB ≈ $0.01/GB).
  • credited = claimedBytes × (price / deliveryFloor). Under uniform pricing this scales everyone (and the quorum total) together, so ratios are preserved — it is NOT a uniform governance brick. The real abuse is selective vote-weight suppression: raising the floor disadvantages operators whose clients pay below it relative to premium-priced serving. At the extreme (deliveryFloor near 1e12) credited bytes round to ~0 for all realistic serving, which can stall the electorate — but a tight ceiling removes that case.

Fix

Lower MAX_RATE_PER_MB (the setRateBounds ceiling) to 1000 µUSDC/MB (~$1/GB, ~100× current market) — high enough for the floor to catch genuinely below-market bytes (its intended anti-inflation purpose), low enough that raising it can never round credited bytes toward zero and only ever bounds selective suppression to ≤100×.

  • Keep bounded both ways (the floor needs up/down tuning as market prices move); the fix is the ceiling, not the direction. Confirm the exact number with finance/ params (bump to ~10000 if $10/GB headroom is wanted instead).
  • Bonus cleanup: fix the stale MAX_RATE_PER_MB doc that says a high floor "reverts" — _applyVoucher clamps, it doesn't revert.

Acceptance criteria

  • MAX_RATE_PER_MB lowered to 1000 (or the finance-confirmed value); setRateBounds rejects values above it.
  • Test: a plausibly-high floor (≤ ceiling) succeeds; a value above the ceiling reverts.

Metadata

Metadata

Assignees

Labels

design:economicskind:securityprio:medium

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions