==== Github links ====
https://github.com/Cyfrin/2023-12-the-standard/blob/91132936cb09ef9bf82f38ab1106346e2ad60f91/contracts/LiquidationPool.sol#L207-L207
https://github.com/Cyfrin/2023-12-the-standard/blob/91132936cb09ef9bf82f38ab1106346e2ad60f91/contracts/LiquidationPool.sol#L218-L218
On L2 chains (including Arbitum) the Chainlink Oracles require a check for if the sequencer is down, avoiding prices from appearing fresh when they are not.
The bug could be leveraged by malicious actors to take advantage of the sequencer downtime.
As outlined in the Chainlink L2 sequencer feeds, the Chainlink data feeds come from
Ethereum mainent (L1) and are propagated to their L2 counterparts.
If the Arbitum sequencer is down, the updates from L1 to L2 will not be occuring.
The only place in scope that uses Chainlink price feeds is the LiquidationPool.distributedAssets
, where there is no check for the sequencer being down.
LiquidationPool::distributeAssets()
LiquidationPool::distributedAssets()
is called by LiquidationPoolManager.runLiquidation()
as an essential part of the liquidation process.
The liquidation process is the secondary pegging mechanism outlined in TheStandard whitepaper
The pertinent scenario being the sequencer is down and there is significant price movement that triggers an update to the L1 price feed, but the update does not reach the L2 price feed (as the tx remains awaiting in the inbox).
Two possibilities are either over or under valuation of assets in LiquidationPool::distributedAssets()
.
Asset overvaluation: stakers looses out, paying more EUROs to the protocol for the assets.
Asset undervaluation: protocol looses out, taking fewer EUROs than it should from the stakers for the assets.
In the overall liquidation process, incorrect valuation can result in vaults being liquidated when should not be (based on L1 prices).
Manual review
Implement a check for the sequencer being up before retrieving the Chainlink price feeds.
Inspiration from the Chainlink example code and attempting the code style used by TheStandard.
Add the following into LiquidationPool
Then to actually apply the check, update LiquidationPool::distributeAssets()
The configuration value for Arbitum mainnet from Chainlink L2 sequencer uptime feeds.
Requires setting as the sequencerUptimeFeed
, by either by an addition access controlled setter, or via the constructor.
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.