Digital Asset Database Digital asset research & education
BTC$77,689+1.58% ETH$2,396+1.22% USDT$0.9996-0.01% BNB$701.09+2.87% XRP$1.36+3.15% USDC$0.9998+0.00% SOL$100.30+2.08% TRX$0.3269+1.40% FIGR_HELOC$1.01-2.00% HYPE$81.96+0.93% ZEC$829.99+2.95% DOGE$0.0829+2.84% RAIN$0.0166-0.37% USDS$0.9997+0.01% XMR$513.25-0.82% LEO$9.31+0.50% WBT$71.11+1.29% LINK$11.18+1.51% ADA$0.2071+7.07% XLM$0.1765+2.15% BCH$249.93+2.72% DAI$0.9998+0.00% CC$0.1094-3.08% USDE$0.9994-0.01% USD1$0.9994+0.00% LTC$50.51+3.91% UNI$6.01-1.69% GRAM$1.34+1.41% HBAR$0.0768+4.82% USDG$1.00+0.03% AVAX$7.26+2.49% SUI$0.7633+6.97%
菜单
首页
资产 全部资产板块排名Heat map筛选器对比资产★ Saved
基本面 Fees & revenue锁定价值Exchange volume网络活动StablecoinsStaking & yield
估值 估值比率Supply & issuance指标定义
机构 交易所交易产品企业资产负债表
研究 研究笔记事件日历风险框架安全事件
学习 Learn library术语表计算工具方法论数据来源数据新鲜度AI agents公开 API
资讯 查询数据 全球市场 关于我们
阅读选项
Photography CryptoStudio
引导视图

市场新手——价格、收益率、market cap?我们在您浏览时逐一解释每个术语,语言简明直白。数据相同,内置辅助说明。

专家观点

您已了解市场。仅呈现数据——简洁、快速、紧凑,无多余说明。此为默认视图。

浅色或深色
语言
公开 API

本站所有数据均可通过 JSON 获取,并附带期间与来源信息。

阅读 API 文档
DeFi Advanced 8 min

Oracles: the most common single point of failure in DeFi

A contract cannot see a price; it can only read one that somebody wrote down, and almost every protocol inherits the failure modes of that process.

A smart contract has no access to anything outside its own chain. It cannot see an exchange, a bank balance or the time of day on another network, so any protocol that needs an external fact depends on a process that writes that fact into on-chain state. That process is an oracle, and because lending, derivatives, stablecoins and structured products all read prices the same way, an oracle is the dependency most likely to be shared by everything that fails at once.

The designs, and what each one trades away

  • Push feeds. A set of reporters signs prices and writes them on chain on a heartbeat, or whenever the price has moved by more than a deviation threshold. Everything downstream reads a stored value for free. The stored value is by construction stale between updates, and the deviation threshold defines exactly how stale it may be.
  • Pull feeds. Reporters sign prices continuously off chain, and a user submits the signed price along with the transaction that needs it. Updates cost nothing when unused and the price is fresh at the point of use, but whoever chooses which signed price to submit has a degree of selection over the number the protocol will act on.
  • Time-weighted averages from an on-chain pool. The price is derived from a decentralized exchange pool's own history, so it requires no external reporter at all. Manipulating a longer average requires holding a distorted price across many blocks, which is expensive, and the same averaging makes the feed lag badly in a fast move.
  • Aggregated indices. A median or volume-weighted composite across venues resists a single venue's outage or manipulation, and provides no protection when the venues are correlated because they are all quoting from the same underlying market.

No design removes the tradeoff between freshness and manipulability. A feed that updates instantly reflects whatever just happened, including something an attacker caused. A feed that averages is harder to move and reports the past.

The manipulation arithmetic

The cost of moving an on-chain price is a function of pool depth. Under a constant product curve, pushing the price up by a factor of r requires buying into the pool until the reserve ratio matches, and the trader is left holding the asset at an inflated price; most of the outlay is recovered when the price is pushed back, so the true cost is the round trip's fees and slippage, not the notional deployed.

The payoff is bounded by something else entirely: the size of the position that can be opened against the distorted price. If a lending market will lend against a thinly traded collateral token, the attacker's profit is set by that market's depth, while the attacker's cost is set by the pool's. When those two numbers are far apart, the trade is a matter of execution rather than of capital, and a flash loan removes the capital requirement altogether by borrowing and repaying within one transaction. This is the shape of a large share of the losses in the sector: not a broken cryptographic primitive, but a correct contract reading a price that was true for one block.

Mitigations follow from the same arithmetic. Caps on how much can be borrowed against thin collateral bound the payoff directly. Isolated markets stop the loss from reaching unrelated deposits. Pricing collateral at the lower of several independent feeds removes the single manipulable source. And requiring a price to persist across blocks makes an atomic attack impossible, at the cost of slower liquidations.

A taxonomy of oracle failure

Manipulation is only one branch. The others recur often enough to be worth naming.

  • Stale. The reporters stop, or the deviation threshold is never crossed on a low-volatility asset, and the contract keeps using an old number that no longer describes the market. Oracle failure of this kind is silent, because a stored value looks identical whether it is one minute or one week old unless the timestamp is checked.
  • Correct but late. In a fast decline the feed is accurate at every update and behind the market between them, so liquidations happen at prices that no longer exist and liquidators refuse to act.
  • Right price, wrong asset. A wrapped or receipt token is priced using the underlying's feed on the assumption that they are equivalent. When the wrapper trades at a discount, that assumption is the error, and it typically shows up as a depeg that the protocol cannot see.
  • Unit errors. Decimals, denomination in the wrong quote currency, or an inverted pair. These are mundane, and they have caused total losses.
  • Governance. The address a protocol reads from is a parameter. Whoever can change it can change every price in the system at once, which makes admin key risk and upgradeability risk oracle questions as much as contract questions.
  • Ordering. Because an update and the transactions reacting to it sit in the same block, the right to act first on a new price is valuable, which places MEV and front-running inside the oracle's design rather than outside it.

What can be checked before it matters

Useful questions are specific: how many independent reporters sign a feed and who they are; what the heartbeat and deviation threshold are; whether the price is a broad index or a single venue; whether the contract validates the timestamp and rejects stale data; whether a circuit breaker exists and who can trigger a pause; and whether collateral caps bound the payoff from a successful manipulation. For assets whose price is supposed to be fixed, peg deviation is the direct measure of whether a feed and reality still agree, and the depth behind a price matters more than the price itself, which is why volume relative to value locked is worth reading next to any pool used as a price source.

The incident record classifies past failures by mechanism, including the oracle-driven ones, the risk section lists the feeds protocols depend on, and the data sources page sets out where the prices on this site come from and how they are reconciled, which is the same problem seen from the outside.

01

核心要点

Every oracle design trades freshness against manipulability, and no design escapes that tradeoff.
The cost of manipulating an on-chain price is set by pool depth, while the payoff is set by how much can be borrowed against the distorted price.
Flash loans remove the capital requirement for manipulation, leaving only the round-trip trading cost.
Stale prices are silent failures, because a stored value looks the same whether it is a minute or a week old unless the timestamp is validated.
The oracle address is a governance parameter, so whoever can change it can change every price in the system at once.

资产

全部资产板块排名Heat map筛选器对比已保存

基本面

Fees & revenue锁定价值Exchange volume网络活动StablecoinsStaking & yield

Valuation & risk

估值比率Supply & issuance指标定义风险框架安全事件

机构

交易所交易产品企业资产负债表Events研究笔记资讯

学习

Learn library术语表计算工具查询数据AI agents公开 API

关于

关于我们联系方法论数据来源编辑政策数据新鲜度

法律

免责声明使用条款Privacy policy