Completing The God Protocols: A Comprehensive Overview of Chainlink in 2021
Tags: Blockchain, Cryptocurrency, Smart Contracts, Oracles, Chainlink

Bitcoin was the first implementation of a blockchain, which facilitates the exchange and tracks ownership of its own, newly created monetary asset, Bitcoin (BTC). The reason Bitcoin is seen as a reliable store of value is that there will only ever be 21 million Bitcoins in existence (with over 18M already circulating); a feature that is incredibly difficult to change or inflate given the network’s decentralized nature, especially in comparison to central bank-issued fiat currencies. Any users attempting to alter the 21M hard cap on the supply will find it extremely difficult to achieve social consensus, resulting in a fork from the main chain (e.g., similar in concept to Bitcoin Cash, which forked from Bitcoin; however, the reasoning was due to network scaling differences, not supply disagreements).

In addition to decentralization, miners have to spend a lot of money on application-specific hardware only useful for mining Bitcoin if they want to participate in consensus. Thus, in order to turn a profit, they are incentivized to uphold the value of the Bitcoin network by keeping it secure, as a secure network will help maintain the value of the cryptocurrency (BTC) they are exclusively paid in. However, blockchains can be used for far more than tracking and trading cryptocurrency, as Ethereum has thoroughly demonstrated.

Smart contracts: The Brain / Decentralized Applications

The second component to the God Protocols is being able to comprehend a wide range of logic (if x event happens, execute y action), meaning the blockchain is able to process a variety of instructions sent to it by users in the form of applications. As the first blockchain in existence, Bitcoin has a very narrow range of logic that it can process, namely moving BTC from one account to another on the Bitcoin blockchain upon certain conditions being met: 1) the sender signs the transaction with the correct private key and 2) the sender has enough BTC to cover the transaction. While Bitcoin has expanded slightly in the logic it can process to include multi-sig transactions (require multiple specific private key signatures before the transaction is considered valid) and Hash Time-Locked Contracts (transactions in time-bound escrow, used in payment channels like the Lightning Network), both of which can be considered some of the first “smart contracts,” it has largely remained static since.

An example of a 2-of-3 multi-signature wallet on the Bitcoin blockchain.

Though there were some minor advancements in between, the Ethereum blockchain generated the next major advancement in 2015 by launching support for programmable smart contracts. This basically transformed the function of a blockchain from serving as a single application into serving as a world computer able to simultaneously support many different applications at the same time. Ethereum made it much easier for developers to write and maintain their own Turing complete smart contracts on top of the blockchain (written in Solidity), enabling anyone to deploy a decentralized application with a customized set of logic, along with the option to update the smart contract themselves without requiring any change to the underlying blockchain.

Programmable smart contracts lead to the creation of fungible tokens, where specific public addresses were assigned to specific assets. This allowed a single blockchain to support a wide range of digital assets outside of its native cryptocurrency (i.e., a ledger of ledgers). Smart contracts also expanded the types of computation the blockchain could assign to those tokens, such as the creation of Decentralized Autonomous Organizations (DAOs) for decentralized voting between specific token holders, as well as the Decentralized Finance (DeFi) ecosystem that combines tokens and smart contracts to facilitate decentralized lending and borrowing markets, trading exchanges, derivatives products, and more. However, there was still one key problem; the blockchain is inherently disconnected from data and systems in the outside world.

Oracles: The Outside World / Decentralized Internet

The third component to the God protocols is for smart contracts to become aware of events and interact with systems existing outside the native blockchain they run on. External connectivity entails two functions: 1) consuming data originating outside the blockchain and 2) passing instructional commands to external systems for them to perform (e.g., execute a payment on PayPal).

Chainlink connects the existing world to the new world; (source).

Blockchains are inherently closed and deterministic systems, meaning they have no built-in capabilities to talk to and exchange data between external systems (as doing so could break network consensus). While this generates the valuable security and reliability properties that users seek when using a blockchain, it also severely limits the types of data inputs that smart contracts can ingest and the types of output actions they can trigger on external systems. Most valuable datasets like financial asset prices, weather conditions, sports scores, and IoT sensors, as well as the currently preferred fiat settlement methods like credit cards and bank wires, exist outside the blockchain (off-chain). Given the importance of these resources to real-world business processes, blockchains need a secure bridge to the outside world in order to support a vast majority of smart contract application use cases.

Providing smart contracts connection to the outside world requires an additional piece of infrastructure known as an oracle. An oracle is an external entity that operates on behalf of a smart contract by performing actions not possible or practical by the blockchain itself. This usually involves retrieving and delivering off-chain data to the smart contract to trigger its execution or passing data from the smart contract to an external system to trigger an off-chain event. It can also involve various types of off-chain computations in advanced oracle networks (discussed more below), such as aggregating data from multiple sources or generating a provably fair source of randomness.

Similar to blockchains, the oracle mechanism cannot be operated by a single entity, as that would give the centralized oracle sole control over the inputs the contract consumes, thus control over the outputs it produces. Even if the blockchain is highly secure and the smart contract logic is perfectly written, the oracle will put at risk the entire value proposition of the smart contract if it is not built to the same security and reliability standards as the underlying blockchain network, often referred to as the oracle problem. Why have a blockchain network of thousands of nodes when it’s triggered by a single entity?