The LibUniswapOracle
uses the consult()
function to query the pool and determine the time-weighted price. This takes in a secondsAgo
and observes the price at secondsAgo
returning the time-weighted average.
In the event that an L2's sequencer goes down, the time-weighted price when it comes back online will be the extrapolated previous price.
This will create an opportunity to push through transactions at the old price before it is updated.
Even when the new price is observed, it will be assumed by the sequencer that the previous price held up until the moment it came back online, which will result in a slow, time-weighted adjustment back to the current price.
Reference of a similar issue: https://solodit.xyz/issues/h-01-univ3-oracle-unsafe-on-l2s-in-event-of-sequencer-downtime-zachobront-none-splits-oracle-markdown
Manual Review
(Recommended) - Use the Chainlink Sequencer check before consuming the price from UniV3.
https://docs.chain.link/data-feeds/l2-sequencer-feeds#example-code
(Alternative) - Consider using only Chainlink Oracle + Sequencer check for Beanstalk on L2.
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.