The response.answer
resulting from Chainlink calls is of type int256
. If there is an issue with Chainlink validators and the call yields a gradually decreasing value or becomes suddenly negative, an invalid price will be accepted. This could happen either because the previous or current price is incorrect (negative) and the deviation is insufficient to trigger a revert, or because both prices are invalid (negative).
If Chainlink provides inaccurate prices, the protocol lacks all the necessary protections to prevent these erroneous prices from being accepted.
I have written this quick POC demonstrating one way/scenario in which this can occur.
Manual Review
Check for: answer <= 0
not answer == 0
like following:
Change this line:
By this:
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.