Exploring Redstone Oracles — Data Aggregation and its role

Watchman Zēk
7 min readApr 28, 2024

In previous articles, we have explore Redstone oracle in divers ways which have been very insightful in understanding what redstone oracle entails.

Here are few of this articles you can explore :

However, Data is a very important role in daily applictions. Not just limited to only businesses, technolgy and Blockchain. But matters in all area. However, getting quality, accuracy and reliable data is important but thus is not enogh for making high decisions most especially for large datasets.
Having divers data and large dataset can be fustrating and bring a lot of indecisive conclusions.

This is where data Aggreagtion comes to play.

Data aggregation is the process whereby data from different sources are collect and combine to a single result or view. Data Aggregation deals with combining each data points into class and using functions such as average (most used), sum, count, etc. to generate a summarize view. This procees make it easy and more precise to analyze the data.

Compiling information from various sources to arrive at a good conclusion and insight helps to make more better decision. Moreso, there are different types of techniques that can be used to aggregate data, this also depends on the types of data thar been dealt with.

In previous months, many organization depends on data aggregation in their decision making processes. The question arise ? Why is it so important to blockchain

Blockchain deals with numerous amounts of data, from daily transaction, trading data, orderbook price, price feeds, data for decentralized finance such as lending protocols and so on. The most important benefit of Data Aggregation is that it decreases the complexity of data and makes it easier to interpret.

In reference to IQ Wiki on Redstone Oracle, As previously discussed, Aggregating methods can include Median Value, Volume weighted value or Liquidity weighted value. However, Redstone adopts the Median Value in particular. It utilizes the oracle node for off chsin data aggregation and signing it to a Distributed Data Layer ( DDL).

The Data Distribution Layer (DDL) which can be reffered as “decentralized cloud,” the oracle stores price feeds off-chain securely.

The question might arise — Why data aggregation ?

Quality of Data is very essential in a blockchain oracle. Basically, it depends on two criteria

  1. Data availability — This refers to the readiness of data for end users and regular updates in time.
  2. Data correctness — This can be termed as accuracy but can be describe in different ways which depens on the type of data and how verifiable is the data. This factor depends on the source of data and the type of data in particular.

Moreso, It can be more effective when combining aggreation methods to filter out outliers and market manipulations. This can work in major usecases in DeFi but understanding the risk behind selected methods is very important. Redstone oracle has sufficient provisions for data aggregation and preferred methods, ideal price value actually depends on the requested order.

Exploring Methods of Data Aggregation

1. Average price value

This entails taking the mean value of all price values. However, this can be inefficient in a case where prices are far deviated which can lead to lots of incorrect feeds. It is more effective when combined with others.

2. Median price value

This have lesser exposure to manipulation compared to the Average Price Value but still have divers shortcomings.

In a case where we have an exchange with $100M daily volume on a particular pair X/USD with price of X being $100 and other 4 exchanges with trading volume of less than $1M Volume has $90 as X price value. This means the aggregated median value will be less than $90 which is obviosly not the real market price. This can be ineffective in thisd case.

3. Volume-Weighted Average Price (VWAP)

The more trading volume a source has — the bigger the weight of its price value. This notes the different volume of trades from different sources. However, this is considered more effective.

Decentralized Exchanges (like Uniswap, Sushiswap, PancakeSwap, and others) has made it easy to calculate the Liquidity Volume Weighted Average.

4. Time-weighted Average Price (TWAP)

As its name implies, this method is defined by time criterion. This is especially useful for calculating price values based only on decentralized exchanges. Incase of limited amount of data sources this can cause Market manipulation. Nevertheless, Many Decentralized exchanges uses it.

Redstone recoomends this method for low liquidity assets to make it more stable and reliable.

Few Importance of Data Aggregation

It improves Data Quality and Consistency

Less Expensive and Resource optimization

Roles Of Data Aggregation In Blockchain Oracles

What Are Blockchain Oracles ?

Firstly, understanding what blockchain Oracle stands for is very essential. Blockchain oracles are systems or entities that connect blockchains to external systems which enables smart contracts to function or operates based on inputs and outputs from external systems or realworld data.

Blockchain Oracles helps to connect blockchains to acccess offchain data and compute which also enables interoperability between blockchains.

Why does protocols need off chain data to make onchain decisions ?

Take example of real estate property in real life. Each properties has prices but this aren’t on blockchain yet. However, real world aplications has databases and sources where each data are being updated and kept. To access this data, it is essential for Blockchain Oracle to acess this data and get it onchain. Not only that, this data updates on chain, prices flunctuates. Blockchin oracles creates this connections to have this feeds and data avalaible off chain.

Most importantly, An oracle gathers data depending on what information a developer wants to input.

Impact and Roles of Data Aggregation in Blockchain Oracles

The uniqueness of Data Aggregation comes in when this oracles collects data from different source to determine the main data output.

This oracles can rely on multiple node operators to query, validate, and transfer data. The decentralized structure of blockchain oracles helps ensure the off-chain or on-chain data is valid. Since every data point has to pass through so many validators, it reduces the odds of mistakes. This information is then relayed to the smart contract in a coded message. If the smart contract successfully reads this information, it should verify on the blockchain.

Aggregating data from various sources helps to verify accuracy of information before delivering it to smart contracts. In Summary, It has played a major role in Blockchain Oracles by :

  1. Enhancing Security and Accuracy of Data
  2. High Trust in Data and Information for price feeds
  3. Enable consensus and reduces the odds of mistakes
  4. Supports for high amount and complex data
  5. Increases Value of Correctness
  6. Improves the availability of data

However, Data aggregation is playing a better role in blockchain Oracles and this can not be over emphasized enough.

This mark the end of this article. I hope you find this informative and helpful.

References

https://blog.redstone.finance/2022/08/17/what-you-must-know-about-data-agregation-and-its-role-in-blockchain-oracles/

https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.crestproperty.net.au%2F2019%2F03%2Fmedian-property-prices%2F&psig=AOvVaw02NR0hKgjL2qwsKuFDeRC5&ust=1715079264218000&source=images&cd=vfe&opi=89978449&ved=0CBIQjRxqFwoTCKjE7aXu-IUDFQAAAAAdAAAAABAV

--

--

Watchman Zēk

Tech Expert, Defi Analyst, Blockchain Researcher and Data Analyst