Steadefi

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

USELESS_MAXDEVIATION_CHECK

Summary

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

Vulnerability Details

In function addTokenMaxDeviation where maxDeviation has type uint256 there is condition maxDeviation < 0

function addTokenMaxDeviation(address token, uint256 maxDeviation) external onlyOwner {
...
if (maxDeviation < 0) revert Errors.TokenPriceFeedMaxDeviationMustBeGreaterOrEqualToZero();

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

Impact

Gas spent for useless check as well as for error Errors.TokenPriceFeedMaxDeviationMustBeGreaterOrEqualToZero 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.