# Oracle divergence threshold blocks liquidations

Feed or liquidation reverts when price deviation exceeds a threshold, freezing exits during volatility

_Area: DeFi oracles, liquidations and flash loans. Seen in 2 disclosed reports; latest 2024-04-19. Updated 2026-10-23._

## How it works
A price-integrity guard is written as a hard revert: if two feeds disagree by more than a threshold, or a trigger price is not straddled, the call fails. The assumption is that divergence means manipulation, so refusing to act is safe. But real volatility produces the same divergence, so the guard fires exactly when liquidations and exits are needed, converting a safety check into a liveness failure.

## Where it shows up
- Aggregators that revert when feeds differ beyond a percent threshold instead of picking a feed or flagging [E2](https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-08.md)
- TWAP compared against spot with a hard revert on the gap [E3](https://bugbountylibrary.com/r/c4%3A2022-01-openleverage%3AM-05.md)
- Order/trigger validation requiring two prices to straddle the trigger [E1](https://bugbountylibrary.com/r/sherlock%3A2023-02-gmx%3AH-7.md)
- Liquidation paths gated on a spot-vs-reference divergence check [E3](https://bugbountylibrary.com/r/c4%3A2022-01-openleverage%3AM-05.md)
- Any `require`/`revert` on price disagreement in a function users depend on to exit or be liquidated

## How to review
Identify every revert tied to price disagreement and ask what happens when prices move past the threshold in one block. The invariant: liquidation and exit paths must remain callable under the worst realistic price move. A divergence guard may pause new risk or flag prices, but must not block deleveraging. Check whether the guard's trigger condition overlaps the crash condition it is meant to protect against [E3](https://bugbountylibrary.com/r/c4%3A2022-01-openleverage%3AM-05.md).

## Variants seen
- Aggregator reverts when closest feeds differ >3%, with a lagging TWAP structurally breaching it [E2](https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-08.md)
- Liquidation reverts when spot is >5% below TWAP during a drawdown [E3](https://bugbountylibrary.com/r/c4%3A2022-01-openleverage%3AM-05.md)
- Limit/stop-loss orders revert when a gap moves both oracle prices past the trigger, breaking the straddle check [E1](https://bugbountylibrary.com/r/sherlock%3A2023-02-gmx%3AH-7.md)

## Why fixes fail
Evidence does not show a fix; the pattern recurs because each guard is locally reasonable and only fails under the volatility it targets.

## Impact and severity
Liquidations and borrows freeze, positions stay under-collateralized, and users cannot exit [E1](https://bugbountylibrary.com/r/sherlock%3A2023-02-gmx%3AH-7.md)[E2](https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-08.md)[E3](https://bugbountylibrary.com/r/c4%3A2022-01-openleverage%3AM-05.md). Severity is high: the failure is triggered by ordinary market moves, and the worse the crash, the more reliably the guard blocks the protocol.

## Evidence
- E1: https://bugbountylibrary.com/r/sherlock%3A2023-02-gmx%3AH-7.md
- E2: https://bugbountylibrary.com/r/c4%3A2024-01-salty%3AM-08.md
- E3: https://bugbountylibrary.com/r/c4%3A2022-01-openleverage%3AM-05.md
