Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: low
Invalid

USELESS_MAXDELAY_CHECK

Summary

Uint256 is checked to be not less than zero but uint256 can't be less than zero

Vulnerability Details

In function addTokenMaxDelay where maxDelay has type uint256 there is condition maxDelay < 0

function addTokenMaxDelay(address token, uint256 maxDelay) external onlyOwner {
...
if (maxDelay < 0) revert Errors.TokenPriceFeedMaxDelayMustBeGreaterOrEqualToZero();

This condition is always false as maxDelay can't be less than 0

Impact

Gas spent for useless check as well as for error Errors.TokenPriceFeedMaxDelayMustBeGreaterOrEqualToZero storing

Tools Used

Recommendations

Do not check unsigned variables to be < 0

Updates

Lead Judging Commences

hans Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

INFO: Unnecessary maxDelay/maxDeviation check

Redundant check on maxDelay and/or maxDeviation in ARBOracle

Support

FAQs

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