LiquidationPool::distributeAssets()
, we are using latestRoundData, but there is no check if the return value indicates stale data.
According to Chainlink's documentation, it is important to provide additional checks that the data is fresh:
As you can see, both the line fetch data through Chainlink API but the updatedAt timestamp in the price feed response is not checked. So outdated prices may be used.
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L207
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L218
Oracle price feeds can become stale due to a variety of reasons. Using a stale price will result in incorrect calculations in most of the key
functionality of EUROs & and reward calculations.
Manual Review
Read the updatedAt parameter from the calls to latestRoundData() and verify that it isn't older than a set amount, eg:
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.