Chainlink Oracle Security Checklist

The definitive guide to auditing price feed integrations in DeFi protocols

19
Vulnerabilities Found
7
Protocols Analyzed
$5M+
Potential Bounties
0%
Checklist Progress
1

Staleness ValidationCRITICAL

✓
Check for updatedAt timestamp validation
Ensure the oracle checks that price data is recent. Stale prices during volatility caused the $116M Mango Markets exploit.
✓
Verify answeredInRound >= roundId
This check ensures the answer was provided in the current or a later round, preventing stale round data.
✓
Confirm MAX_STALENESS threshold exists
Look for a configurable staleness threshold (typically 1 hour for major pairs, 24h for stablecoins).
VULNERABLE PATTERN
// No staleness check - found in SparkLend, Radiant (, int256 answer,,,) = priceFeed.latestRoundData(); return uint256(answer);
SECURE PATTERN
(uint80 roundId, int256 answer,, uint256 updatedAt, uint80 answeredInRound) = priceFeed.latestRoundData(); require(answer > 0, "Invalid price"); require(block.timestamp - updatedAt < MAX_STALENESS, "Stale price"); require(answeredInRound >= roundId, "Stale round");
2

L2 Sequencer CheckHIGH

✓
Check for sequencer uptime feed (L2 only)
On Arbitrum, Optimism, Base, and other L2s, verify the sequencer is online before trusting prices.
✓
Verify grace period after sequencer restart
After a sequencer comes back online, oracles need time to update. Enforce a grace period.
L2 SEQUENCER CHECK
(, int256 answer, uint256 startedAt,,) = sequencerFeed.latestRoundData(); bool isSequencerUp = answer == 0; uint256 timeSinceUp = block.timestamp - startedAt; require(isSequencerUp, "Sequencer down"); require(timeSinceUp > GRACE_PERIOD, "Grace period not passed");
3

Price Bounds & SanityHIGH

✓
Check for minimum price bounds
Ensure prices cannot go below a reasonable minimum (prevents manipulation attacks).
✓
Check for maximum price bounds
Prevent absurdly high prices that could enable oracle manipulation.
✓
Verify answer > 0 check exists
Zero or negative prices should always be rejected.
4

Decimal HandlingHIGH

✓
Verify correct decimal conversion
Chainlink feeds return 8 decimals for USD pairs, 18 for ETH pairs. Check scaling logic.
✓
Check for Ray/Wad conversion errors
Found in Aave V4: 1e18 vs 1e27 scaling errors can make bad debt unrepayable.
5

Fallback & RecoveryHIGH

✓
Check for fallback oracle
If primary oracle fails, is there a backup (TWAP, secondary Chainlink feed)?
✓
Verify try/catch around oracle calls
Oracle reverts should not brick the protocol. Proper error handling is essential.

Found a Vulnerability Using This Checklist?

See our database of 19 vulnerabilities across 7 major DeFi protocols for submission examples.

View Full Audit Database