Skip to content
Kriptofoni

What Is Price Oracle?

Also known as: Price Feed, Oracle, Oracle Price Feed, Decentralized Price Oracle

In short

A price oracle is a data service that collects the market prices of cryptocurrencies and other assets from off-chain or on-chain sources and brings them onto the blockchain in a form smart contracts can use.

Smart contracts cannot access data outside the blockchain on their own. Lending protocols need current prices to calculate collateral value, derivatives platforms to price positions, and stablecoin systems to maintain their peg. Price oracles meet this need in different ways: decentralized oracle networks such as Chainlink aggregate prices that many independent nodes collect from different exchanges; decentralized exchanges such as Uniswap offer a time-weighted average price (TWAP) calculated over a certain period.

Oracles are one of DeFi's most critical attack surfaces. A protocol that reads the instantaneous price from a single low-liquidity pool can become vulnerable to an attacker temporarily manipulating the price with a flash loan; in this way, undue loans can be taken or erroneous liquidations can be triggered. Many DeFi exploits in the past have been based on this kind of oracle manipulation.

To reduce these risks, measures such as multiple data sources, median calculation, deviation thresholds, time-weighted averages, and circuit breakers that kick in during unusual price movements are used.

Last updated: · This content is for information purposes only and is not investment advice.

Related terms