The calls to the Chainlink oracles which fetch the EUR/USD and the Asset USD price, utilized in the LiquidationPool.sol don't check for stale prices.
Oracle price feeds can become stale due to a variety of reasons. Using a stale price will result in incorrect calculations in the distributeAssets() function leading to incorrect calculations.
As we can see in both of the implementations above, no checks for stale data are performed. Here's more information as part of Chainlink's documentation: https://docs.chain.link/data-feeds/historical-data
If stale prices are fetched this can affect the calculations for the distribution of assets during liquidations, causing inaccurate calculation of the costInEuros
variable leading to a wrong amount of EUROs burned + a wrong amount calculated for the postilion in EUROs, which will break the accounting logic.
This can also lead to unfair liquidations as the undercollateralized() function depends on price checks through the PriceCalculator.sol as well, which also miss the stale pricing checks:
Other affected functions include swap (due to the price feed dependency in the calculateMinimumAmountOut() function as well.
Manual Review
Consider adding checks for stale data.
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.