Skip to content

In-depth lesson · Price oracle manipulation

Tips for beginners

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 12 of 12
  1. Start by mapping every place the code turns a pool reserve, a token balance or a total supply into a price, share or collateral value. Grep for reserve reads, balance reads and exchange rate functions, then ask for each one whether a single transaction could move the input enough to matter.

    Seen in 3 reports
  2. Check the oracle path end to end: who supplies the oracle, whether the other party verifies it, whether round completeness and a non-zero timestamp are checked, and whether a failed average call reverts or silently falls back to spot. These are small code reads with large consequences.

    Seen in 3 reports
  3. Test balance inflation directly: transfer underlying tokens or LP tokens straight to the contract and see whether the reported exchange rate or share weight changes without a matching deposit. This is often simpler than a flash loan route.

    Seen in 3 reports
  4. When you find a candidate, prove impact with a concrete before-and-after: the value the protocol used, the value after your move, and the resulting excess borrow, mint or payout. A price move alone is not a finding; the loss or over-credit is.

    Seen in 3 reports
  5. Watch for partial defences that look present but are bypassable: an inverted history condition, a same-block check anyone can trip with a sync call, or a replacement oracle that starts with zero timestamps. Read the condition, do not just note that a check exists.

    Seen in 3 reports
  6. Avoid the common beginner mistakes: reporting a theoretical price move with no profit or loss, reporting an out-of-scope adapter, or describing a fix without showing the vulnerable path. Keep the write-up to the code path, the manipulation, and the measurable impact.

    Seen in 3 reports
  7. Look at permissionless functions that write a price or observation. If anyone can update and only one observation per epoch is accepted, test whether front-running a legitimate update locks in a manipulated value.

    Seen in 2 reports
  8. For vault and strategy flows, check the minimum output and slippage parameters passed to routers. A zero minimum-shares-out or a minimum derived only from an on-chain quoter is a strong signal that a sandwich or pre-trade is possible.

    Seen in 2 reports
  9. Check decimal scaling carefully. Dividing by the decimal count rather than ten raised to that power, or applying an extra multiplier, can overvalue a token by orders of magnitude with no market manipulation at all.

    Seen in 2 reports
  10. Check scope before you spend time. Oracle adapters, external feed integrations and third-party routers may be out of scope or already known; confirm the affected contract is in the programme's assets and that the issue is not a documented design choice.

    Seen in 2 reports
  11. Consider timing attacks on keepers and bots. If a reinvest or rebalance transaction uses spot price and lands predictably, skewing the pool just before it and reversing afterwards can be enough, especially if the function is publicly callable.

    Seen in 2 reports
  12. For liquidation logic, check which price is used and over what window. A multi-day low price or a permissionlessly reported value can let a brief manipulation affect liquidations and rewards far beyond the moment of the move.

    Seen in 2 reports