When TempleGoldStaking
is paused users are still capable of withdrawing their staking tokens and claim their rewards.
The functions TempleGoldStaking::withdraw
and TempleGoldStaking::withdrawAll
both call the internal helper function TempleGoldStaking::_withdrawFor
, which lacks the modifier whenNotPaused
making them able to be called even when the contract is paused. Also when users are withdrawing, TempleGoldStaking::_getReward
gets called inside _withdrawFor
allowing users to claim rewards when the contract is paused.
pause
and unpause
are usually used in emergency situations where the protocol needs to stop everything in motion. If an issue arises where all action needs to halt, allowing users to still be able to withdraw and claim rewards could be detrimental.
Foundry
Add the whenNotPaused
function to _withdrawFor
and _getReward
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.