15,000 USDC
View results
Submission Details
Severity: high

There is no check for a stale price feed

Summary

In oracleLib.sol, There are no checks to ensure that the price returned from the chainlink price feed is not stale.

Vulnerability Details

When using oracles such as chainlink, there is a risk that the oracle can return a stale price. The problem with this is because DSC must be overcollateralize. Let us assume there is a sharp drop of eth and it is losing value very fast, If the price feed is stale, users who should have been liquidated will not be able to. Those users can then withdraw and leave the protocol with debt. This is a complete loss of funds.

Impact

A stale price feed can leave the protocol with bad debt and this will cost the users their funds.

Tools Used

manual reviewe

Recommendations

i recommend to add a check to ensure the price feed price is not stale.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.