Closed code423n4 closed 1 year ago
Pretty similar to others but I think Med is the most appropriate submission (will Judge severity later)
GalloDaSballo marked the issue as primary issue
GalloDaSballo marked the issue as duplicate of #673
GalloDaSballo marked the issue as satisfactory
Lines of code
https://github.com/code-423n4/2022-12-gogopool/blob/aec9928d8bdce8a5a4efe45f54c39d4fc7313731/contracts/contract/Staking.sol#L328 https://github.com/code-423n4/2022-12-gogopool/blob/aec9928d8bdce8a5a4efe45f54c39d4fc7313731/contracts/contract/ClaimNodeOp.sol#L89
Vulnerability details
Impact
Missing WhenNotPaused modifier for restakeGGP in Staking.sol
Proof of Concept
The admin can pause a contract in urgent sitation or the governance can pause a contract as they see fit.
As we can see in the code, when the contract is paused, the stakeGGP is blocked in Staking.sol
but the restakeGGP function is missing WhenNotPaused.
Use can bypass the WhenNotPaused modifier by calling ClaimNodeOp#claimAndRestake
Tools Used
Manual Review
Recommended Mitigation Steps
We recommend the project add the WhenNotPaused modifier to restakeGGP to not let user bypass the paused state