Deciphr Academy
Track 3 · Module 15 · Lesson 6 of 6 · 7 min read

What should you check before relying on a price oracle?

Short answer

Check how deep the asset's markets are, how many independent sources feed the price, how fresh it must be, and what your app does when it goes wrong.1,2,3 Chainlink's documentation says developers are solely responsible for "monitoring and mitigating any potential market integrity risks".4

How deep is the market?How many independent sources?How fresh must the price be?Pool price? Use a TWAPWhat happens when it fails?
Fig. 6. Five questions to ask before your app trusts a price.
Not advice, not an endorsement

This lesson names oracle providers only to quote their own documentation. Naming one is not an endorsement. Nothing here is financial, legal or technical advice for your project.

1. How deep is the market?

Chainlink's documentation says assets with low liquidity or trading volume can be volatile or hard to price.1 Attackers may use that to make a contract act in ways you did not intend.1 Some feeds take their price from one exchange only, so check that exchange too.1

Chainlink also sorts its feeds into risk groups, from low to very high, with separate groups for new tokens and custom feeds.1

2. How many independent sources?

ethereum.org says the minimum to avoid oracle manipulation is a decentralised oracle network that draws on several sources.2 Many nodes that read the same source don't count.5 Chainlink says single-source feeds carry a different risk, and need extra safeguards.1

3. How fresh must the price be?

Find the feed's deviation threshold and heartbeat, and check the time of every answer you use.3 Busy networks can slow updates down too.1 For pull oracles, Pyth recommends a staleness check that refuses any price that is too old.6

4. If you read a trading pool, average it over time

A TWAP, or time-weighted average price, averages a price over a period of time.7 Uniswap's documentation explains the method. You read a running total at the start and end of the period, then divide the difference by the period's length.7

Longer periods protect against manipulation, ethereum.org says, because recent large orders can't move the average much.2 Uniswap says the cost of manipulating a simple TWAP grows roughly in step with the money in the pool.7 It also grows with the length of the period.7 It adds that things like network congestion can make an attack cheaper.7

Working out a TWAP

Weight each price by how long it lasted, then divide by the total time. Over 10 minutes at $1.00 for 9 minutes and $4.00 for 1 minute: (9 × $1.00 + 1 × $4.00) ÷ 10 = $1.30. The one-minute spike moves the TWAP by just 30 cents.

5. Plan for failure

Chainlink lists safeguards that its users have built.1

  • Circuit breakers pause the app for a while after an extreme price move.1
  • A manual kill switch cuts off the feed if a bug is found in a contract it depends on.1
  • Monitoring sends alerts when a feed's answers move unexpectedly.1
  • Soak testing tries the setup for a period before any real money relies on it.1

Pyth publishes a confidence interval with each price: a range showing how uncertain the price is.6 For lending and derivatives apps, it suggests valuing at whichever edge protects the app.6

Our viewNo oracle is safe for every asset. The cheapest protection is often to say no: don't let people borrow against a token whose price a few trades can move.
Sources
  1. Selecting Quality Data Feeds. Chainlink documentation, page read 22 October 2026.
  2. Smart contract security. ethereum.org developer docs, page updated 7 October 2026.
  3. What are Chainlink Data Feeds?. Chainlink documentation, page read 22 October 2026.
  4. Developer Responsibilities: Market Integrity and Application Code Risks. Chainlink documentation, page read 22 October 2026.
  5. Oracles. ethereum.org developer docs, page updated 26 June 2026.
  6. Best Practices. Pyth Network documentation, page read 22 October 2026.
  7. Uniswap v2 Oracles. Uniswap developer docs, page read 22 October 2026.

General education built from the publicly available sources listed above. Not financial, legal, tax or investment advice. Naming a company, project or regulator is not an endorsement either way. Last checked 2026-10-22. Terms and disclaimer.