This repository has been archived by the owner on Oct 20, 2024. It is now read-only.
boredpukar - getExpectedExchange function doesn't check if L2 sequencer is down in Chainlink feeds. #20
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
boredpukar
medium
getExpectedExchange function doesn't check if L2 sequencer is down in Chainlink feeds.
Summary
When utilizing Chainlink feeds in L2 chains like Arbitrum and Optimism, it's important to ensure that the prices provided are not falsely perceived as fresh, even when the sequencer is down. This vulnerability could potentially be exploited by malicious actors to gain an unfair advantage.
Vulnerability Detail
Chainlink recommends that users using price oracles, check whether the L2 based sequencer (for Arbitrum and Optimism) is active.
Quoting from the documentation:
Users are still able in principle to avoid liquidations by interacting with the L2 delayed inbox via L1, but this is out of reach for most users. If the sequencer goes down, the oracles may have stale prices, since L2-submitted transactions (i.e. by the aggregating oracles) will not be processed.
Impact
Stale Price. If USDC were to de-peg while the sequencer is offline, stale price is used for the subsequent transactions.
Code Snippet
https://github.com/sherlock-audit/2024-04-alchemix/blob/main/v2-foundry/src/utils/collectors/OptimismRewardCollector.sol#L91
Tool used
Manual Review
Recommendation
Use sequencer oracle to determine whether the sequencer is offline or not, and don't allow orders to be executed while the sequencer is offline. The Chainlink documentation contains an example for how to check the sequencer status.
Duplicate of #14
The text was updated successfully, but these errors were encountered: