DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: medium
Invalid

Unconditional upKeepNeeded leads to errors

Summary

Unconditional upKeepNeeded leads to errors. upKeepNeeded is always set to true which defeats the purpose of the check function

Vulnerability Details

function checkCallback(
bytes[] calldata values,
bytes calldata extraData
)
external
pure
override
returns (bool upkeepNeeded, bytes memory performData)
{
bytes memory signedReport = values[0];
upkeepNeeded = true;
performData = abi.encode(signedReport, extraData);
}

Unconditional upkeepNeeded: The callback function always sets upkeepNeeded to true without any actual checks or conditions. This means that the function will always indicate that an upkeep is needed, regardless of the actual state or data provided. The checkCallback is supposed to determine whether an upkeep is actually needed based on the provided data.

Impact

It could lead to unnecessary upkeep operations, potentially wasting gas and resources. It doesn't take into account any conditions from the signedReport or extraData that might indicate whether an upkeep is truly needed.

Tools Used

Manual Review

Recommendations

Add logic to determine if upkeep is needed based on signedReport and possibly extraData

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.