Since the contracts will be deployed on Arbitrum, using Chainlink in L2s (e.g. Arbitrum) requires checks whether the sequencer is down so that stale prices can be avoided. The sequencer downtime can be leveraged by malicious actors to take advantage of the incorrect price reporting as well as it can lead to unfair liquidations due to stale price feeds.
In the LiquidationPool.sol there are Chainlink price oracles being utilized to fetch Asset/USD price as well as EUR/USD price, although no L2 Sequencer uptime checks are performed.
Chainlink recommends when deploying on L2s (Arbitrum) to check for the sequencer uptime. If the Arbitrum Sequencer goes down, oracle data will not be kept up to date, and thus can become stale. Although the prices are stale, users can continue to interact with the protocol while oracle feeds are stale. This can lead to unfair calculations when it comes to the distributions of assets during liquidations, incorrect calculations related to EUROs burning, as well as unfair liquidations.
It should also be noted that price feeds are utilized in the calculation of the euroCollateral() as well as the maxMintable() which are key functions that determine whether a pool has become undercollateralized, if returned prices are stale due to L2 Sequencer downtime, this can lead to incorrect calculations and unfair liquidations.
These functions are dependent on tokenToEurAvg (part of the PriceCalculator.sol) which utilize Chainlink feeds, but have no Sequencer uptime checks:
Other affected functions include swap (due to the price feed dependency in the calculateMinimumAmountOut() function as well.
Missing checks for L2 Sequencer downtime can lead to stale prices being reported whilst users are still able to interact with the protocol, this can result in unfair liquidations as well as incorrect distribution of assets during liquidations. This can also affect swaps due to the swap()'s dependency on the minimumAmountOut which utilizes price feeds.
Manual Review
Please refer to the Chainlink documentation for proper implementation of L2 Sequencer uptime checks through feeds:
https://docs.chain.link/data-feeds/l2-sequencer-feeds
As well as a blog article from Chainlink on the deployment of contracts on Arbitrum which mentions a Sequencer Health check through oracles:
https://blog.chain.link/how-to-use-chainlink-price-feeds-on-arbitrum/#almost_done!_meet_the_l2_sequencer_health_flag
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.