code-423n4 / 2021-08-yield-findings

1 stars 0 forks source link

ERC20Rewards.sol: Consider making rewardsToken immutable #56

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

hickuphh3

Vulnerability details

Impact

While it might seem like a good feature to have, being able to switch reward tokens will only be useful for tokens which are equivalent in value (probably stablecoins, pegged tokens) since it carries over unclaimed rewards from the previous reward program. It would be safer to keep the reward token immutable as a safeguard against violations of this condition.

alcueca commented 3 years ago

Fix

ghoul-sol commented 3 years ago

duplicate of #64