Blockchains are meant to be extremely secure. Information is available to all users of the network. But smart contracts can reintroduce counterparty risk. Many smart contracts require data from the real world (e.g flight information or asset prices) to execute commands. This data, however, is not stored on blockchains.
Smart contracts cannot fetch external data. The only way to efficiently get data into the blockchain is for a software component called an “oracle” to input it into the blockchain. This leads to important questions:
- How do we decide if a data source is accurate?
- How do we choose the correct data source to use?
A centralized oracle would have complete control over a smart contract’s outcome.
Ideally there would be an oracle mechanism with the same security and reliability properties of the underlying blockchain that it serves. This would retain the value proposition of the smart contract — it would remain trustless, secure, and reliable.
Chainlink solves this oracle problem. Chainlink uses a similar model to a blockchain to fetch data from the outside world. There is a decentralized network of independent entities (oracles) that collectively retrieve data from multiple sources. This data is then aggregated and validated, and finally delivered to the smart contract as a single data point.
Chainlink takes the requesting contracts data request and uses the Chainlink Core software to translate that request to an off-blockchain programming language that a real-world data source is compatible with. The translated request is then routed to an API or APIs and collects data from the source(s). Once the data has been collected, it’s translated back into on-blockchain language through Chainlink Core and sent back to the Chainlink Aggregating Contract.
The Chainlink aggregating contract can validate data from a single source or from multiple sources. Additionally it can reconcile data from multiple sources. For example, five nodes deliver one answer from a weather sensor and two other nodes deliver a different answer. The Chainlink Aggregating Contract will know that those two nodes are faulty and discard their answers. This validation process can be repeated for multiple sources and the validated data can be reconciled by averaging the data into a single data point.
Chainlink’s oracle network has many use cases:
- DeFi: many traditional financial products like loans, derivatives, and asset equity are being built on the blockchain. Chainlink can be used to prices assets, access interest rates, and verify collateralization
- Insurance: Chainlink is currently being used in production to provide weather data to the Arbol crop insurance market
- Gaming: a key building block of blockchain games is a source of randomness. Chainlink provides a randomness solution called VRF. VRF generates randomness and delivers it to the smart contract in a manner where users can prove it is fair and unbiased.
Chainlink will also allow traditional systems like data providers, IoT networks, websites, and enterprises to make their data and services available to any blockchain network.
LINK is central to how Chainlink operates. LINK is used to pay node operators for their work. Node operators must also stake LINK in the network. The Chainlink Reputation Contract considers the size of a node’s stake (among other criteria) when matching nodes with requests for data. Nodes with more LINK staked are more likely to be chosen to fulfill requests. The Chainlink network also punishes faulty or dishonest nodes by taxing their stake of LINK. LINK is used to incentivize good behavior by nodes and maintain the reliability of Chainlink’s oracle network.
Chainlink provides multiple security layers to ensure its oracle network can be trusted:
- Generalized architecture — Chainlink is a flexible framework for building and running oracle networks. Users can construct and/or connect to customized oracle networks.
- Data signing — Chainlink oracles sign the data they input on-chain with a unique cryptographic signature, allowing users to trace its origin to a specific oracle node.
- Blockchain agnostic — Chainlink can run natively on any blockchain without dependencies on other blockchains.
- Reputation systems — Chainlink oracles’ historical performance is publicly available via signed data on-chain. Users can select oracles based on historical performance metrics.
Chainlink’s oracle network is impressive. It’s pioneering the charge of bringing Web2 products and services to Web3. It’s crazy to think that we can automatically verify data in such a secure manner. Chainlink’s oracle network has so many uses that it can’t be ignored.