Glossary
Oct 2, 2026

What Is a Price Oracle in DeFi? How Oracles Work

A price oracle delivers asset prices to smart contracts. Learn how DeFi oracles work, why lending and liquidations depend on them, and oracle manipulation.

What Is a Price Oracle in DeFi? How Oracles Work

A price oracle is a service that delivers off-chain or cross-market asset prices to smart contracts, so that a blockchain application can act on what an asset is worth. Blockchains cannot look up prices on their own. Lending markets, stablecoins, perpetual exchanges and liquidation engines all depend on an oracle telling them the price, and they are only as safe as that number.

Price oracle definition

A smart contract can only read data that is already on its own chain. It has no way to check an exchange's order book or a market data feed. An oracle bridges that gap by publishing price data on-chain in a form contracts can read.

"Blockchain oracle" is the broader term for any service that brings outside information on-chain, such as weather, sports results or proof of reserves. A price oracle is the most common and most security-critical kind, because money moves automatically based on its output.

Oracles come in two broad families. Off-chain oracle networks, such as Pyth or Chainlink, aggregate prices from many exchanges and trading firms, then sign and publish them. On-chain oracles derive a price from DEX pools on the same chain, often averaged over time to make manipulation more expensive.

How a price oracle works

  1. Collect. Data providers report prices from exchanges and market makers, or the oracle reads reserves from on-chain pools.
  2. Aggregate. The oracle combines many sources, typically with a median or weighted average, so one bad source cannot move the result much.
  3. Publish. The aggregated price is written on-chain, either pushed on a schedule or when the price moves past a threshold, or pulled on demand by the transaction that needs it.
  4. Consume. A protocol reads the price, often checking how fresh it is and whether its confidence band is acceptable, and then values collateral, settles a trade or triggers a liquidation.

Well-designed protocols add safeguards on top: rejecting stale prices, comparing two independent oracles, capping how fast a price may change, or pausing when sources disagree.

Price oracle example

A hypothetical lending position. Say you deposit 10 ETH as collateral while the oracle reports ETH at $3,000, so your collateral is worth $30,000. You borrow 20,000 USDC. The market's liquidation threshold is 80%, so you can be liquidated once your debt exceeds 80% of your collateral value.

  • Liquidation point: $20,000 ÷ 0.80 = $25,000 of collateral, which is an ETH price of $2,500.
  • If the oracle reports $2,490, your position becomes liquidatable, even if ETH briefly traded higher on another venue.

Now the attack case. Suppose a careless protocol reads the spot price of a small token, XYZ, straight from a single thin DEX pool. An attacker buys enough XYZ to triple its price in that pool, deposits XYZ as collateral at the inflated value, borrows stablecoins against it and walks away. When the price snaps back, the protocol is left with bad debt. That is oracle manipulation, and it is why serious protocols avoid single-pool spot prices.

Why price oracles matter

  • Liquidations run on oracle prices. A wrong or delayed price can liquidate healthy borrowers or leave unhealthy ones untouched. Our guide to DeFi loan liquidations walks through the mechanics.
  • Depegs stress oracles. During a stablecoin depeg, protocols must decide whether to value a stablecoin at $1 or at its market price. Either choice has consequences, as our explainer on stablecoin depegs shows.
  • Manipulation is a leading exploit path. Many DeFi losses combine a flash loan with an oracle that reads a manipulable on-chain price.
  • Due diligence check. Before using a protocol, find out which oracle it uses, whether it has a fallback, and how it handles stale data.

Price oracles on JewelSwap

JewelSwap's money markets on MultiversX value collateral using Pyth, Umbrella, AshSwap and xExchange price sources, and isolated pools let riskier assets be priced and contained separately from the shared pool. Supply and borrowing on these markets are currently paused; our isolated and cross lending explainer describes how the design works.

  • Flash loan — uncollateralised same-transaction borrowing, often used in oracle attacks.
  • Utilization rate — the share of a lending pool that is borrowed.
  • MEV — value captured by ordering transactions, including oracle-triggered liquidations.
  • Funding rate — perpetual futures payments that rely on an index price from oracles.
  • Algorithmic stablecoin — a stablecoin whose peg mechanism depends on accurate prices.

Learn more on the JewelSwap blog

Frequently asked questions

What is a crypto oracle in simple terms?

A crypto oracle is a messenger that brings outside information, most often asset prices, onto a blockchain so smart contracts can use it. Without one, a lending protocol would have no idea what your collateral is worth.

Price oracle vs blockchain oracle: what is the difference?

Blockchain oracle is the general term for any service that puts external data on-chain. A price oracle is a blockchain oracle that specifically supplies asset prices, and it is the type DeFi protocols depend on most.

What is oracle manipulation?

Oracle manipulation means pushing the price an oracle reports away from the real market price, usually by trading heavily in a thin pool the oracle reads, then exploiting a protocol that trusts the false price, for example by borrowing against over-valued collateral.

JewelSwap Crypto Glossary · educational, not financial advice. Updated 2 October 2026. Browse the full glossary.

About the author.

Co-Founder at JewelSwap & CMO at iDenfy. Viktor brings his successful track record of superb development & project management.