# DeFi protocols on L2 must check L2 sequencer uptime before consuming Chainlink price feeds to prevent stale data exploitation Chainlink provides L2 Sequencer Uptime Feeds for Arbitrum and Optimism that allow smart contracts to detect whether the L2 sequencer is currently online. When the sequencer is down, Chainlink oracle price data may be significantly stale, but contracts remain callable via forced inclusion on L1. The attack path: the sequencer goes offline, prices move significantly on other markets but the stale L2 prices reflect old values. An attacker submits a forced-inclusion transaction that interacts with a DeFi protocol (lending, liquidations) using the stale prices, profiting from the discrepancy before the sequencer comes back online and prices update. A July 2024 Code4rena audit of BendDAO flagged that `PriceOracle.sol` did not check if the Arbitrum/Optimism L2 sequencer was down before consuming Chainlink feeds. This is a common vulnerability pattern across L2 DeFi deployments. The mitigation requires: 1. Calling the Chainlink L2 Sequencer Uptime Feed before consuming any price data 2. Reverting or pausing if the sequencer is reported offline or if the grace period after restart has not elapsed 3. Treating sequencer downtime as an oracle validity condition, not just a liveness concern Since [[L2 sequencer centralization creates systemic liveness censorship and regulatory risks]] and sequencer outages are documented events (Arbitrum 8 outages, Optimism February 2024 outage), this is not a theoretical risk, sequencer downtime creates real and recurring attack windows. --- Relevant Notes: - [[L2 sequencer centralization creates systemic liveness censorship and regulatory risks]]: sequencer downtime is the trigger condition; outages are documented and recurring - [[flash loan oracle manipulation enables price feed attacks against defi protocols]]: related oracle manipulation pattern using different attack vector - [[AMM spot prices are manipulable within a single transaction making them unsafe as oracle price feeds without TWAP smoothing]]: another oracle safety condition: freshness complements manipulation resistance Topics: - [[vulnerability-patterns]] - [[security-patterns]]