Submitted by Alex the Entreprenerd, also found by pauliax
StakingRewards.sol#L166
StakingRewards.recoverERC20 rightfully checks against the stakingToken being sweeped away.
However, theres no check against the rewardsToken which over time will sit in this contract.
This is the case of an admin privilege, which allows the owner to sweep the rewards tokens, perhaps as a way to rug depositors.
Calling StakingRewards.recoverERC20(rewardsToken, rewardsToken.balanceOf(this)) enables the owner to sweep the token.
Add an additional check
leekt (Concur) confirmed
Alex the Entreprenerd (judge) commented:
