# Using the same heartbeat for multiple price feeds, causing DOS

Hardcoded 30-minute Chainlink heartbeat in getAssetPrice causes withdrawals to revert on chains whose feeds have 24h heartbeats, DoSing the pool.

- Payout: Audit contest
- Severity: medium
- Program: New Scope
- Found by: 000000
- Disclosed: 2024-06-27
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-06-new-scope-judging/issues/9
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-06-new-scope%3AM-1
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:evm technique:source-review vuln:dos

**Target:** Lending pool oracle price getter (PoolGetters::getAssetPrice) on multi-chain deployment
**Root cause:** A single hardcoded 30-minute staleness threshold is applied to all Chainlink feeds across all chains, ignoring per-feed heartbeats that vary from ~27s to ~24h.
**Steps:**
1. Deploy/use pool on Linea with USDT/USD feed (heartbeat ~24h)
2. User calls `withdraw` to remove USDT collateral
3. Call chain reaches `GenericLogic::calculateUserAccountData` -> `PoolGetters::getAssetPrice`
4. Feed's `updatedAt` is >30min old (normal, since heartbeat is 24h)
5. Staleness check reverts, blocking withdraw
**How found:** Compared Chainlink feed heartbeats across chains (Linea vs Polygon, Ethereum vs Optimism) against the protocol's hardcoded 30-minute constant, noticing the mismatch.
**Exploitation:** Not an attack; a reliability flaw. Any user action touching price (withdraw/borrow/liquidation) reverts whenever the feed hasn't updated within 30 minutes, causing persistent DoS on chains with long heartbeats.
**Insight:** When auditing oracle integrations, cross-reference the hardcoded staleness threshold against the actual heartbeat of each specific feed on each target chain from data.chain.link; a single constant cannot fit feeds ranging from 27s to 24h.

