I am here to break down the Chainlink Whitepaper 1.0 since this describes the birth of Chainlink. A breakdown of their Whitepaper 2.0 I will also go over since that has new additions to their network. I hope this post will serve as a guide on how to pick apart the most important details of a crypto project and simplify it for anyone to understand. This is not investment advice to buy or sell Chainlink. Nothing on this post or substack is financial advice since I am not a financial adviser. This is purely for entertainment purposes only. Just a Titan with an overly active mind.
Broad Summary of what Chainlink does
From the abstract we are told that Chainlink is a decentralized oracle network or a DON. A DON allows for information from the world outside of blockchains to be sent to the blockchain in a decentralized way. This is necessary because blockchains by themselves can not connect to information from the outside world. This sending and receiving of information has to be done in a decentralized way because a centralized oracle gives a single entity control of the flow of information. It also gives attackers a single target to attack so any application that relies on outside information would stop working immediately. The abstract and introduction are simple for anyone to understand what Chainlink is trying to accomplish. However you shouldn’t just go off of a broad summary on projects, you should be looking at the fundamentals that make it up as well. Please read the entire whitepaper if you would like to see the fine details of how every little thing works.
In this ecosystem of oracles and users, the token LINK is used to pay node operators for retrieving data based on supply/demand. As more data is requested from off chain and more nodes join the CL network, the value of LINK grows.
Chainlink Architecture On the Blockchain
Chainlink functions in two environments, on the blockchain known as on chain and being off of it known as off chain. Chainlink node operators/oracle service providers are the people running computers to gather quality data and send to the blockchain. On chain CL works with 3 smart contracts which are the reputation contract, order-matching contract, and an aggregating contract. The reputation contract keeps records of oracle nodes’ performance like how much data they send to the blockchain and behavior like if they tamper with data or can send correct data with no issues. The order matching contract collects the data requests made by a smart contract/user then allows oracle nodes to bid on which ones they would like to complete. The order matching contract also sets specific requirements for oracles reputation in order to be considered for a data request and oracle node operators have to put in a penalty deposit if they cannot fulfill the data request. The aggregating contract then collects the newly arrived data from the oracle nodes and makes a calculation to find the final data point that will be put on chain. This contract as well collects data from oracles on performance and behavior from the data they acquired then sends it back to the reputation contract.
Chainlink Architecture Off the Blockchain
CL node operators off the blockchain function with three important items: Chainlink Core, External Adapters and Subtask Schemas. Chainlink Core is a open source software meaning anyone can look at the exact code running and suggest changes to the community. This software is responsible for connecting to many blockchains and breaking down data requests into smaller tasks to be done in am efficient way. External adapters are what connects CL nodes to outside data sources with the ability to read any programming language of data sources. Subtask Schemas are guides to CL nodes on what exactly an adapter needs to be compatible with other adapters they may connect to. This ensures stability and compatibility across the many different types of adapters being created by the community.
Arrows represent flow of requests from the blockchain and flow of data from the external API back to the blockchain. This is what CL does visually.
How Decentralization of Oracles is Maintained
The whitepaper proposes 2 ways of solving decentralization with distribution of data sources, and distribution of oracles.
Distribution of sources includes taking in multiple sources and finding the average of the data to use as the final data point to be sent to the blockchain. Other ways used to find accurate data are if majority of data sources produce identical data then the mismatched sources will be thrown out. As well as reporting how independent/uncorrelated the sources of data are from other sources of data.
Distribution of oracles is having many oracles working on gathering data to the same data request. To take all their different data points and put them into one point needed two improvements. In contract aggregation is having an oracle node find the average of the data points created by other oracle nodes to find the best possible final data point. This oracle creating the average of the data points has its code completely visible on the blockchain to inspect if it is doing its job correctly. Off chain aggregation is the medium/long term solution because its the cheaper solution compared to having oracle nodes sending data to another oracle on the blockchain. Off chain aggregation allows for oracles to create their responses outside the blockchain then putting their final data points on the blockchain at the end. This makes oracles highly scalable since now the cost of creating final data points is mostly gone since the blockchain isn’t involved until the end.
What distribution of oracles and data sources look like at the same time.
Oracle Security
Oracles have to be secure because if they put false data on the blockchain, any smart contracts that operate in decentralized applications will not be able to function correctly. This leads to a worst experience for users. Oracles can do their job perfectly of getting data but if the data is false then it is still not secure enough.
CL proposes 4 security services that will also help in making sure there are the lowest possible amount of faulty nodes. Theses services are a validation system, a reputation system, a certification service, and a contract-upgrade service. The validation system records failures of oracles on the blockchain if they don’t respond to requests in time and recording incorrect responses if their data is wildly different than other oracles. These two types of records will be on the blockchain for anyone to see which includes records of off chain and on chain behavior of nodes. The reputation system allows for users to publish rating of oracle nodes onchain. Offchain records of number of assigned, completed, accepted requests and penalty payments. Having these records rewards the best performing oracles to do better as they make more revenue while worst performing are hit with penalties punish their behavior. The certification service was made to prevent massive attacks on the entire CL network of nodes. It does this by making endorsements of the highest quality oracle nodes based on data from the validation system and comparing data points on chain directly to well trusted data sources. This would prevent attackers from controlling a huge amount of nodes to give false data which is a type of an attack that threatens the whole CL ecosystem. The final security service offered is the contract upgrade service. This service was made to create new smart contracts for oracles if current contracts get attacked/buggy. The service as well is completely optional as users have the option of turning this service on because by default it is turned off.
The Long Term Strategy for Chainlink’s Future
Oracle confidentiality, infrastructure changes, and off-chain computation are the 3 ways CL is focused on the long term.
Confidentiality is a problem for oracles requests and responses to data because the whole transaction is visible on the blockchain. Any sensitive information that the user doesn’t want others to see will be clear to all. To create products and services for the betterment of humanity, certain data has to be private from all to see such as medical history, insurance information, payment details, and addresses of homes. A trusted hardware called Software Guard eXtensions (SGX) creates something called an enclave where the data and code operate by themselves. The whole transaction in the enclave is confidential and is very effective against attacks.
An infrastructure change that CL hopes to add is something called TLS-N. This protocol allows for HTTPS (A protocol that all websites follow in order to communicate securely) servers on the internet to sign parts of the sessions when users access them; such as when an oracle gathers data from a website. This is necessary because data sources do not sign their data normally. Signatures from data sources on the data they send can lockdown oracles from attacks even further since information has a clear place of where it came from.
The long term future for off chain computation is for the calculations that consume the most resources to happen off the blockchain in a secure way that smart contract can use. The result is better confidentially, lower costs to moving data around, and an infrastructure that can adapt to any situation.
Conclusion
Chainlink aims to be an extremely important infrastructure for the world of Defi and crypto in general. Life changing products and services that can’t even be thought of right now are more possible than before with the inclusion of data from our world into the blockchain. Without this data blockchains would be like computers running without Wi-Fi connected. This is not investment advice to buy or sell Chainlink. Nothing on this post or substack is financial advice since I am not a financial adviser. This is purely for entertainment purposes only. Just a Titan with an active mind.