What Is Chainlink - The Leading Decentralized Oracle Solution


Glenn BONΞZ Bona
In this guide, we uncover what is Chainlink, its uses cases, and how it's powering DeFi apps like Matrixswap.

Chainlink is a decentralized network of oracles that bridges the gap between off-chain and on-chain environments. An oracle is an entity that serves as both an interpreter and a gateway — it receives requests, retrieves, validates information from the outside world, and converts it into a language that blockchain-based smart contracts can understand.

Before going in-depth into explaining Chainlink and its importance to the blockchain ecosystem, it's essential to understand some basic concepts, such as the purpose oracles serve in crypto and the data manipulation problem. In the following sections, we'll be discussing these terms and how Chainlink comes into play. 

What Is a Blockchain Oracle?

A blockchain oracle is a mechanism or entity that connects smart contracts to external systems and real-world data. A blockchain oracle can be any interface (software, hardware, human, and so on) that bridges the 'real world' to the blockchain and retrieves necessary information so that smart contracts can execute their functions.

Blockchains are independent, decentralized systems where Web3 participants are owners of their data and financial assets. Most of Web2 consists of user data and real-world information locked away in centralized servers, opening up these databases to forms of manipulation by the entity that has access to the data, and increasing the risk of data loss. However, Web3 promises more access, transparency, and user ownership thanks to public blockchains' inherently decentralized and trust-minimized nature.

However, the design principles of blockchain technology limit the ability of smart contracts to access off-chain data and external computation on their own, creating what is known as the blockchain oracle problem. As such, to reach their full potential, smart contracts need a way to pull external data from or push data to other systems. This is where a piece of infrastructure known as the blockchain oracle comes in — oracles connect blockchains with off-chain data and computation. 

But while blockchain oracles help bridge the gap between off-chain and on-chain environments, data quality must be considered, or smart contracts may be falsely executed based upon faulty data, resulting in the data manipulation problem.

What Is the Data Manipulation Problem?

The data manipulation problem is the exposure of smart contracts to data tampering, inaccuracy, and incorrect information due to using a centralized, unavailable, or otherwise unreliable oracle as a gateway to the off-chain world. The inconsistent source of data leads to the inability of a smart contract to execute its critical functions with a similar degree of determinism as the underlying blockchain. 

The data manipulation problem comes in two parts:

  1. Exposure of the smart contract to a single point of failure due to a centralized oracle node being used for information retrieval.
  2. The inability of an insecure oracle to correctly validate data from the real world.

One characteristic of a blockchain is trust-minimization, i.e., the inability of an individual participant or institution to undermine the underlying rules of the system. However, centralized or insecure blockchain oracles hinder this property of blockchains as they allow an individual participant or institution to control the data inputs fed into the blockchain, which exposes the system to oracle manipulation attacks.

Although nothing has changed about the trustlessness of blockchain technology, the problem here is with the "correctness" of the data and information received by the blockchain. So what's the point of a trustless blockchain-based smart contract that uses an unreliable source of external data? 

Apart from the problem of an untrustworthy source of data, centralization in the oracle layer can also expose the smart contract to a single point of failure. If any part of the system fails, the entire contract may be exposed to tampering from malicious actors.

A unique characteristic of blockchain technology is its ability to validate and verify transactions in a decentralized manner through a consensus mechanism, i.e., a decentralized network of nodes being able to achieve agreement over the state of the network.

However, this isn't the case with centralized oracles. Centralized blockchain oracles don't require multiple nodes to reach a consensus. That leads to the inability of the middleware to securely validate and verify the information received from the real world. So there is no way to know if the data sent is correct or not.

As you can see, the data manipulation is a big issue in the blockchain industry. The good news is that Chainlink—the leading decentralized oracle network—has worked out a solution to this problem.

How Does Chainlink Solve the Data Manipulation Problem?

As discussed in the introduction, Chainlink is a decentralized oracle network that connects blockchains to off-chain data and computation services. The Chainlink Network allows off-chain data and computation to interact with smart contracts running on leading blockchains to help create feature-rich decentralized applications on any blockchain, thus advancing the growth of the multi-chain Web3 ecosystem.

As a decentralized network, Chainlink uses a distributed pool of Sybil-resistant and hyper-reliable oracles run by leading enterprises, data providers, and DevOps teams that allow smart contracts to transfer information and computation between blockchains and external systems, including between two different blockchains, in a highly reliable and secure manner. Chainlink decentralized oracle networks leverage similar security techniques as the consensus mechanisms that power blockchain technology and decentralization, requiring multiple independent nodes to validate an oracle report before submitting it on-chain. Furthermore, Chainlink oracle networks leverage a robust reputation system that considers data quality, historical reliability, average response time, and many more factors.

Therefore, Chainlink decentralized oracle networks overcome the data manipulation problem by leveraging similar approaches as blockchains like Ethereum (ETH), but applied to the oracle layer.

The Architecture of Chainlink Oracle Networks

The introduction of Off-Chain Reporting (OCR) into production reduced operating costs of oracle updates by up to 90%, improving the scalability of Chainlink's decentralized oracle networks as a result. This led to a 10x increase in the amount of real-world data that can be made available to decentralized applications (dApps). In turn, this will generate a massive growth in on-chain data.

With Chainlink, there are two different ways data can be queried from oracles: 

Chainlink's flexibility is an essential factor too. This allows users to connect to existing decentralized oracle networks like Price Feeds and Keepers, thus providing an easy way to use oracle services. Alternatively, users can construct their own customized oracle networks consisting of any nodes, data sources, security methods, update frequencies, etc., to meet their exact needs. 

Within Chainlink Data Feeds, the reference contract retrieves the data from independent oracle nodes and stores it on-chain, making it available for consuming contracts to query for data at any point in time. To ensure that the data provided by Chainlink oracles is accurate, data needs to pass through three levels of data aggregation stages. These are:

Data source aggregation is when data providers aggregate information themselves from multiple sources. Data aggregators like CoinGecko (CG) or BraveNewCoin (BNC) aggregate their data from multiple sources, all CEX/DEXs, before making the volume-weighted data available through their API. Chainlink Price Feeds pull data exclusively from premium data aggregators, ensuring a high degree of tamper resistance, reliability, and market coverage. This makes the feeds more secure against, for instance, flash loan attacks.

With node aggregation, Chainlink nodes pull data from multiple independent data providers and take the median. For instance, when a node fetches data from CG, BNC, and CoinMarketCap (CMC). The node will consequently take the median, mitigating API downtime.

Oracle network aggregation is when oracle nodes aggregate their data together off-chain and generate a single oracle report of each node’s observation and signature. Subsequently, it is delivered on-chain to the reference contract, where users can fetch the median value. This ensures high network uptime and resistance to manipulation in the delivery of data on-chain.

Why Did We Choose Chainlink for MatrixSwap?

As a decentralized virtual-AMM-based perpetual swap trading protocol, MatrixSwap needs highly reliable cryptocurrency price reference data for our smart contracts to carry out the necessary functions for our users. 

We chose Chainlink Price Feeds because it is the leading oracle solution in the smart contract ecosystem, already securing tens of billions of dollars of value across DeFi. But here are some specific reasons why we've integrated them:

  1. High-Quality Data — Chainlink Price Feeds source data from numerous premium data aggregators, leading to price data aggregated from hundreds of exchanges, weighted by volume, and cleaned from outliers and suspicious volumes. Chainlink's data aggregation model generates more accurate global market prices resistant to API downtime, flash crash outliers, and data manipulation attacks like flash loans.
  2. Secure Node Operators — Chainlink Price Feeds are secured by independent, security-reviewed, and Sybil-resistant oracle nodes run by leading blockchain DevOps teams, data providers, and traditional enterprises with a strong track record reliability, even during high gas prices and extreme network congestion. 
  3. Transparency — Chainlink provides a robust reputation framework and set of on-chain monitoring tools that allow users to independently verify the historical performance of node operators and oracle networks and check the real-time prices being offered.


In conclusion, our integration with Chainlink will mean we have best-in-class off-chain data for our users, and we couldn't be more excited to work with such a world-class team. Aside from solving the data manipulation problem, Chainlink helps expand the use cases of blockchain technology and accelerates the growth of the decentralized finance (DeFi) ecosystem. 

About Chainlink

Chainlink is the industry standard for building, accessing, and selling oracle services needed to power hybrid smart contracts on any blockchain. Chainlink oracle networks provide smart contracts to ensure connectivity with any external API to leverage secure off-chain computations for enabling feature-rich apps. Chainlink currently secures tens of billions of dollars across DeFi, insurance, gaming, and other major industries and offers global enterprises and leading data providers a universal gateway to all blockchains.

Learn more about Chainlink by visiting chain.link or read their whitepaper documentation at docs.chain.link. To discuss an integration, reach out to an expert.

Share this post
Twitter icon
More To Explore


Glenn BONΞZ Bona
Stop-Limit Order: What It Is and How to Use It
In this guide, we dive into the stop-limit order and how you can successfully use it in your crypto trading strategy.


Glenn BONΞZ Bona
What is Liquidity Mining in DeFi and How Does It Work?
In this guide, we go over liquidity mining and why their important for Decentralized Exchanges (DEXs). We also share Matrixswap's current liquidity pool on DFyn.

Crypto Basics

Glenn BONΞZ Bona
What is Polkadot (DOT) and Why Launch on Moonbeam?
In this guide, we go over what is Polkadot (DOT), how does it compare with other blockchains like Ethereum and why Matrixswap is launching on Moonbeam.
Copyright ©2021 Matrixswap. All rights reserved.