Data Agregation and its role in blockchain oracles — A didactic approach

Sangria
3 min readApr 27, 2024

--

Picture yourself deep in the heart of a virtual mine. As you navigate with your kart, you collect precious gems scattered across different tracks. Now, imagine each gem as a piece of data from various sources, these gems would represent a valuable source of information to blockchain oracles.

The Precious Gems of Data

In our mine kart adventure, each gem represents a data point — for blockchain applications, these points are price information about cryptocurrencies and tokens from different exchanges. Just like a skilled miner collects these gems for their value, data aggregators collect and combine these data points to create a comprehensive and reliable dataset for blockchain oracles.

Navigating the Mine Tracks: Aggregation Methods

Some collected gemstones may contain imperfections and cracks, so we must select the best criteria to maintain good quality to be sold. In data aggregation, there are different methods like mean, median, VWAP, and TWAP, each offering unique advantages and considerations.

  • Mean (Average): This is a very simple method that uses the average of the data obtained as output for the blockchain application. The problem with this method is the high influence of bad data in the result.
  • Median: This is like finding the more recurrent value in a set of gems. It’s more resilient to extreme values, ensuring a more balanced representation of the data.
  • VWAP (Volume-Weighted Average Price): Think of it as giving more weight to gems collected in mines that are reputed to have the best gems and are frequented by many deep miners and vein masters. It reflects the influence of active markets on the overall dataset.
  • TWAP (Time-Weighted Average Price): TWAP (Time-Weighted Average Price): This method assigns weights based on time, ideal for capturing price trends over specific periods. It’s like assigning an average value to gems based on their history.

Choosing the Best Path

Selecting the right aggregation method in blockchain oracles depends on the context. Considerations include data accuracy, source reliability, and the specific needs of the applications relying on oracle data. After all, every client has it’s own demands on how they want their gems. You can check Redstone’s approach here.

Conclusion

In the world of blockchain oracles, data aggregation is the miner’s tool that sifts through diverse data sources to extract valuable insights. Just as a skilled miner maximizes their haul by choosing the right paths and techniques, understanding data aggregation empowers blockchain developers to create robust and dependable oracle services for a wide range of applications.

--

--