Oracle Model

Umar Sharomi
Coinmonks
3 min readFeb 3, 2024

--

Data Aggregation

A lay man (Ignorant of the Blockchain Space) will continue to wonder how blockchain smart contracts could almost 100% know about real-world events.

Well, in the space of blockchain technology, where everything operates in a decentralized and trustless manner, the concept of oracles emerges as a lasting and fascinating solution to bridge the gap between the digital and physical worlds. It mainly serve as intermediaries, providing smart contracts with access to external data, enabling them to execute actions based on real-world events.

Let imagine we have a smart contract that triggers a buy order when a specific condition is met, such as the price of a cryptocurrency reaching a certain threshold (real event). How the smart contract obtain this information (price reaching a certain threshold) is where oracles come into play.

It (Oracle) comes in two different types; the Centralised Oracles which relies on a single, trusted entity to provide data to smart contracts. While it’s straightforward to implement, they introduce a single point of failure and potential for manipulation. In contrast, Decentralized Oracles source data from multiple independent providers and use consensus mechanisms to verify the accuracy of the data. This approach enhances security and reduces reliance on a single entity.

The intriguing question now is, how is data aggregated for smart contracts use.

When talking about data aggregation, it is a crucial aspect of the oracle model, as it involves combining multiple data points from various sources to provide accurate and reliable information to smart contracts and there are different methods from which data are been aggregated;

  • Medianizing, which involves calculating the median value from a set of data points. The median is the middle value when the data points are arranged in ascending or descending order. It is less sensitive to outliers compared to other aggregation methods like averaging. It robust against extreme data points, making it suitable for scenarios where outliers may skew the data. It is commonly used in financial markets to calculate reference prices or in voting systems to determine consensus. In decentralized oracle networks, this process is typically performed by oracle nodes, and a consensus mechanism ensures the integrity of the calculated median.
  • Averaging, involves calculating the mean value by summing all data points and dividing by the total number of data points. It provides a simple and intuitive way to aggregate data but can be sensitive to outliers. It is commonly used when all data points are considered equally important and there are no significant outliers. However, it may not be suitable for scenarios where extreme values can significantly skew the result. Most times, averaging is frequently used in calculating moving averages in financial analysis or in aggregating sensor data in IoT applications.
  • Weighted Averaging, on the latter assigns different weights to each data point based on their importance or reliability. Data points with higher weights contribute more to the calculated average. Weights can be assigned based on various factors such as data source reputation, confidence levels, or historical accuracy. For example, more reliable sources may be assigned higher weights in the aggregation process, and, it allows for greater flexibility and customization in data aggregation, ensuring that more reliable sources have a greater influence on the final result.

These methods of data aggregation provide oracle networks with the flexibility to handle diverse data sources and ensure the accuracy and reliability of information provided to smart contracts. Depending on the specific use case and requirements, oracle networks may employ one or a combination of these aggregation methods to meet the needs of decentralized applications.

--

--

Umar Sharomi
Coinmonks

Blockchain Researcher | Writer || Tokenomics Analyst || Foreign Exchange Trader Cryptoeconomic Models