Skip to content

In-depth lesson · technique

Price oracle manipulation

What every disclosed Price oracle manipulation report in the index teaches, put together: how it works, how it changed year by year, where it turns up, and things to try. Every point shows the reports it is seen in.

reports cited in this lesson
33

Learning Smart contracts, step 4

Overview

What it is and why programs pay for it.

Price oracle manipulation is a smart contract vulnerability where an attacker moves the price a protocol relies on, usually within a single transaction, so the protocol values assets, shares or collateral incorrectly. The reports behind this lesson show it is not one bug but a family: contracts reading instantaneous pool reserves, contracts trusting a balance they can be inflated, contracts consuming external feeds without basic checks, and contracts whose own update logic lets one caller set the price for everyone. Bug bounty programmes care because the result is often direct loss of funds from a lending pool, vault or automated market maker, and because the same pattern recurs across many codebases, so a hunter who learns to spot it can apply the skill widely.

In practice the technique most often leads to over-borrowing against inflated collateral, over-minting of shares or synthetic assets, discounted purchases of pending fees, or liquidations triggered at a manipulated price. It turns up in lending and margin contracts, vault deposit and withdrawal flows, oracle adapters and price guards, LP token and reward weight calculations, strategy rebalance and reinvest functions, synth minting, impermanent loss protection payouts and swap hooks that price fees from the current pool price.

The common thread is that a value which should be slow and hard to move is instead derived from something an attacker can change cheaply, such as a pool balance, a total supply, a permissionless report or a single observation. The evidence covers 35 reports, 31 with summaries, and none recorded as paid in our database, so treat the payout side as unknown and focus on the technical pattern.

How it works

The mechanics, as the reports show them.

The attacker first identifies a number the protocol trusts: a token price, a share exchange rate, a collateral value or a minimum output. They then find the cheapest way to move that number. The most common route is a large swap against a pool whose reserves feed the calculation, often funded by a flash loan so no capital is at risk. Because the move and the protocol interaction happen in one transaction, the attacker can restore the pool afterwards and keep the difference.

A second route inflates a balance rather than a pool price. If share weights or exchange rates are calculated from the contract's current token balance, a direct transfer of tokens to the contract, or a deposit of LP tokens after inflating the pool, changes the rate without going through the intended deposit path. The attacker then uses the inflated shares or collateral to borrow or withdraw more than they put in.

A third route abuses the oracle machinery itself. Contracts may accept an oracle supplied by one party without checking it matches the one the counterparty accepted, consume external round data without confirming the round is complete and the timestamp non-zero, or let anyone update the oracle so the first caller sets the value for a whole epoch. Related variants include an inverted history check that lets mature pools bypass a time-weighted average, a fallback to spot price when the average call fails, and a replacement oracle installed without carrying forward accepted timestamps so older signed prices can be replayed.

Arithmetic and configuration mistakes make the same outcome possible without any market move. Dividing by the number of decimals instead of ten raised to that power overvalues a token by orders of magnitude, an extra scaling multiplier credits far more tokens than a deposit is worth, and a minimum output derived from an on-chain quoter with no independent anchor lets an attacker pre-trade the pool so the protocol swaps at a poor rate. A publicly callable rebalance function and a zero minimum-shares-out on a strategy deposit are variations on the same theme: the protocol assumes a safe price or a trusted caller that does not exist.

What makes all of this possible is a mismatch between how fast the trusted value can change and how much the protocol assumes it cannot. Instantaneous reserves, current balances, single observations and permissionless reports are all cheap to move; time-weighted averages, external feeds with completeness checks, matched oracles and restricted callers are not. The evidence also shows partial defences failing: a same-block reserve update treated as a validation failure can be triggered by anyone through a permissionless sync, and averaging pool balances instead of the price lets a large temporary imbalance dominate the window.

Year by year

5 years

What each year's disclosed reports show, newest first. A year with few reports says less.

Reports per yearPeak 2025: 17
Reports per year
20213
202210
20231
20245
202517
20267
  1. 2026

    7 reports

    New this year3

    • Front-running a victim's price validation call with a permissionless sync so the same-block check always failed, and repeating on each retry, appears in the disclosed reports.
    • Creating a fresh pool so the TWAP observation reverted, then relying on the guard falling back to the manipulated spot price, appears in the disclosed reports.
    • Replaying an older but still-fresh signed price component after an oracle rotation to push a near-maintenance position into liquidation appears in the disclosed reports.

    Kept working3

    • Hunters examined oracle adapters and price guards that consume external feeds.
    • They front-ran a legitimate oracle update with a manipulated tick where the update function was permissionless and accepted one observation per epoch, checking whether it was locked in for the epoch.
    and 1 more
  2. 2025

    17 reports

    New this year2

    • Pre-trading a pool to worsen the spot price used by an on-chain quoter for minimum output, then letting the protocol swap execute at the low minimum, appears in the disclosed reports.
    • Sandwiching a victim deposit with a flash-loan price move where the strategy deposit passed a zero minimum-shares-out to the router appears in the disclosed reports.

    Kept working3

    • They checked the deposit pricing calculation for an extra scaling multiplier that credited far more tokens than the deposit was worth, then swapped the minted tokens on a DEX.
    • They checked whether a vault valued its Uniswap positions from the slot0 spot price, then moved the pool price with a flash loan just before a queued withdrawal was finalised.
    and 1 more
  3. 2024

    5 reports

    New this year2

    • Adding a large imbalanced amount of liquidity in one block and removing it in the next without updating the pool oracle, then checking whether the reported price stayed skewed for many blocks and blocked redemptions, appears in the disclosed reports.
    • Swap hooks that price pending fees from the current pool price appear as a distinct target in the disclosed reports.

    Kept working4

    • Hunters examined oracle adapters and price guards that consume external feeds.
    • They submitted two different oracle price updates in one transaction and settled two orders at different prices, for example opening and closing a leveraged position.
    and 2 more

Earlier years2

Every point, year by year

Where it is found

8

The features and places the reports found it in, most-reported first.

  1. Margin borrowing, liquidations and collateral valuation in lending contracts.

    Seen in 5 reports
  2. Vault share pricing, deposit and withdrawal flows that value assets from pool reserves.

    Seen in 5 reports
  3. Oracle adapters and price guards that consume external feeds.

    Seen in 4 reports
  4. LP token deposit, burning and reward weight calculations.

    Seen in 2 reports
  5. Strategy rebalance and reinvest functions that swap at the current price.

    Seen in 2 reports

Technologies in these reports2

View all 8

Root causes

16

The mistakes in the code or configuration behind the reports.

  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
View all 16

Things to try

The most-reported tests in the largest contexts. Tick what you have tried; ticks stay in this browser and carry over to the full checklist. Test only what a program's scope allows.

ticked in this lesson

Vault and strategy valuation

of 3 ticked
More in Vault and strategy valuation

Token scaling and exchange rates

of 3 ticked
More in Token scaling and exchange rates

Oracle updates and rotation

of 3 ticked
More in Oracle updates and rotation

LP token and share pricing

of 3 ticked
View more things to try

Bypasses and variations

7

How reports got past filters, encoders and other defences.

  1. Inflate an exchange rate by transferring underlying tokens directly to the contract rather than going through the deposit function.

    Seen in 2 reports
  2. Take a flash loan of the token being priced so its total supply temporarily shrinks and the price formula inflates.

    Seen in 2 reports
  3. Front-run a legitimate oracle update with a manipulated tick so the attacker's value is the one recorded for the epoch.

    Seen in 1 report
  4. Front-run a victim's price validation call with a permissionless sync so the same-block check always fails, and repeat on each retry.

    Seen in 1 report
  5. Replay an older but still-fresh signed price component after an oracle rotation to push a near-maintenance position into liquidation.

    Seen in 1 report
View all 7

Payouts

Public bounties in US dollars, from the data. 0 of 48 reports show an amount.

None of these reports shows a public amount yet.

Typical fixes

13

How programs fixed it, as the reports describe.

  1. Use a manipulation-resistant time-weighted average price or an external oracle instead of instantaneous pool reserves.

    Seen in 6 reports
  2. Require the oracle used for a loan to match the one the counterparty accepted, and reject oracle changes on outstanding loans.

    Seen in 2 reports
  3. Validate round completeness and a non-zero timestamp before consuming Chainlink round data.

    Seen in 1 report
  4. Scale by ten raised to the token's decimals, not by the decimal count itself.

    Seen in 1 report
  5. Average the price over the window rather than averaging pool balances, so a temporary imbalance does not dominate.

    Seen in 1 report
View all 13

Tips for beginners

12

Advice for a first hunt, drawn from the reports.

  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
View all 12

Guides and techniques

The best explainers, cheat sheets and technique posts on Price oracle manipulation, from around the web.

Keep learning

Where this lesson fits, and what to read next.

How this is made: our model read every listed Price oracle manipulation report in the index (our own summary where we have one, otherwise the title and the platform's label), listed the patterns, and merged them. Each point was kept only if the reports it cites exist, are listed and belong here; payouts are computed from the data, not written by the model. Read the originals before relying on a point. Generated 27 Nov 2026 from 35 reports. All Price oracle manipulation reports.