Research · Web3 Security · Low
Oracle anchor rotation can stall valid price updates
Rotating an oracle window to the previous keeper price can make subsequent market moves exceed the deviation limit and stall updates.
9 November 2026
What went wrong
When the anchor window expired, the oracle set its new anchor to cfg.lastPrice, the previous keeper push, before checking the incoming price.
if (_window != 0 && uint256(ts) - uint256(cfg.anchorTimestamp) > _window) {
newAnchor = cfg.lastPrice; // rotates to previous push
cfg.anchorPrice = newAnchor;
cfg.anchorTimestamp = ts;
}
uint256 dev = _deviationBps(newPrice, newAnchor);
if (dev > cap) revert CumulativeDeviationExceeded(...);
If the incoming price was accepted, the newly rotated anchor could still sit above or below that price. Later updates were checked against the older value rather than the price accepted at the start of the new window.
Why it mattered
The report uses a previous price of 100 and an incoming price of 60. At rotation, the new anchor becomes 100. Assuming the configured cap permits that update, a subsequent price of 50 is measured as a 50% deviation from the anchor, although the move from 60 to 50 is approximately 17%.
Depending on the cap, that later update can revert with CumulativeDeviationExceeded, stalling the feed during a directional market move. The effect can occur in either direction; the report highlights the need for fresh prices during sharp declines.
The fix
The report recommends using the current incoming price as the anchor when a new window begins. That makes the new window's reference value the price being accepted at its boundary.
This is a recommendation about the window transition. It should not be read as resetting the anchor after every update within the window or as a reason to omit other price validation.
Takeaway
Test both sides of a time-window boundary, including the first accepted update and the one that follows it. A boundary transition can leave a safety check measuring against an unintended reference value.
Finding status: Fixed.
Shipping something similar? We review the code before it holds money.
Request an audit