ChainlinkARBOracle._badChainlinkResponse
validates negative prices.
ChainlinkARBOracle._badChainlinkResponse
function is intended to check the response returned by the oracle aggregators if it's valid or not based on the response success, roundId, response timestamp and the returned price if equals to zero; and it returns true
if the oracle response is invalid & false
if the response is valid:
But as can be noticed; if the response.answer
(which is of int256
type) is a negative value; this will bypass the check and return false
indicating that the response is valid!
And since this function is used indirectly in the consult
function; then this function will return corrupted/invalid token price.
This will affect all the accounting/calculations of the protocol with the negative invalid value returned by the oracle.
ChainlinkARBOracle._badChainlinkResponse function/L118-L119
ChainlinkARBOracle.ChainlinkResponse struct
Manual Review.
Update ChainlinkARBOracle._badChainlinkResponse
function to check for the negative price:
Very low likelihood -> evaluate the severity to LOW
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.