Introduction to Oracles and Data

In these threads, we attempt to provide an overview of what this category is and some information about the current state of blockchain oracles and data infrastructure for smart contracts. These posts are living documents and it is our hope that the community will continue to contribute to this definition.

What is a blockchain oracle?

Due to their inherent security and reliability properties, blockchains are isolated networks with no built-in functionality to pull in data from or push data to external systems. This limitation is known as the “oracle problem” and requires the usage of an external entity known as an oracle.

A blockchain oracle is any entity that facilitates a connection between the blockchain and the outside world, whether that be broadcasting external data on-chain or pushing commands from the blockchain to an external system. Oracles differ across a variety of metrics, such as the number of participants involved (centralization vs. decentralization), method of transmission (hardware, software, human), architecture design (on-chain vs. off-chain components), and various other aspects.

In general, oracles take on several key processes:

  • Listen for incoming user or smart contract requests for oracle services
  • Fetch data from one or multiple external systems
  • Format the data so it can be read by the intended recipient
  • Validate the data via a signed attestation of its origin and/or the computation performed
  • Perform computation on the data before delivering it to its destination, particularly when incorporating multiple nodes and/or oracles (e.g. a median aggregation)
  • Broadcast the data onto the recipient’s system or network

Through this set of oracle functions, smart contracts are able consume external inputs and generate external outputs with a variety of systems in the real world, such as data providers, web APIs, enterprise backends, cloud providers, IoT devices, e-signatures, payment systems, other blockchains, and more.

What are the key use cases of blockchain oracles?

Blockchain oracles are a key piece of infrastructure in the smart contract stack and are being utilized to provide a wide range of off-chain data and computation services. With the Decentralized Finance (DeFi) ecosystem being one of the first large smart contract markets to take hold and secure a substantial amount of value (currently $12B and growing), the initial application of oracles has been to provide real-time price feeds for DeFi protocols to perform specific actions (like liquidation or contract settlement) when the market-wide price of an asset reaches a specific threshold.

While price feeds are the most popular use case of oracles today, we are seeing the rise of other wide-ranging oracle applications that provide additional value additive off-chain services that increase the security of smart contracts, as well as enable new categories of applications altogether. In addition to secure price feeds, oracles are also able to:

  • Fetch data from any open and/or authenticated web API,
  • Deliver outputs to external systems like a traditional fiat payment gateway,
  • Compute a provably fair source of RNG using a verifiable randomness function,
  • Fairly order blockchain transactions to prevent miner extractable value,
  • Generate privacy for on-chain contracts and off-chain date,
  • Verify data is from a specific HTTPS/TLS web session via zero knowledge proofs,
  • Operate and validate layer-2 networks like rollups and sidechains,
  • Perform any arbitrary computation on datasets and deliver results on-chain,
  • Provide any off-chain services required by smart contract applications.

To provide these use cases, different oracle protocols have taken different approaches with different architectures and functionalities. Key differences in the implementation of oracles include operating on their own blockchain vs. oracles built on top of blockchain, monolithic oracle networks vs. heterogeneous oracle network architecture, single vs. shared cost models, and application-specific vs. generalized oracles.

8 Likes

The use cases described are technical, what about actual applications?

My favorite relates to land use and ag. Consider parametric insurance, policy that pays out to farmer if temp exceeds X for more than Y days. Theres also applications to forestry, watershed health, drought/flood resilience, and the value of a natural capital asset is tied to measured conditions. All this depends on the oracle having good and pertinent data which is one compelling reason for the dMRV effort, to make IRL datas accessible to smart contracts.

See shamba.network. Interestingly they started under label of oracle and have some relationship w/ Chainlink. Now more advertising dMRV services.

5 Likes