O

What is Oracle?

Crypto Glossary Definition

A service which allows for smart contracts to interact with data outside of the blockchain environment.

Why Oracle Matters

Blockchains can't natively access outside information like stock prices or sports scores — an oracle is the service that feeds real-world data into smart contracts so they can act on it. Oracle security is a well-known DeFi attack surface: manipulating the price feed an oracle reports has been the root cause of several major DeFi hacks.

Oracle in Practice

A lending protocol needs to know the current market price of ETH in real time to decide when a borrower's collateral has fallen too low and should be liquidated, but the blockchain itself has no way to look outside its own network to find that out. To solve this, the protocol integrates an oracle service like Chainlink, which pulls price data from multiple independent exchanges, aggregates it, and posts an updated price feed on-chain at regular intervals for the smart contract to read. Everything works smoothly until an attacker finds a much smaller, less-audited protocol that instead relies on a single decentralized exchange's own liquidity pool as its price oracle. The attacker takes out a large flash loan, uses it to briefly and artificially push the price on that thin pool far from its real market value, and tricks the lending contract into thinking collateral is worth far more than it actually is, borrowing far more than it should before repaying the flash loan and walking away with the difference. This type of oracle manipulation attack has been the root cause of some of the largest DeFi exploits, which is why using well-distributed, hard-to-manipulate oracle networks is considered a baseline security requirement rather than an optional upgrade.

Still have questions about Oracle?

Ask ARIA, our free AI crypto intelligence agent, for a deeper explanation.

Ask ARIA →