æternity Documentation Hub
AeternityGitHub
  • æternity Hub
  • Developer Documentation
  • Welcome to æternity documentation
  • Getting Started
    • What is æternity?
    • How to Use Aeternity
  • æternity core concepts
    • Introduction
    • æternity Protocol
      • æternity Coin
      • Fast Æternity Transaction Engine (FATE VM)
      • æternity Nodes
        • Node architecture
        • Node types
        • Node Roles
      • Transactions
        • Types of transactions
        • Transaction Lifecycle
        • Transaction Fees
        • Meta-transactions and Generalized Accounts
        • State Channel Transactions
      • Networks
      • Consensus Mechanisms
        • Next Generation Nakamoto Consensus (Bitcoin-NG)
        • Cuckoo Cycle Proof of Work
        • Hyperchains and Delegated Proof of Stake
        • Governance and Weighted Coin Voting
      • State Channels
      • Oracles
      • Aeternity Naming System (AENS)
    • Hyperchains
      • Hyperchains Whitepaper
    • Aeternity Governance
    • Aeternity Foundation
  • aeternity user tools and services
    • Introduction
    • Run an æternity node
    • Hyperchains web app
    • Hyperchains Bridge app
    • Mine aeternity coin
    • Superhero DEX
    • Superhero Wallet
    • ærc Bridge
    • Make an NFT
    • aepps: decentralized applications on æternity
    • æScan: æternity blockchain explorer
  • æternity Developer tools
    • Quick Start Guide
      • Development Environment Setup
      • Essential Tools Overview
      • Æternity Stack
      • First Steps in Development
    • Protocol
      • Core Protocol Components
        • æternity Consensus Protocol
        • Generalized Accounts
        • Smart Contracts
          • FATE VM
          • Smart contract languages
            • æternity Sophia Language
              • In-Depth Overview
              • Sophia Compiler
              • Sophia Visual Studio
              • Sophia http
              • æREPL
            • Solidity
          • Contract Transactions
        • State Channels
        • Oracles
      • Network Layer
        • Nodes
          • Node Documentation
          • Node API Reference
        • Sync
        • Gossip
        • Stratum
      • Utility Features
        • æternity Naming System (AENS)
        • Seralization Formats
    • æternity Sophia Language
      • In-Depth Overview
      • Sophia Compiler
      • Sophia Visual Studio
      • Sophia http
      • æREPL
    • Development Infrastructure
      • CLIs
      • SDKs and APIs
        • Javascript/Typescript SDK
        • Java SDK
        • Outdated SDKs
        • APIs
          • Node API reference
      • Middleware
      • Testing and Deployment
        • æproject
        • Testnet
          • Localnet
          • Faucet
        • Testnets and Faucet
    • Token Standards
      • æternity token standards
        • AEXs: Aeternity Expansions
        • AEX-1
        • AEX-9
        • AEX-141
    • Aepps: Building apps on Aeternity
      • Boiler Plates
        • Angular Boiler Plate
        • React JS BoilerPlate
        • Vue BoilerPlate
      • Æpp architecture
      • Implementation Guidelines
      • Reference æpps
        • Case Studies
        • Code Examples
        • Aeternity Graffiti
    • Data and analytics
      • æScan
    • ÆRC Bridge
  • Hyperchains
    • Hyperchains Development Guide
    • Hyperchains Bridge
Powered by GitBook
On this page
  • Understanding Oracles
  • æternity's Oracle Implementation
  • Security and Reliability
  • Data Privacy and Cost Considerations
  • Practical Applications
  • Related Topics and Resources

Was this helpful?

Export as PDF
  1. æternity core concepts
  2. æternity Protocol

Oracles

PreviousState ChannelsNextAeternity Naming System (AENS)

Last updated 2 days ago

Was this helpful?

Oracles in æternity serve as trusted bridges between the blockchain and the outside world, enabling smart contracts to access external data. Unlike many blockchain platforms where oracles are implemented through complex smart contracts, æternity provides native protocol-level support for oracles, making them more efficient, cost-effective, and easier to use.

Understanding Oracles

Blockchains operate in closed systems, unable to directly access external information. An oracle solves this limitation by providing a mechanism to bring outside data onto the blockchain in a verifiable way. This could be anything from weather data and sports results to stock prices and supply chain information. What makes æternity's approach unique is that oracle functionality is built directly into the protocol rather than being implemented through smart contracts, leading to more efficient operation and reduced costs.

æternity's Oracle Implementation

In æternity, oracles are first-class citizens of the blockchain, implemented through specific transaction types rather than smart contracts. This native integration means that common oracle operations like registration, querying, and response handling are streamlined and cost-effective. When an oracle is registered on the chain, it specifies the format it expects for both queries and responses, along with the fee required for each query.

The process begins with an oracle operator registering their service through a register oracle transaction. Once registered, any user can query the oracle using a query oracle transaction that includes the appropriate fee. Oracle operators monitor the blockchain for relevant queries and post oracle response transactions with answers in the predefined format. This makes the data available on-chain and accessible to any smart contract.

Security and Reliability

æternity's oracle system includes several mechanisms to ensure reliability and prevent abuse. Oracle responses are permanently recorded on the blockchain, making them publicly verifiable and immutable. The system implements query TTL (Time To Live) parameters, which can be set as either absolute or relative key-block heights. This ensures that oracle queries receive timely responses and that users aren't charged for queries that go unanswered.

Oracles have specific lifetimes, defined in block height when they're registered. After this height, queries to the oracle no longer result in responses. However, oracle operators can extend their oracle's lifetime using an extend oracle transaction, providing flexibility while maintaining system integrity.

Data Privacy and Cost Considerations

When using oracles, it's important to understand that any data posted to the blockchain becomes public. While this transparency is often beneficial, it requires careful consideration when dealing with sensitive information. For instance, using an oracle to verify personal data might not be appropriate as the data would become permanently public once posted to the chain.

æternity's oracle system is designed with cost-effectiveness in mind. The fee structure is transparent and predictable, with oracle operators setting their query fees upfront. This allows users to make informed decisions about oracle usage based on their specific needs and budget constraints.

Practical Applications

Oracles in æternity enable a wide range of practical applications. Supply chain systems can use oracles to bring verified transaction data on-chain, decentralized insurance platforms can access real-world event data, and prediction markets can obtain reliable outcome information. The native implementation makes it particularly efficient for applications requiring frequent access to external data.

Smart contracts can use oracle responses as triggers for specific actions, creating automated systems that react to real-world events. For example, a smart contract might automatically execute payments based on weather conditions reported by an oracle, or adjust terms based on market prices provided through oracle data.

Related Topics and Resources

For developers interested in implementing oracles in their applications, comprehensive technical documentation and code examples are available in the Developer Tools section. This includes detailed information about oracle transactions, query formats, and best practices for oracle implementation. Users looking to interact with existing oracles can find practical guides in the User Guides section of this documentation.

Cover

Oracles Developer Documentation