You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
Super pools can't be paused, in case of an emergency
Summary
Super pools functions can't be paused, in case of an emergency
Vulnerability Detail
As can be seen in SuperPool.sol, there is a pausing/unpausing function implemented, with the idea to freeze the functionality:
/// @notice Toggle pause state of the SuperPoolfunctiontogglePause()externalonlyOwner{if(Pausable.paused())Pausable._unpause();elsePausable._pause();}
The problem is that this logic is inefficient. Based on OZ's Pausable.sol code a whenNotPaused modifier is required in order to freeze the functions successfully when the pool is in paused state:
sherlock-admin4
changed the title
Merry Butter Dog - Super pools can't be paused, in case of an emergency
dimah7 - Super pools can't be paused, in case of an emergency
Sep 15, 2024
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA Medium severity issue.RewardA payout will be made for this issue
dimah7
Medium
Super pools can't be paused, in case of an emergency
Summary
Super pools functions can't be paused, in case of an emergency
Vulnerability Detail
As can be seen in
SuperPool.sol
, there is a pausing/unpausing function implemented, with the idea to freeze the functionality:The problem is that this logic is inefficient. Based on OZ's
Pausable.sol
code awhenNotPaused
modifier is required in order to freeze the functions successfully when the pool is in paused state:For example the correct logic is implemented in the
PositionManager
contract, but lacks in the super pool:Impact
Code Snippet
https://github.com/sherlock-audit/2024-08-sentiment-v2/blob/0b472f4bffdb2c7432a5d21f1636139cc01561a5/protocol-v2/src/SuperPool.sol#L20
https://github.com/sherlock-audit/2024-08-sentiment-v2/blob/0b472f4bffdb2c7432a5d21f1636139cc01561a5/protocol-v2/src/SuperPool.sol#L164-L167
Tool used
Manual Review
Recommendation
Add the
whenNotPaused
modifier where necessaryDuplicate of #270
The text was updated successfully, but these errors were encountered: