预言机,让 Web3 变得更好了吗?

IOSGPublished on 2022-04-07Last updated on 2022-04-07

Abstract

预言机已经在web3时代翻开了新的篇章,并为超越过去旧有的构想和功能做好了准备。

预言机(oracle)通常被认为是链上和链下数据的桥梁和窗口。简而言之,预言机是一个为区块链项目提供真实世界数据服务的中间件。

数据

来源: IOSG
如果我们把区块链定义成信任机器,那么预言机本质上可以被称为维护和构建信任的机器。事实上,区块链本身并不能产生信任,信任的输入来自于预言机。绝大多数区块链项目如果没有接入预言机则会如同视野尽失地在黑夜中行走,难以生存。
众所周知,区块链是一个封闭的黑匣子,并不具备发起网络调用的能力。然而智能合约则由于共识机制需要请第三方对数据进行验证。为了方便理解,我们可以将预言机扮演的角色当成是两个文明之间的使者,就像《三体》中维系人类与三体文明沟通的“智子”。只有通过预言机的数据输送,智能合约才能获取来自互联网和现实世界的确定性信息,包括股票价格、汇率、总统大选的最终结果等。
四大谱系
根据形式,我们可以将预言机分为四种,分别为:软件预言机、硬件预言机、中心化预言机和去中心化预言机:
1.软件预言机
软件预言机连接到互联网,可以通过API实时访问、传输来自任何第三方服务器或网站的数据和信息,如商品价格、天气指数、航班号等,并将其写入智能合约中。
2.硬件预言机
硬件预言机在IoT中被广泛采用,用作电子传感器和数据收集器。它将物理事件转换为数字值,以便智能合约可以理解它们。条码扫描仪、银行卡POS机、收集各种医疗数据的医疗设备等都可以被当作为硬件预言机。
3.中心化预言机
中心化预言机是一种单一数据来源的预言机,通常由政府或信誉良好的公司等值得信赖的第三方提供数据。它可以通过将数据从本地设备的不受信任的操作系统中分离出来,防止数据篡改和丢失。然而,单一中心化的数据来源也给智能合约带来了潜在的风险。
4. 去中心化预言机
去中心化预言机是指具有分布式共识机制的预言机,也称为共识预言机。它从多个而非单个外部来源获取数据,因此它更加可靠且无需信任。基于华为实验室的相关研究理论,根据数据处理方式的不同,去中心化预言机可以分为4类:

  • 基于聚合的处理方式:多数据源聚合消除单个恶意数据影响,如:Chainlink
  • 基于质押的处理方式:要求参与者持有资产提高可信度,如:Band
  • 基于博弈论的处理方式:提供非敌对的经济激励,如:NEST
  • 基于信誉的处理方式:通过降低声誉限制敌对节点,如:Witnet

    与中心化预言机相比,尽管去中心化预言机的运行效率相对较低,但它解决了单节点的故障问题,因此带来安全风险的可能性更小。由于对风险的担忧,大多数 DeFi 应用程序更喜欢在去中心化的预言机上运行。
数据

来源: IOSG
预言机在Web3 :不仅仅是DeFi的基础设施
基于以上,我们对区块链采用预言机的价值有了一定基础性的理解。但谈到预言机在web3.0中的应用价值,目前的很多研究还是采用一种模棱两可的口吻。
去年,Chainlink2.0 的白皮书首次引入DON(去中心化预言机网络)的概念。DON 是由一组 Chainlink 节点维护的网络,可以灵活地引导任何预言机服务,因此在不久的将来,Chainlink 将能够通过无需信任的链下计算向区块链提供外部数据。为了实现这一愿景,Chainlink 推出了 VRF、Keepers、CCIP 等一系列产品和服务,而这些服务的部署在很大程度上进一步打开了我们对预言机在 web3 应用场景的想象空间。

数据

来源: Chainlink 2.0 白皮书
为了更好地展示预言机在未来 web3 世界中的巨大潜力,我们首先罗列了几个典型用例进行简单说明,随后将根据不同的应用场景在下文中展开讨论:

数据

来源: IOSG
1.DeFi
虽然如今原生加密货币和稳定币仍是DeFi的主流,但可以预见的是,基于现实资产代币化的新兴市场会将会吸引越来越多的目光。例如,在美国没有合法身份的外国人可能无法直接介入美股交易市场,但通过在现实资产代币市场上购买与某些美股挂钩的代币,达成近似的投资效果。此外,用户也可以通过抵押代币化的房产来为自己攫取更大的流动性。
DeFi中预言机的另一个新兴用例是公平排序(fair sequencing)。在现有的交易制度中,交易是由矿工审查和排序的,这就为他们留下了巨大的可以利用的套利和操纵空间。通过利用即将提交给mempool但尚未上链的交易信息,矿工和验证者可以修改交易顺序,使自己受益。MEV(矿工可提取价值)这一术语便是专门来描述这种现象的。
因此,为了解决这类损害公平性的问题,Chainlink等预言机已经提出了公平排序服务(FSS)的解决方案。FSS准备通过设计确定性的算法来帮助DEX实现公平的交易,以防止MEV、front-running或任何其他导致交易混乱的方案。这套方案主要由三个机制组成:交易监控(monitoring)、交易排序(sequencing)和交易发布(posting)。大家可以通过下述示意图对FSS有一个整体的快速了解:

数据

来源: IOSG
2.NFT & GameFi
NFT发放机制和GameFi的用户体验也可以通过oracle链接链下的外部数据得到极大的提升。一个典型的用例就是预言机提供的随机数链下生成。比如,艺术家可以根据可验证的随机数生成稀有度不同的nft,并保证空投的公平性。再比如,游戏厂商也可以利用随机数生成更多样的打斗装备和战斗场景。
理论上,随机数(random number)通常指的是统计上随机生成的数字,在网络安全,游戏,和科学模拟等等方面都扮演着不可或缺的角色。产生随机序列的发生器被称为Random Number Generater (RNG)。根据产生的随机序列性质的不同,可以将其分为“真随机数生成器(True Random Number Generator, TRNG)”和“伪随机数生成器(Pseudorandom Number Generator, PRNG)”。TRNG通常利用噪音,混乱现象,量子随机过程等不确定的物理现象生成真随机序列。而PRNG则是一种确定的算法,需要外部输入一个初始值来充当seed。常见的几种算法包括:Linear congruential, Cryptography, ANSI X9.17, Mersenne twister等。

数据

来源: IOSG
显而易见的是,在区块链链上生成的随机数都是伪随机数。并且鉴于区块链内容的透明性,链上生成的随机数很容易被不诚实的节点攻击,面临着极大的安全风险。典型地,矿工可以通过“Block Withholding Attacks”丢弃不利于自己的区块,从而在博彩中获得相对优势。在这种情况下,除了通过重复哈希提升矿工攻击成本外,最为便利的解决方案就是将预言机当作TRNG,通过集成链下数据生成可验证的真随机序列,确保随机数的保密性和公平性。在现阶段,除了Randao等oracle所提出的Commit Except和BLS协约等方法外,由去中心化oracle提供的VRF(Verifiable Random Function)是最常见的服务。VRF工作流程可以被概括展示如下:

数据

来源: IOSG
3.SocialFi & DAO
在一些情况下,预言机还能够在socialfi和DAO的应用场景中充当去中心化的身份验证(DID)工具。通过利用DON来集成互联网和链下的活动数据,预言机在可以帮助用户在web3中验证和管理自己的身份凭证,同时提供传统DID工具所不具备的传统兼容性和隐私保障。比如通过使用预言机集成DAO成员在链下的活动参与信息和资格认证信息,DAO管理者就可以发放相应的POAP(出席证明),并对成员的能力资质进行认证。
而CanDID是帮助DON实现此类功能的内部工具。通过集成预言机,CanDID允许用户从现有系统中安全地导入身份,并防止产生多个身份。比如小王可以用他的社保个人资料页面来生成一个证明他的社保号的协议证书。从机制上看,CanDID主要由两个子系统组成:身份系统密钥恢复系统。
在身份系统中, CanDID可以通过利用DECO或Town Crier这两种预言机,在社交媒体、电子银行账户等现有网络服务中实现安全的身份迁移,并且不需要数据供应商明确地创建与DID兼容的凭证,极大地促进了凭证生态系统的便利性。
在密钥恢复系统中, CanDID允许用户利用现有的网络认证方案,通过快速简单的工作流程来恢复密钥。用户可以将密钥储存在他们经常使用的任意设备上,并预先选定恢复政策或通过秘密共进行享备。具体的恢复流程可参见下图:

数据

来源: CanDID: Can-Do Decentralized Identity with Legacy Compatibility, Sybil-Resistance, and Accountability
写在最后
综上,可以看到预言机已经在web3时代翻开了新的篇章,并为超越过去旧有的构想和功能做好了准备。尽管目前对预言机在web3新兴应用的讨论声仍然较少,但我们相信随着技术持续演进和web3对web2的逐渐吞噬,越来越多敏锐的市场参与者会认识到预言机所具备的潜在价值和对web3的重大贡献。
发现未被发现的,想象难以想象的。在后续的研究中,我们将对预言机的喂价创新和跨链解决方案等更多新兴用例和机制细节进行深入解读。

Trending Cryptos

Related Reads

Microsoft CEO Satya Nadella's Latest Warning: Betting Entirely on a Single AI Model Hands Over a Company's Lifeblood

Microsoft CEO Satya Nadella warns that companies relying solely on a single AI model could jeopardize their survival. He argues that over-dependence leads to "vendor lock-in," where businesses risk ceding control over their core data, memory, contextual history, and AI usage patterns. This dependence essentially outsources a company's critical thinking and operational know-how to an external provider. The deeper a company integrates with one AI system—feeding it prompts, internal data, and workflows—the more it reveals its unique business methods and competitive edge. This accumulated knowledge could become accessible to the AI supplier. Furthermore, switching providers becomes extremely costly and complex, as companies would need to rebuild their entire AI-augmented workflow, memory, and tool integrations from scratch. Nadella's solution is "decoupling." Companies should separate their proprietary data, memory, and control layer (or "harness") from the underlying AI models. By retaining metadata from every AI interaction, businesses can preserve their operational "brain" or institutional knowledge. This allows them to flexibly use different AI models (e.g., from OpenAI, Anthropic, Microsoft) for specific tasks without losing their accumulated expertise. The core idea: companies can rent the smartest models available, but they must keep their own "brain" and operational control firmly in-house.

marsbit41m ago

Microsoft CEO Satya Nadella's Latest Warning: Betting Entirely on a Single AI Model Hands Over a Company's Lifeblood

marsbit41m ago

Miners Advised Not to Buy GPUs for AI and to Focus on Infrastructure

A founder at an energy investment forum advises bitcoin miners not to purchase GPUs for AI themselves, but to instead focus on infrastructure like power and data center space. Mike Alfred of Alpine Fox stated that while AI infrastructure demand is a long-term, 20-30 year trend, it presents a key choice for miners. The first, riskier model involves owning and operating GPUs, which requires financing expensive hardware that quickly becomes obsolete. The second, more conservative model is akin to real estate: providing colocation services where clients bring their own servers, and the miner sells space, power, cooling, and water. Alfred noted this model is easier to finance. Most existing bitcoin mining sites are difficult and expensive to convert for AI, as AI data centers require far higher construction costs, redundant fiber connections, backup power, complex cooling, and near 100% uptime. A hybrid model, where mining acts as a flexible load to use excess power during AI data center construction or from generation facilities, was discussed. However, participants concluded this is only viable with very cheap power; otherwise, developers are better off focusing solely on AI. Miners are increasingly being evaluated for their available power capacity and project portfolios rather than just bitcoin output. Panelists also warned of risks in the AI sector, predicting at least one major default or contract breach among AI tenants, lenders, or landlords before bitcoin's next halving in 2028.

cryptonews.ru50m ago

Miners Advised Not to Buy GPUs for AI and to Focus on Infrastructure

cryptonews.ru50m ago

Millisecond 'Pay-to-Cut': How Did Hyperliquid's Priority Fee Turn into a Multi-Million Dollar Business?

"Millisecond 'Paid Queue-Jumping': How Hyperliquid's Priority Fee Became a Multi-Million Dollar Annual Business" In traditional finance, high-frequency trading firms spend millions on infrastructure for millisecond advantages. Hyperliquid has translated this race onto the blockchain with its "Priority Fee" system, creating an open economic game for speed. This system auctions two types of priority: **Gossip Priority** for faster data feeds (via a Dutch auction every 3 minutes), and **Order Priority** for front-of-queue trade execution (users bid a fee for lower latency). This converts a hardware race into a transparent, market-priced mechanism. Since launch, this feature has generated over $5M in protocol revenue. Projected annualized buybacks from this income exceed $30M, accounting for ~7% of total protocol revenue. The demand stems from large traders and market makers on Hyperliquid, for whom milliseconds can mean the difference between profit/loss or avoiding liquidation. Market makers pay these fees as "protection" to ensure their orders execute first, which in turn improves liquidity for all users. Crucially, Hyperliquid internalizes Maximum Extractable Value (MEV) that typically leaks to external validators or searchers, creating a new revenue stream beyond trading fees. The mechanism also strengthens HYPE's tokenomics. While 97% of trading fees fund secondary market buybacks (via the Assistance Fund), Priority Fees are **directly burned**, adding a second deflationary engine. Furthermore, fees for order priority are deducted from users' undelegated HYPE balances, encouraging large traders to hold and lock up tokens, reducing circulating supply. However, a key challenge remains: balancing the speed needs of institutional players with fair market access for retail users, as those who cannot pay high fees may suffer worse slippage during volatility. In summary, Hyperliquid's Priority Fee is a novel model that monetizes latency, captures MEV for the protocol, and enhances its native token's value through burning and lock-ups.

marsbit55m ago

Millisecond 'Pay-to-Cut': How Did Hyperliquid's Priority Fee Turn into a Multi-Million Dollar Business?

marsbit55m ago

Trading

Spot

Hot Articles

How to Buy LINK

Welcome to HTX.com! We've made purchasing ChainLink (LINK) simple and convenient. Follow our step-by-step guide to embark on your crypto journey.Step 1: Create Your HTX AccountUse your email or phone number to sign up for a free account on HTX. Experience a hassle-free registration journey and unlock all features.Get My AccountStep 2: Go to Buy Crypto and Choose Your Payment MethodCredit/Debit Card: Use your Visa or Mastercard to buy ChainLink (LINK) instantly.Balance: Use funds from your HTX account balance to trade seamlessly.Third Parties: We've added popular payment methods such as Google Pay and Apple Pay to enhance convenience.P2P: Trade directly with other users on HTX.Over-the-Counter (OTC): We offer tailor-made services and competitive exchange rates for traders.Step 3: Store Your ChainLink (LINK)After purchasing your ChainLink (LINK), store it in your HTX account. Alternatively, you can send it elsewhere via blockchain transfer or use it to trade other cryptocurrencies.Step 4: Trade ChainLink (LINK)Easily trade ChainLink (LINK) on HTX's spot market. Simply access your account, select your trading pair, execute your trades, and monitor in real-time. We offer a user-friendly experience for both beginners and seasoned traders.

9.7k Total ViewsPublished 2024.03.29Updated 2026.06.02

How to Buy LINK

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of LINK (LINK) are presented below.

活动图片