EgisSecurity - StrategyPassiveManagerVelodrome.sol#setRewardPool() - When changing `rewardPool` allowances are kept and aren't give to the new `rewardPool` #86
When changing the rewardPool, we don't give allowances to the new rewardPool, this will be an issue when calling rewardPool.notifyRewardAmount as the function will use safeTransferFrom to attempt to pull the reward tokens out of StrategyPassiveManagerVelodrome, which will revert, since it doesn't have an allowance.
Also the old allowance isn't removed, which shouldn't be the case.
Impact
DoS of harvest and leftover allowance to old rewardPool
EgisSecurity
medium
StrategyPassiveManagerVelodrome.sol#setRewardPool() - When changing
rewardPool
allowances are kept and aren't give to the newrewardPool
Summary
StrategyPassiveManagerVelodrome.sol#setRewardPool() - When changing
rewardPool
allowances are kept and aren't give to the newrewardPool
Vulnerability Detail
This issue is almost the same as 7.3.3 from this previous audit
When changing the
rewardPool
, we don't give allowances to the newrewardPool
, this will be an issue when callingrewardPool.notifyRewardAmount
as the function will usesafeTransferFrom
to attempt to pull the reward tokens out ofStrategyPassiveManagerVelodrome
, which will revert, since it doesn't have an allowance.Also the old allowance isn't removed, which shouldn't be the case.
Impact
DoS of
harvest
and leftover allowance to oldrewardPool
Code Snippet
https://github.com/sherlock-audit/2024-05-beefy-cowcentrated-liquidity-manager/blob/42ef5f0eac1bc954e888cf5bfb85cbf24c08ec76/cowcentrated-contracts/contracts/strategies/velodrome/StrategyPassiveManagerVelodrome.sol#L776-L779
Tool used
Manual Review
Recommendation
Mirror the logic inside
setUnirouter
Duplicate of #3