A price oracle is a specialized type of oracle that provides smart contracts with information about the market value of cryptoassets. Price data is required whenever a DeFi protocol needs to compare the value of different assets or enforce financial risk parameters.

For example, a lending protocol needs to know the value of a user collateral position to determine borrowing capacity and whether the position has reached the liquidation threshold.

Price feeds can be constructed from multiple market sources. Using only one source can create a single point of failure or manipulation. Aggregating several sources can improve robustness, although it does not eliminate every possible oracle risk.

Freshness is also important. During a rapidly moving market, an outdated price can differ substantially from the current market price. Protocols therefore define rules for updating prices and handling stale data.

The quality and liquidity of the underlying markets also matter. A price derived from a thin or easily manipulated market can become unreliable even if the oracle software itself operates correctly.

Price oracles are particularly important for lending, derivatives, stablecoins, and other financial applications. An oracle failure can directly affect borrowing, liquidations, and the value assigned to assets within the protocol.