Price Oracle

Оракул цен предоставляет внешние рыночные данные смарт-контрактам, позволяя им реагировать на изменения цен в реальном мире.

Оракулы цен являются важными компонентами децентрализованных финансовых (DeFi) приложений. Они соединяют разрыв между ончейн смарт-контрактами и офчейн источниками данных, такими как централизованные биржи (CEX) и децентрализованные биржи (DEX). Это позволяет смарт-контрактам получать доступ к потокам цен в реальном времени для различных активов, запуская действия на основе рыночных условий. Без оракулов смарт-контракты были бы изолированы и не смогли бы взаимодействовать с внешними данными, что серьезно ограничивает их функциональность. Оракулы также могут предоставлять другие данные, такие как процентные ставки или данные о погоде, но потоки цен являются наиболее распространенным вариантом использования в DeFi.

        graph LR
  Center["Price Oracle"]:::main
  Pre_economics["economics"]:::pre --> Center
  click Pre_economics "/terms/economics"
  Rel_oracles["oracles"]:::related -.-> Center
  click Rel_oracles "/terms/oracles"
  Rel_smart_contracts["smart-contracts"]:::related -.-> Center
  click Rel_smart_contracts "/terms/smart-contracts"
  Rel_chainlink["chainlink"]:::related -.-> Center
  click Rel_chainlink "/terms/chainlink"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧠 Проверка знаний

1 / 3

🧒 Простыми словами

Imagine a [smart contract](/ru/terms/smart-contract) is like a robot that can only follow instructions inside its factory. A price [oracle](/ru/terms/oracle) is like a trusted messenger who goes outside, checks the price of something, and tells the robot the correct price so it can do its job.

🤓 Expert Deep Dive

Price oracles are essential for enabling complex smart contract functionalities such as derivatives trading, lending protocols, stablecoins, and synthetic assets. The security and reliability of a price oracle directly impact the security of the dependent DeFi protocols. Architecturally, DONs often use a Time-Weighted Average Price (TWAP) or Volume-Weighted Average Price (VWAP) calculation across multiple sources to mitigate the impact of single-source manipulation or temporary exchange volatility. Cryptoeconomic incentives, such as staking and slashing mechanisms for oracle node operators, are employed to ensure honest data reporting. Edge cases include handling exchange downtime, API rate limits, and the 'oracle problem' itself – the inherent difficulty in obtaining truly decentralized and manipulation-resistant external data. Advanced oracle designs incorporate threshold signatures, verifiable random functions (VRFs), and cross-chain data feeds to enhance security and utility.

🔗 Связанные термины

Предварительные знания:

📚 Источники