← ClaudeAtlas

oracle-redundancylisted

Detect oracle fallback and redundancy failure modes (distinct from price manipulation) — single point of failure, missing staleness/heartbeat/deviation checks, an "all oracles down" path that reverts or silently returns stale/zero, missing L2 sequencer-uptime feed, and absent circuit breakers. Activate whenever code reads a price/rate feed, especially Chainlink latestRoundData, with fallbacks or on an L2.
iktok90-design/ai-smart-contract-auditor · ★ 36 · AI & Automation · score 80
Install: claude install-skill iktok90-design/ai-smart-contract-auditor
# Oracle redundancy detection ## When this applies Trigger on any of: - `latestRoundData()` / `latestAnswer()` reads from Chainlink or any push feed - Custom oracle aggregators with primary + fallback sources - L2 deployments reading any price feed (Arbitrum, Optimism, Base, etc.) - Rate/price reads that gate borrowing, liquidation, minting, or redemption - Any "if primary fails, use secondary" branching ## Detection patterns ### Missing staleness / heartbeat check (HIGH) ```solidity (, int256 price,,,) = feed.latestRoundData(); // ignores updatedAt & answeredInRound require(price > 0); return uint256(price); ``` **Signal:** no `updatedAt` freshness gate. A frozen feed (feed deprecated, node outage, or a market-wide halt) returns the last value forever; protocol prices off stale data. Require `block.timestamp - updatedAt <= heartbeat` and `answeredInRound >= roundId`. ### Single point of failure (HIGH) One feed, no fallback, no degradation plan. If that feed is deprecated or returns garbage, the protocol is bricked or mispriced. **Signal:** a hard dependency on exactly one external address with no alternative path. ### Fallback that silently returns 0 or last price (HIGH) ```solidity try feed.latestRoundData() returns (...) { ... } catch { return lastGoodPrice; } // ← stale, or worse: catch { return 0; } // ← 0 collateral value = mass liquidation, or free mint ``` **Signal:** the catch path masks failure. Returning `0` can make collateral worthless (m