DeFiHardhatFoundry
250,000 USDC
View results
Submission Details
Severity: medium
Invalid

Calls to the Well can return staled price on L2

Summary

Beanstalk relies on Basin(Pump/Well) to read the prices and provide it to different components for instance: SeasonFacet, PipelineConvertFacet, LibWellBdv, LibWellMinting, LibDeltaB, etc.

The pump functions are based on the time-weighted price, returning the time-weighted average. For instance:

  • readInstantaneousReserves

  • readTwaReserves

  • readCappedReserves

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.

Impact

Even when the new price is read from the Pump, 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

Tools Used

Manual Review

Recommendations

Use the Chainlink Sequencer check before consuming the price from the Well/Pump.

https://docs.chain.link/data-feeds/l2-sequencer-feeds#example-code

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

L2 Sequencer check

Appeal created

holydevoti0n Submitter
about 1 year ago
golanger85 Auditor
about 1 year ago
inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

L2 Sequencer check

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.