In-depth lesson · Price oracle manipulation
Root causes
Every point the Price oracle manipulation reports back under this heading, best-backed first, each with the reports it is seen in.
-
Contracts used instantaneous spot prices from pool reserves instead of a time-weighted average, so the price could be moved within one transaction.
Seen in 6 reports
-
Share weights and exchange rates were calculated from the contract's current token balance, which direct transfers or swaps can inflate.
Seen in 3 reports
-
The contract did not verify that the oracle supplied by one party matched the oracle the other party had accepted.
Seen in 2 reports
-
The oracle's latest round data was consumed without checking that the round was complete and the timestamp non-zero.
Seen in 1 report
-
The code divided by the number of decimals instead of ten raised to that number, overvaluing the token massively.
Seen in 1 report
-
Liquidation logic used a two-day low price rather than the current price, so a short manipulation affected liquidations and rewards.
-
The oracle averaged pool balances over the window instead of averaging the price, so a large temporary imbalance carried disproportionate weight.
Seen in 1 report
-
The oracle update function was permissionless and accepted only one observation per epoch, so the first caller set the value for the whole period.
Seen in 1 report
-
The history condition was inverted so mature pools bypassed the TWAP check, and a TWAP call failure returned the untrusted spot price instead of reverting.
-
Validation treated a same-block reserve update as a failure condition, which anyone can trigger through a permissionless sync call.
Seen in 1 report
-
The replacement oracle was installed without carrying forward the per-feed accepted timestamps, so it started with zero watermarks.
Seen in 1 report
-
The strategy passed a zero minimum-shares-out value to the router, removing any slippage check on the deposit.
-
The minimum output was derived from a spot-based on-chain quoter without an independent price anchor or circuit breaker.
-
The rebalance function was publicly callable and relied on the assumption that only the bot would call it promptly.
Seen in 1 report
-
The protocol treated the last permissionlessly reported oracle value as the spot price for collateral valuation.
Seen in 1 report
-
The price calculation applied an extra scaling multiplier, inflating the value of deposits and minting far more tokens than intended.
Seen in 1 report