Skip to main content
← DeFi glossary

Glossary · O

Oracle

A service that provides external data — typically asset prices — to smart contracts on a blockchain. DeFi protocols rely on oracles to determine collateral values and trigger liquidations. Chainlink is the dominant decentralised oracle network. Oracle manipulation is a common attack vector in DeFi exploits.

Last updated

How Oracle works in practice

An oracle brings off-chain data on-chain. Smart contracts cannot see outside their own chain, so every protocol that needs a price — every lending market, every derivative, every liquidation engine — depends on one. That makes the oracle a shared point of failure for the whole system that trusts it.

Worked example

A lending market prices ETH collateral from a decentralised feed aggregating many exchanges, updating when the price moves beyond a threshold or a set interval elapses. Liquidations are triggered by that feed's number, not by any single exchange's price.

Figures are illustrative and chosen to be checkable, not live market data.

The mistake that costs people money

Oracle manipulation has caused some of DeFi's largest losses. A protocol pricing an asset from a single thin pool can have that price pushed with a flash loan, letting an attacker borrow against collateral that is not worth what the contract believes. When assessing a protocol, the oracle design is a first-order question.

Oracle: common questions

What is Oracle?
A service that provides external data — typically asset prices — to smart contracts on a blockchain. DeFi protocols rely on oracles to determine collateral values and trigger liquidations. Chainlink is the dominant decentralised oracle network. Oracle manipulation is a common attack vector in DeFi exploits.
How does Oracle work in practice?
An oracle brings off-chain data on-chain. Smart contracts cannot see outside their own chain, so every protocol that needs a price — every lending market, every derivative, every liquidation engine — depends on one. That makes the oracle a shared point of failure for the whole system that trusts it.
Can you give an example of Oracle?
A lending market prices ETH collateral from a decentralised feed aggregating many exchanges, updating when the price moves beyond a threshold or a set interval elapses. Liquidations are triggered by that feed's number, not by any single exchange's price.
What do people get wrong about Oracle?
Oracle manipulation has caused some of DeFi's largest losses. A protocol pricing an asset from a single thin pool can have that price pushed with a flash loan, letting an attacker borrow against collateral that is not worth what the contract believes. When assessing a protocol, the oracle design is a first-order question.

Related terms (O)