The contract uses the latestRoundData function to fetch prices from the Chainlink aggregator, but lacks some parameter validation, which may result in the application using incorrect asset prices.
In the staleCheckLatestRoundData function, it checks for updatedAt, but lacks checks for other parameters, such as roundId, answer, and answeredInRound. This may result in incorrect prices.
Chainlink aggregators have a built-in circuit breaker if the price of an asset goes outside of a predetermined price band.
The result is that if an asset experiences a huge drop in value (i.e. LUNA crash) the price of the oracle will continue to return the minPrice instead of the actual price of the asset.
This would allow users to continue borrowing with the asset but at the wrong price. This is exactly what happened to Venus on BSC when LUNA crashed.
Chainlink will return incorrect prices, leading to financial losses.
Manual review
It is recommended to add checks for these parameters, for example:
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.