You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[security] Tighten PaymentPool.setRateBounds ceiling — a high deliveryFloor selectively suppresses vote-weight #2036
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.
Activity
Merge origin/main into claude/governance-hardening
test(e2e,node): retune rate-cap-dependent tests for MAX_RATE_PER_MB=1…
test(e2e): retune node_pull_topup for MAX_RATE_PER_MB=1000 (#2036)
feat(contracts)!: governance hardening — bound capture, remove struct…