Updating strategy rewards can lower the totalStaked
variable incorrectly
This vulnerability arise in _updateStrategyRewards()
function staking pool contract. This function checks all the strategies and calculate the deposit changes and then calculate the reward amount. But this amount can be lower than zero because it's calculated in following way:
In _updateStrategyRewards()
function even the funds aren't sent through another contract the total staked number can be changed due to wrong execution logic.
totalStaked
number will be affected and it will be lowered even the funds ( LINK tokens ) aren't send through another contract. This will cause loss of funds because the price of the shares will be dropped after this wrong execution.
Manual review
Update the totalStaked
number only whenever the rewards is higher than 0
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.