Glossary · O
Oracle
Key takeaway
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.
Related guides & comparisons
Oracle: common questions
What is Oracle?
Which DeFi concepts are most closely linked to Oracle?
What is the main risk or misconception around Oracle?
Which guide covers Oracle in practice?
Related DeFi glossary terms
- TWAP Oracle Time-Weighted Average Price — an oracle that calculates the average price of an asset over a defined time window rather than using a single instantaneous price. TWAP oracles are significantly harder to manipulate via flash loans than spot price oracles, making them a safer choice for DeFi protocol price feeds.
- Health Factor A numeric score in DeFi lending protocols (Aave, Compound, Morpho) that represents the safety of a collateralised borrowing position. Health Factor = (collateral value × liquidation threshold) ÷ borrow amount. A health factor above 1 means the position is safe; below 1 triggers automatic liquidation. Maintaining a health factor of 1.5+ is a common recommendation for comfortable buffer against liquidation from market volatility.
- Smart Contract Self-executing code stored on a blockchain that automatically carries out the terms of an agreement when predefined conditions are met. Smart contracts are the foundation of DeFi — they automate lending, trading, yield generation, and governance without human intermediaries. Once deployed, smart contract code cannot be altered (unless the contract has explicit upgrade mechanisms).
- Liquidation The automatic closure of a borrower's collateralised position when the collateral value falls below the required ratio. In DeFi lending, smart contracts and liquidation bots execute this without human intervention. Liquidated borrowers typically receive a smaller amount of collateral back after a liquidation penalty is deducted.
- AVS (Actively Validated Service) A service that borrows cryptoeconomic security from restakers — typically via EigenLayer — instead of bootstrapping its own validator set. AVSs can include data availability layers, oracles, bridges, or sequencers. Operators run AVS software; restakers opt in and accept additional slashing conditions. AVS design is central to the 2024–2026 restaking narrative. Also searched as: actively validated services, EigenLayer AVS.
- Collateral Assets deposited as security for a loan. In DeFi lending (Aave, Compound), collateral must exceed the borrowed amount — called overcollateralisation. If the collateral value falls below the required ratio, it is automatically liquidated to repay the loan.