Closed sherlock-admin3 closed 5 months ago
1 comment(s) were left on this issue during the judging contest.
DHTNS commented:
Low -> depends on the fact that admin makes changes to rewardPool address in incorrect order consider the following order | ptrategyPassiveManagerVelodrome.panic() -> setRewardPool() -> unpause() | all the correct allowances are now in place with no funds lost that being said its a tough call
This is a low. The order of operations would be panic, setRewardPool and unpause. It could improve flow by wrapping the setting of the rewardPool variable with _removeAllowances and _giveAllowances.
The protocol team fixed this issue in the following PRs/commits: https://github.com/beefyfinance/cowcentrated-contracts/pull/14
Fix looks good. Allowance is now set upon changing the rewardPool
The Lead Senior Watson signed off on the fix.
BiasedMerc
medium
StrategyPassiveManagerVelordrome::setRewardPool() doesn't set rewardPool allowance
Summary
When the
owner
callssetRewardPool
with a new reward pool, the old approval for the oldrewardPool
is not cleared and the newrewardPool
is not set an approval. Which means the new reward pool will not have an approval to spend the contract's tokens.Vulnerability Detail
StrategyPassiveManagerVelodrome::setRewardPool()
StrategyPassiveManagerVelodrome.sol#L827-L840
Impact
rewardPool
will be unable to transferoutput
tokens fromStrategyPassiveManagerVelordrom
. The manager could technically usepanic
to clear allowances and thenunpause
however this would cause a lot of users to be worried about the state of the protocol and is clearly not what the function is intended for.Code Snippet
StrategyPassiveManagerVelodrome::setRewardPool() StrategyPassiveManagerVelodrome.sol#L827-L840
Tool used
Manual Review
Recommendation
Utilise
_removeAllowances
and_giveAllowances
just like insetUnirouter
: