The addTokenMaxDelay
and addTokenMaxDeviation
functions in the ChainlinkARBOracle.sol
contract have redundant checks for the maxDelay
and maxDeviation
uint256
parameters. These functions are designed to be called by the owner to configure certain settings, but the maxDelay
and maxDeviation
parameters are both checked to be equal or greater than 0, which is not only redundant because they are uint256
which can't be smaller than 0, but also the fact that the parameters can be set to 0 could lead to certain important functions not working.
The maxDelay
and maxDeviation
parameters are checked for values less than 0. However, since these parameters are of type uint256
, they cannot be negative by definition. While this check doesn't directly pose a security risk, it can lead to issues if the owner mistakenly assigns a value of 0 to these parameters. In such cases, important functions will not work as intended, affecting the operational stability of the contract. It is crucial to remove this redundant check to prevent inadvertent problems caused by zero values.
In case maxDelay
is set to 0, the _chainlinkIsFrozen
check in the consult
function will always revert:
These functions are using Chainlink's Oracle and therefore are affected:
GMXDeposit.sol
deposit()
GMXCompound.sol
compound()
GMXManager.sol
calcBorrow()
etc.
The impact of this vulnerability is primarily operational and could potentially lead to significant disruptions within the contract. If the owner inadvertently assigns a value of 0 to the maxDelay
or maxDeviation
parameters, it will render crucial functions inoperative. For instance, functions relying on these parameters to check token pricing will inadvertently revert which will cause protocol disruptions.
Manual review.
Change checks to be strictly greater than 0.
For example:
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.