The contract contains checks to determine if certain unsigned integer values are less than zero. Given the nature of unsigned integers (they can never be negative), these checks are redundant and can be safely removed to simplify the code and save on gas costs.
In the following functions:
addTokenMaxDelay
addTokenMaxDeviation
The contract checks if the values maxDelay
and maxDeviation
are less than zero using the conditions:
and
These checks are unnecessary since maxDelay
and maxDeviation
are of the uint256
type, which can never be negative.
This does not pose a direct security risk but introduces unnecessary complexity to the code. It may confuse developers or auditors who later review the contract, thinking there might be some special reason for the check.
Manual Review
Removal of Redundant Checks: The checks for maxDelay
and maxDeviation
being less than zero can be safely removed from the contract.
Before:
After:
Redundant check on maxDelay and/or maxDeviation in ARBOracle
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.