Once the chain-link price is fetched, its value is evaluated by comparing with last round values.
In one of the function _chainlinkIsBroken the chain-link answer is validated.
The validation ensures that the price should not be zero. but it does not capture the case where the price can be negative.
The function _chainlinkIsBroken is used to validate the current round and last round chain link data by calling the function _badChainlinkResponse
The other check this function does is by validating the chain link data of last and current round by calling the function _badPriceDeviation
when we look at the function _badChainlinkResponse, it has following checks,
Using of negative price value as valid. This would lead to incorrect price in asset price calculations.
The Chainlink Data Feeds use int instead of uint because some prices can be negative, like when oil futures dropped below 0.
https://www.ig.com/en/news-and-trade-ideas/what-do-negative-oil-prices-mean--200507
Manual review.
Update the function _badChainlinkResponse
as shown below.
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.