Waves Enterprise
Published in

Waves Enterprise

Waves Enterprise Launches Data Oracle Service on Mainnet

The data oracle service was launched on the Waves Enterprise main network, which will allow decentralized applications to become more flexible and deploy new functionality.

Smart contracts operating on blockchain networks have the ability to automate business processes in a decentralized, trusted environment. As a result, they have significant potential to increase efficiency and reduce transaction costs in various industries. Currently, smart contracts can implement complex business logic, but they still have a number of technological and conceptual limitations.

The growing need to access data that can be trusted from outside the blockchain network has led to the creation of data oracles.

A data oracle is a service that allows users to transfer data from third-party sources to the main network, as well as to hybrid sidechains. The need for a trusted third-party service arises due to the fact that smart contracts are usually isolated from the outside world for security purposes. Information requested from external sources may also differ, depending on providers and conditions. The presence of oracles that record reliable and up-to-date data on the blockchain for subsequent use by smart contracts significantly expands the range of scenarios for their application.

How does a data oracle work?

To make it easier to understand how the oracle service works, take a look at this scheme of a simple oracle below, built on the principle of a single data feed (with a single data source):

Description of data streams:

  1. Request for external data
  2. Checking the oracle service for new requests
  3. New unprocessed requests
  4. Accessing an external data source
  5. Getting external data
  6. Writing external data to the oracle contract
  7. Sending data to a contract with the business logic of the customer’s system

Of course, this oracle implementation has certain disadvantages due to the presence of only one data source, but this is enough to understand the concept. In addition, if we do not need weighted average data from multiple sources and we trust the single source, then using this model is justified.

This is the approach taken for the first oracle implemented on the Waves Enterprise mainnet with a single data source, namely Waves.Exchange — used for recording exchange rates for WEST/WAVES, WEST/BTC and WEST/USDN. Recording this data is a showcase for the service and will be used by the Client and third-party applications to create reports on the leasing program. This oracle has already successfully passed all the necessary tests and will operate on the main network.

Scalability of Waves Enterprise oracles

The Waves Enterprise oracle service enables working with multiple data sources. This approach is justified if you need to ensure the delivery of accurate data, as well as avoid the risk of providing false data from a source that is not trusted.

To understand the principles of operation, take a look at the following scheme:

Data flows and logic appear similar to the first scheme, but in this instance we have three data sources. For ease of understanding, let’s look at an example:

  • A supplier and a buyer agree to settle a contract in euros, calculating the US dollar-equivalent price on the day of delivery of the goods
  • The supplier has fulfilled their obligations and creates a transaction to close the contract
  • A smart contract is launched for all participants of the blockchain network and polls the API for the exchange rate quotation source, using the result to calculate the transaction amount (currency exchange rate * transaction amount):

-Data source 1: 0.931 * 100 = 930

-Data source 2: 0.931 * 100 = 931

-Data source 3: 0.93 * 100 = 930

Since consensus in this case requires the agreement of at least three participants, the transaction will be rejected.

Deterministic execution of the contract in a distributed system requires that the input data (exchange rates) should be identical. All participants who launch the smart contract must get the same result, otherwise the transaction will not be added to the blockchain, as the example shows.

Hybrid oracles

The Waves Enterprise data oracle service allows users to implement oracle clusters. We call this approach ‘hybrid’ because it allows users to collect data from multiple sources and compare them to ensure increased data reliability. Let’s look at the following diagram:

The hybrid model enables processing data arrays from heterogeneous sources, which leads to the possibility of implementing more complex business logic in Waves Enterprise smart contracts.

Creating such an oracle service is the next step in the development of the Waves Enterprise mainnet. Currently, the service enables writing information from fixed data sources to the blockchain. In the future, we plan to provide any developer of decentralized applications in the main Waves Enterprise network with the opportunity to use this service and configure data transfer for their application.

To do this, we need your feedback on which data sources would be useful for the service. We will take these suggestions into account when developing the next version of the oracle service. You can contact us in this chat or by email: west@wavesenterprise.com.

Follow us on social media

Join our Telegram channel



Enterprise-grade hybrid blockchain platform

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store