csanuragjain
Reward amount higher than contract reward balance can bring instability in the contract
In FarmingPools.sol contract check notifyRewardAmounts function
Observe there is no check to see if added reward is higher than contract reward balance
Add below condition in notifyRewardAmounts
uint256 balance = oleToken.balanceOf(address(this));
require(rewardRate <= balance.div(rewardsDuration), "Provided reward too high");
The text was updated successfully, but these errors were encountered:
All reactions