Why DeFi protocols depend on price oracles
DeFi depends on price oracles because smart contracts cannot read outside prices. Oracles bring market data on-chain for loans, swaps and stablecoins.

On this page
- An oracle reports price data; it does not hold assets.
- Lending uses prices to value collateral and trigger liquidations.
- Decentralized oracles aggregate many sources.
- Stale prices can cause wrongful liquidations.
DeFi stands for decentralized finance. It runs on smart contracts. A smart contract is a program on a blockchain. Those programs can run markets, but they cannot see outside prices.
What problem do price oracles solve?
DeFi contracts live on a blockchain and cannot read outside prices on their own. An oracle is middleware that fetches external price data and delivers it on-chain. It does not trade or hold assets. It only reports price data.
How do DeFi protocols use oracle prices?
The oracle price is an input contracts act on automatically. Lending protocols use it to value collateral and decide when to liquidate. Decentralized exchanges and stablecoins use it to set swaps and check a peg.
Why not just use exchange prices?
A single exchange price can be wrong or easy to move for a moment. If a protocol trusts one venue, a bad print can become the contract's reality. Decentralized oracles aggregate many sources to make a single-source attack harder.
- They pull prices from many exchanges and data providers.
- They filter sources to reduce outliers.
- They let independent operators report and validate data.
What are the main oracle risks?
An oracle can be manipulated or delayed. If a price is wrong when a contract acts, the result can be a wrongful liquidation or a loss for the protocol. Even a decentralized oracle can fail if its sources or operators are compromised.
Frequently asked questions
The contract may keep using the last reported price. If that price is far from the market, the contract can act on bad data.
They usually reduce the risk that one exchange or one operator controls the price. They can still fail if sources are down or data is delayed.
Some can. A protocol can use its own pool balances to set prices, or it can avoid external prices by design.
The people who write and govern the protocol choose the oracle. Token holders often vote on that choice, and it can change later.





