checkupkeep does not reference rewardThreshold in determining whether to call performupkeep
The checkUpkeep
function iterates over all splitters in the accounts
array and encodes whether they need splitting, but there’s no check to ensure if the rewards have exceeded the rewardThreshold
set for splitting.
The threshold (rewardThreshold
) is defined in the contract but never actually referenced in checkUpkeep
to determine whether to call performUpkeep
.
returns from checkupkeep will be incorrect and performupkeep will be called in situations when there are no rewards which is not intended.
Manual Review
In checkUpkeep
, add a check to determine whether the splitter has rewards exceeding rewardThreshold
before returning upkeepNeeded
. This ensures upkeep is only performed when rewards exceed the defined threshold.
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.