waves_logo Docs
  • Why Waves
    Why Waves
  • Waves Basics
    Waves Basics
  • Account
    • Creating Account
      Creating Account
    • Address
      Address
    • Account Balance
      Account Balance
    • Account Data Storage
      Account Data Storage
    • Alias
      Alias
    • dApp and Smart Account
      dApp and Smart Account
    Account
  • Token (Asset)
    • Non-Fungible Token
      Non-Fungible Token
    • Smart Asset
      Smart Asset
    • Token ID
      Token ID
    • WAVES
      WAVES
    Token (Asset)
  • Transaction
    • Transaction Fee
      • Sponsored Fee
        Sponsored Fee
      Transaction Fee
    • Signature and Proofs
      Signature and Proofs
    • Transaction Types
      • Burn Transaction
        Burn Transaction
      • Create Alias Transaction
        Create Alias Transaction
      • Data Transaction
        Data Transaction
      • Exchange Transaction
        • Order
          Order
        Exchange Transaction
      • Genesis Transaction
        Genesis Transaction
      • Invoke Script Transaction
        Invoke Script Transaction
      • Issue Transaction
        Issue Transaction
      • Lease Cancel Transaction
        Lease Cancel Transaction
      • Lease Transaction
        Lease Transaction
      • Mass Transfer Transaction
        Mass Transfer Transaction
      • Reissue Transaction
        Reissue Transaction
      • Set Asset Script Transaction
        Set Asset Script Transaction
      • Set Script Transaction
        Set Script Transaction
      • Sponsor Fee Transaction
        Sponsor Fee Transaction
      • Transfer Transaction
        Transfer Transaction
      • Update Asset Info Transaction
        Update Asset Info Transaction
      • Ethereum-like Transaction
        Ethereum-like Transaction
      Transaction Types
    • Transaction Validation
      Transaction Validation
    Transaction
  • Block
    • Transactions Root Hash
      Transactions Root Hash
    • Genesis Block
      Genesis Block
    Block
  • Node
    • Leasing
      Leasing
    • Generator’s Income
      Generator’s Income
    • Monetary Policy
      Monetary Policy
    Node
  • Mainnet, Testnet, Stagenet
    Mainnet, Testnet, Stagenet
  • Unit Zero
    Unit Zero
  • Oracle
    Oracle
  • Protocols & Data formats
    • Cryptographic Practical Details
      Cryptographic Practical Details
    • Leased Proof of Stake
      Leased Proof of Stake
    • Waves-NG Solution
      Waves-NG Solution
    • Waves-NG Protocol
      Waves-NG Protocol
    • Waves 1.5
      Waves 1.5
    • Blockchain Data Types
      Blockchain Data Types
    • Binary Format
      • Address Binary Format
        Address Binary Format
      • Alias Binary Format
        Alias Binary Format
      • Block Binary Format
        Block Binary Format
      • Network Message Binary Format
        • Block Message Binary Format
          Block Message Binary Format
        • Checkpoint Message Binary Format
          Checkpoint Message Binary Format
        • Get Block Message Binary Format
          Get Block Message Binary Format
        • Get Peers Message Binary Format
          Get Peers Message Binary Format
        • Get Signatures Message Binary Format
          Get Signatures Message Binary Format
        • Handshake Message Binary Format
          Handshake Message Binary Format
        • Peers Message Binary Format
          Peers Message Binary Format
        • Score Message Binary Format
          Score Message Binary Format
        • Signatures Message Binary Format
          Signatures Message Binary Format
        • Transaction Message Message Binary Format
          Transaction Message Message Binary Format
        Network Message Binary Format
      • Order Binary Format
        Order Binary Format
      • Transaction Binary Format
        • Burn Transaction Binary Format
          Burn Transaction Binary Format
        • Create Alias Transaction Binary Format
          Create Alias Transaction Binary Format
        • Data Transaction Binary Format
          Data Transaction Binary Format
        • Exchange Transaction Binary Format
          Exchange Transaction Binary Format
        • Genesis Transaction Binary Format
          Genesis Transaction Binary Format
        • Invoke Script Transaction Binary Format
          Invoke Script Transaction Binary Format
        • Issue Transaction Binary Format
          Issue Transaction Binary Format
        • Lease Cancel Transaction Binary Format
          Lease Cancel Transaction Binary Format
        • Lease Transaction Binary Format
          Lease Transaction Binary Format
        • Mass Transfer Transaction Binary Format
          Mass Transfer Transaction Binary Format
        • Reissue Transaction Binary Format
          Reissue Transaction Binary Format
        • Set Asset Script Transaction Binary Format
          Set Asset Script Transaction Binary Format
        • Set Script Transaction Binary Format
          Set Script Transaction Binary Format
        • Sponsor Fee Transaction Binary Format
          Sponsor Fee Transaction Binary Format
        • Transfer Transaction Binary Format
          Transfer Transaction Binary Format
        • Update Asset Info Transaction Binary Format
          Update Asset Info Transaction Binary Format
        • Ethereum-like Transaction Binary Format
          Ethereum-like Transaction Binary Format
        Transaction Binary Format
      • Transaction Proof Binary Format
        Transaction Proof Binary Format
      Binary Format
    • Validation Rules
      Validation Rules
    Protocols & Data formats
  • Glossary
    Glossary
      • English
      • Русский
      On this page
        • Sources of the outside world
        • Oracles issue
        • Consensus of oracles
      waves_logo Docs

          # Oracle

          Oracle is a data provider from the outside world on the blockchain.

          # Sources of the outside world

          Software oracles handle data accessible on the web. For example, the temperature, costs of products and merchandise, flight or train delays, etc. The information originates from online sources, e.g. API. The product prophet extricates the required data and pushes it into the blockchain.

          Hardware oracles track real-world objects with devices and sensors. For example, a video camera with an analytics function virtual line crossing tracks vehicles entering a specific zone. If an event is detected, the oracle writes about it on the blockchain. Based on the data of such oracle, some script of decentralized application on the blockchain may be triggered. In this case, for example, a fine and the write-off of tokens from the account of the vehicle owner. But it is not in oracle scope, is in the scope of the script that is based on the data of such an oracle.

          Human oracles imply that the data is entered by a human being.

          # Oracles issue

          The oracle is a way of connecting the blockchain with the outside world.

          The major problem that is solved by the usage of oracles is the very point that blockchains can only access data that is stored on the blockchain. Here, in blockchain, the point is that it is important that decentralized applications can only access data that is stored on the blockchain so that every execution of the script leads to the same result at a given point in time. Therefore, decentralized applications are not able to access data from outside the blockchain, e.g., provided by web services or other external sources of data.

          Nevertheless, much interesting application needs access to the outside world, e.g., decentralized application for insurances, decentralized betting systems, financial services and so forth.

          Here, the solution is quite straightforward: if external data is necessary for the execution of a decentralized application, this data needs to be stored on the blockchain. To achieve this, there are usually small programs implemented that access the necessary data and write it to the blockchain. Those little programs are called oracles.

          # Consensus of oracles

          One source may be unsafe if it does not have the authority or high rating. However, several oracles can be used to stay away from the monopoly and have safer. For example, get information from ten oracles and only if the data of 6 out of 10 oracles coincide, to accept them. This is the consensus of the oracles.

          Unit Zero
          Protocols & Data formats
          Unit Zero
          Protocols & Data formats