Skip to content

[security] DecdnGovernor.voteCapBps: start at 10%, bound 1–10%, one-way decrease-only #2031

Closed

Description

@alpergundogdu

Summary

setVoteCapBps is currently bounded 1–25%, movable both ways, initialized at 5%. If it's decrease-only (to prevent entrenchment), a 25% ceiling and a 5% start make no sense — you'd never raise toward 25%. Retune so the ceiling is the launch value and the only movement is down.

Change

  • Bounds: floor 1% (100 bps, unchanged), ceiling 10% (1000 bps; was 25%).
  • Initial value: 10% (1000 bps) at deploy (was 5% / 500) — start at the ceiling.
  • setVoteCapBps: decrease-only — reject any increase; allow lowering toward the 1% floor.

Rationale

  • One-way + start-at-ceiling is internally consistent: launch at the most permissive allowed cap, only ever tighten toward decentralization.
  • A higher launch cap protects bootstrap liveness: with a thin operator set, a 5% cap can make quorum unreachable (e.g. 8 operators × 5% = 40% max weight < quorum → governance bricked at launch). 10% gives headroom while the set is small; governance ratchets it down as the network decentralizes.
  • The entrenchment vector (raise the cap to concentrate a bloc) becomes unrepresentable.

Acceptance criteria

  • VOTE_CAP_BPS_CEILING = 1000, VOTE_CAP_BPS_FLOOR = 100; constructor initializes to 1000.
  • setVoteCapBps(x) succeeds only if 100 <= x < current; any increase reverts.
  • Test: decrease succeeds; increase reverts; deploy initial == 10%.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:securityprio:medium

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions