15,000 USDC
View results
Submission Details
Severity: medium
Valid

Oracle price check error if L2 sequencer goes down.

Summary

Oracle price check error if L2 sequencer goes down.

Vulnerability Details

In the current implementation, function staleCheckLatestRoundData in OracleLib contract use block.timestamp to check the oracle answer is stale or not. However, it's vulnerable when l2 sequencer go down will cause that block.timestamp is unusable.

L2 chains like arbitrum and optimism upgrade their sequencer occasional, such as the recent optimism bedrock upgrade cause the sequencer can't be able to process transactions for several hours. Or l2 sequencer bug could also cause transactions in stuck, such as arbitrum sequencer bug. So it's necessary to implement an mechanism to handle this issue in some abnormal conditions.

Impact

Oracle price check will be failed when l2 sequencer goes down.

Tools Used

vscode, Manual Review

Recommendations

Use chainlink sequencer up feed, consider integrate the up time feed and give contract extra time when l2 sequencer go down.

Support

FAQs

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