ConfidencePool inherits OpenZeppelin Pausable, which already provides whenNotPaused and whenPaused.
The pool redeclares equivalent custom modifiers: whenPoolNotPaused and whenPoolPaused. These perform the same state checks as the inherited modifiers, only with different custom errors.
This adds unnecessary source complexity and bytecode surface, and creates inconsistent pause error behavior between ConfidencePool and ConfidencePoolFactory, which already uses the inherited whenNotPaused.
OpenZeppelin already provides the same guard behavior:
Relevant files:
Likelihood:
This occurs on every function using whenPoolNotPaused or whenPoolPaused.
The duplicated modifiers are currently used by stake, contributeBonus, pause, and unpause.
Impact:
Slightly larger deployed bytecode and unnecessary custom logic.
Inconsistent pause revert selectors across the system: the factory uses OpenZeppelin pause errors, while the pool uses PoolPaused / PoolNotPaused.
More maintenance burden because future pause behavior changes would need to account for both custom pool modifiers and inherited OpenZeppelin modifiers.
The same applies to the paused-only path:
Use the inherited OpenZeppelin modifiers directly unless the custom revert selectors are intentionally part of the public error interface.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.