Submitted by cccz, also found by csanuragjain, fatherOfBlocks, pashov, Respx, Saintcode_, and unforgiven
Similar to https://github.com/code-423n4/2022-02-concur-findings/issues/210
StakingRewards.recoverERC20 rightfully checks against the stakingToken being sweeped away.
However, theres no check against the rewardsToken.
This is the case of an admin privilege, which allows the owner to sweep the rewards tokens, perhaps as a way to rug depositors.
https://github.com/code-423n4/2022-09-y2k-finance/blob/ac3e86f07bc2f1f51148d2265cc897e8b494adf7/src/rewards/StakingRewards.sol#L213-L223
Add an additional check
scaraven (warden) commented:
MiguelBits (Y2K Finance) disputed and commented:
HickupHH3 commented:
