StabilityPool implements a pause functionality as an emergency mechanism
So, when pause mode is enabled functions in StabilityPool cannot be used.
However lack of modifier in depositRAACFromPool allows to use it even when contract is paused
Pause functionality disables the usage of functions that has whenNotPaused modifier, such as deposit:
However depositRAACFromPool doesnt utilize this modifier, making it available even when StabilityPool is in pause mode
So if contract is paused in emergency, balance changes still can be made using depositRAACFromPool, making pause emergency mode pointless
To show the described issue, save the following code in test/unit/core/pools/StabilityPool/StabilityPool.test.js under "Emergency Functions" section
Start node and execute test with
Observe call to depositRAACFromPool doesnt revert even in pause mode, and StabilityPool balance changes are performed
Lack of usage of whenNotPaused modifier on depositRAACFromPool allows to perform balance changes in StabilityPool even in paused mode breaking invariants and making emergency pause mode ineffective
Manual Review
Implement whenNotPaused modifier in StabilityPool::depositRAACFromPool function
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.