Skip to content

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.

Back to the lesson 1 to 16 of 16
  1. 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
  2. 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
  3. The contract did not verify that the oracle supplied by one party matched the oracle the other party had accepted.

    Seen in 2 reports
  4. The oracle's latest round data was consumed without checking that the round was complete and the timestamp non-zero.

    Seen in 1 report
  5. The code divided by the number of decimals instead of ten raised to that number, overvaluing the token massively.

    Seen in 1 report
  6. Liquidation logic used a two-day low price rather than the current price, so a short manipulation affected liquidations and rewards.

    Seen in 1 report
  7. 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
  8. 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
  9. 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.

    Seen in 1 report
  10. Validation treated a same-block reserve update as a failure condition, which anyone can trigger through a permissionless sync call.

    Seen in 1 report
  11. The replacement oracle was installed without carrying forward the per-feed accepted timestamps, so it started with zero watermarks.

    Seen in 1 report
  12. The strategy passed a zero minimum-shares-out value to the router, removing any slippage check on the deposit.

    Seen in 1 report
  13. The minimum output was derived from a spot-based on-chain quoter without an independent price anchor or circuit breaker.

    Seen in 1 report
  14. The rebalance function was publicly callable and relied on the assumption that only the bot would call it promptly.

    Seen in 1 report
  15. The protocol treated the last permissionlessly reported oracle value as the spot price for collateral valuation.

    Seen in 1 report
  16. The price calculation applied an extra scaling multiplier, inflating the value of deposits and minting far more tokens than intended.

    Seen in 1 report