This repository has been archived by the owner on Oct 20, 2024. It is now read-only.
nuthan2x - No check for active L2 Sequencer #155
Labels
Excluded
Excluded by the judge without consulting the protocol or the senior
Non-Reward
This issue will not receive a payout
nuthan2x
medium
No check for active L2 Sequencer
Summary
Using Chainlink in L2 chains such as Arbitrum requires to check if the sequencer is down to avoid prices from looking like they are fresh although they are not according to their recommendation
Recent example issues
Vagner -
getOraclePrice
inSingleSidedLPVaultBase.sol
does not check if the sequencer is down for Arbitrum/Optimism 2023-10-notional-judging#44berndartmueller - Arbitrum sequencer downtime lasting before and beyond epoch expiry prevents triggering depeg 2023-03-Y2K-judging#422
Vulnerability Detail
not checking the l2 sequencer uptime will lead to exchanging the tokens at unintended price. Implement the checks listed in recommendation.
Impact
If the sequencer goes down, the protocol will allow users to continue to operate at the previous (stale) rates and this can be leveraged by malicious actors with stale oracle prices.
Code Snippet
https://github.com/sherlock-audit/2024-04-alchemix/blob/9ab3992c554a66025262e5b2eebdb2a9c5b41534/v2-foundry/src/utils/collectors/OptimismRewardCollector.sol#L90-L117
Tool used
Manual Review
Recommendation
It is recommended to follow the Chailink example code
Duplicate of #14
The text was updated successfully, but these errors were encountered: