What is a blockchain oracle?

A blockchain oracle is a service that delivers data from outside a blockchain to a smart contract. A smart contract cannot call a web API or read a bank system. For a tokenized fund, the oracle delivers the net asset value that the fund administrator calculates. The German term is Blockchain-Orakel.

Published . Last reviewed .

Blockchain oracles in brief

TermBlockchain oracle, also crypto oracle. Meaning of oracle in blockchain systems: a source of outside data. German: Blockchain-Orakel.
What it doesWrites outside data to a blockchain, where smart contracts read it.
Typical dataMarket prices, exchange rates, the net asset value of a fund, the reserves behind a token.
OperatorsOracle networks such as Chainlink, Pyth and RedStone.
EU lawArticle 3(1)(16) of Regulation (EU) 2023/1114 (MiCA) lists ten crypto-asset services. The delivery of data to smart contracts is not among them.
Known incidentMango Markets, : over USD 110 million withdrawn after a price feed was pushed up (CFTC, release 8647-23).

Why can a smart contract not read outside data?

A smart contract cannot read outside data because every node of the blockchain has to compute the same result from the same input. A web API can give two nodes two different answers, or no answer. Blockchains therefore allow no calls to outside systems.

The gap has a name: the blockchain oracle problem. Chainlink defines it as the limit that smart contracts "cannot natively interact with data and systems outside the blockchain on which they're deployed in a secure and reliable manner" (Chainlink, ). An oracle writes the data to the chain in a transaction, so every node reads the same value. That is the role of a blockchain oracle.

How do blockchain oracles work?

Blockchain oracles work in four steps. The nodes of an oracle network fetch a value from several data sources. They agree on one value, for example the median of all answers. They sign the value and write it to a contract on the blockchain. Other smart contracts read it from there.

In a network with several node operators and several sources, one failed or dishonest node does not change the reported value. A push oracle writes a new value on a schedule or when the price moves by a set percentage. A pull oracle delivers the value when a contract asks for it, which saves transaction fees on chains with many assets.

What types of oracles are there in blockchain systems?

Chainlink sorts blockchain oracles into three types by what they deliver (Chainlink, ).

TypeWhat it deliversExample in finance
Data oracleData between a blockchain and an outside system such as a bank system or a web APIThe EUR/USD rate for a lending contract
Cross-chain oracleData and tokens between two blockchainsA fund token that moves from one chain to another
Compute oracleThe result of a calculation that is too costly or too private to run on the chainA check of reserves against custodian records

How do oracles price tokenized funds?

An oracle prices a tokenized fund with the net asset value (NAV) of the fund. The fund administrator calculates the NAV, and the oracle writes the figure to the blockchain. A lending protocol that reads the figure can accept the fund token as collateral.

Securitize chose RedStone as oracle provider for three tokenized funds: BlackRock USD Institutional Digital Liquidity Fund (BUIDL), Apollo Diversified Credit Securitize Fund (ACRED) and Hamilton Lane's Senior Credit Opportunities Fund (The Block, ). The report names the lending protocols Compound, Morpho and Spark as users of the feeds. Fidelity International uses Chainlink to publish NAV data for tokenized funds (Chainlink, ).

What happens when an oracle is manipulated?

When an oracle reports a wrong price, every contract that reads it acts on the wrong price. A lending contract then pays out more than the collateral is worth.

Mango Markets is the case the US Commodity Futures Trading Commission took to court. On a trader bought large amounts of the token MNGO on the three exchanges that fed the oracle. The reported price rose more than 13-fold within 30 minutes. He borrowed against his inflated position and withdrew over USD 110 million. The CFTC filed its complaint on and called it its first case of a scheme "that is sometimes called 'oracle manipulation'" (CFTC, release 8647-23).

A risk manager who reviews a protocol asks two questions: how many sources feed the oracle, and how much money moves the price on those sources.

Blockchain oracles in Germany, Austria and Switzerland

No law in Germany, Austria or Switzerland licenses the operation of an oracle as such. In the EU, Article 3(1)(16) of MiCA lists the ten crypto-asset services that need an authorization, from custody to transfer services. The delivery of data to smart contracts is not on the list. BaFin supervises crypto-asset service providers in Germany, the FMA in Austria.

A bank or asset manager in the EU that uses an oracle buys a service from a third party. Regulation (EU) 2022/2554 (DORA) applies since . Its Article 3(21) defines ICT services as "digital and data services provided through ICT systems". Whether one oracle contract falls under DORA is a legal question for the single case. This page gives no legal advice.

Switzerland is outside the EU, so MiCA and DORA do not apply there. FINMA supervises banks and securities firms under Swiss law.

Sources

Let's stay in touch

4,000+ members in finance and tech. Become a Network Member for free.

Get updates for free!

Exclusive event invitations, member perks and news from the network. Unsubscribe at any time.

By submitting you agree to the terms.