Price oracle
Also known as Oracle · Blockchain oracle · Price feed
A price oracle brings outside data, such as the price of a token, onto a blockchain so that smart contracts can use it. Lending markets value collateral through oracles, so a wrong or manipulated price can trigger liquidations that should never happen.
A smart contract knows only what is on its own blockchain. It cannot look up the price of ETH or the value of a vault share. Yet a lending market needs to know what its collateral is worth at every moment. Oracles connect that closed world to the data it depends on, which makes them essential infrastructure and a frequent target.
How a price oracle works
Most price oracles collect prices from many sources, such as exchanges and data providers, combine them into one figure and publish it onchain. Two delivery models are common:
- Push feeds write a new price to the chain on a schedule, or whenever the price moves by more than a set threshold.
- Pull feeds keep signed prices offchain, and a user or protocol brings the latest one onchain at the moment it is needed.
Chainlink and RedStone are widely used oracle providers, and both offer push and pull models.
Market prices vs. fundamental prices
A market price feed reports what a token trades at. A fundamental price feed reports what the token is worth based on its underlying assets, for example a vault token's share value computed from the vault's holdings. The difference matters for collateral. If a vault token briefly trades below its underlying value in a thin market, a market feed pushes lending positions toward liquidation while a fundamental feed does not. The trade-off is that a fundamental feed reflects a genuine loss of market confidence more slowly.
How oracles fail
- Manipulation. An attacker borrows a large sum through a flash loan, moves the price in a thin liquidity pool that an oracle reads, borrows against the inflated price and leaves the protocol with bad debt.
- Stale data. If a feed stops updating during a fast market, contracts act on old prices.
- Bad sources. If enough sources report a wrong price, the combined figure is wrong too.
- Misconfiguration. A feed set up with the wrong decimals or the wrong asset can misprice a market instantly.
A simple example
A lending market accepts a token whose price comes from a single small pool. An attacker buys heavily in that pool, doubling the reported price within one transaction, supplies the token as collateral, borrows other assets against it and lets the price fall back. The market is left holding collateral worth half what it lent. A feed that combined many sources over time would have resisted the move.
Risks and limits
No oracle design is perfect: every feed trades off speed, cost, accuracy and resistance to manipulation. A money market covers the rest with conservative loan-to-value limits, caps on how much of an asset can be supplied or borrowed, and pauses for abnormal prices. Data that has to move between chains brings its own risks, which is why oracle networks also offer cross-chain messaging such as Chainlink CCIP.
How Tori Finance uses this
RedStone fundamental price feeds are live for trUSD and strUSD on Ethereum. A fundamental feed reports a token's value from its underlying assets rather than from its trading price in one market.
Frequently asked questions
What is a blockchain oracle?
A service that brings data from outside a blockchain, such as asset prices, onto the chain so smart contracts can use it.
What is an oracle manipulation attack?
An attack that moves the price an oracle reports, often with a flash loan in a thin market, so that a protocol lends too much against inflated collateral or liquidates positions unfairly.
What is a fundamental price feed?
A feed that reports what a token is worth based on its underlying assets, such as a vault share's value computed from the vault's holdings, instead of the price it trades at in a market.
Related terms
Collateral
Collateral is an asset pledged to back a loan or a token, so that losses can be covered if something goes wrong. In DeFi its type, quality and location matter as much as its amount, and smart contracts can sell it automatically when its value falls too far.
Money market
In traditional finance, a money market is where short-term debt is borrowed and lent. In DeFi, the term usually means a lending protocol where users supply assets to earn interest and others borrow against collateral, with rates that move with supply and demand.
Chainlink CCIP
Chainlink CCIP (Cross-Chain Interoperability Protocol) is a standard for sending messages and tokens between blockchains. A token issuer can adopt it natively, so the same token moves across chains instead of being replaced by wrapped copies from third-party bridges.
Liquidity pool
A liquidity pool is a smart contract holding two or more tokens that traders swap against, with prices set by a formula instead of an order book. Liquidity providers supply the tokens and earn a share of trading fees, taking on price and smart contract risk in return.
Sources
- ethereum.org: Oraclesethereum.org
- Chainlink: What is a blockchain oracle?chain.link
- RedStone documentationdocs.redstone.finance
Written by the Tori Finance team. Not investment advice. Yields vary; capital is at risk.