The BaseGauge
contract allows users to stake and withdraw tokens without enforcing the whenNotPaused
modifier. This means that even if the contract is paused, users can still perform these actions, potentially bypassing emergency controls.
The stake
and withdraw
functions lack the whenNotPaused
modifier from OpenZeppelin’s Pausable
contract:
Since Pausable is implemented in the contract, it is expected that staking and withdrawing should be restricted when the contract is paused. However, without the whenNotPaused
modifier, these functions remain accessible.
Users withdraw assets even if the contract is paused for security or governance reasons but cannot get accumulated rewards since getReward()
has whenNotPaused
modifier.
Add whenNotPaused
to both stake and withdraw functions.
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.