Oracles: the key to unlocking smart contracts
first level title
Why have smart contracts not been applied for a long time?
The reason why smart contracts have not yet appeared in industry application scenarios other than tokens is mainly because they cannot be connected to off-chain data (off-chain data is data that is not stored on the blockchain). A blockchain cannot interact with off-chain data without interfering with the consensus protocol (the process by which a distributed system establishes a true single data state). Interacting with off-chain data may form a variety of blockchain book forms.
Today, the main application area of smart contracts is tokenization, which is the issuance of ownership in the form of tokens to real-world assets or facilities. Token offerings were very popular in 2017 and 2018, raising about $20 billion in funds. A major reason for the growth of tokenization is that it does not require off-chain data. All token information for an ICO is known and stored in smart contracts on the blockchain. In contrast, smart contracts in industries such as financial derivatives, insurance, and trade finance require external off-chain data (such as IoT data, market data, and event data) to trigger contract execution.
Such trigger data is not stored on the same blockchain as the smart contract, because it is neither practical nor practical to do so. Most of the data in the world is stored off-chain, and the current fragmentation of the on-chain and off-chain systems also makes the two worlds unable to communicate with each other.
The second biggest challenge smart contracts currently face is their inability to output data to external systems. For example, smart contracts cannot execute transactions settled in fiat currency in traditional payment systems. Cryptocurrencies are currently too risky for traditional businesses to hold on their balance sheets. While this situation may turn around in the future, most businesses are currently reluctant to use smart contracts that can only trade cryptocurrencies.
first level title
The State of the Oracle
Oracles are blockchain middleware that connect smart contracts to various required off-chain resources. The oracle is an intermediate layer between the blockchain and the API, translating data into a language that the blockchain can understand. An API is a specific way of interacting with a system, and each system's API is different. Businesses develop their own APIs to make their services and data available to other systems in their applications. For example, Uber will use GPS API, SMS API and payment API instead of spending time developing these applications themselves.
There are three modes of oracles: an oracle specially developed for an organization from scratch, a centralized oracle, and a decentralized oracle.
The first mode is to develop an oracle from scratch for each application scenario. This approach is problematic and inefficient. Due to the wide variety of APIs, programming each oracle from scratch would be time consuming. This is not practical if the enterprise needs to obtain different kinds of data in a short period of time.
first level title
Chainlink, a decentralized oracle network
Oracles also face a third challenge. Chainlink is building a decentralized oracle network. We have built a comprehensive platform that provides all the tools and data developers need to develop smart contracts. Chainlink is both an oracle and a flexible platform, providing smart contract developers with a safe and reliable oracle solution.
Each oracle is a node in the network. All nodes run Chainlink Core on different types of hardware to process data. All services provided by nodes will be settled with LINK tokens to protect the economic ecology in the network from external forces.
Chainlink uses external adapters called "chainlinks" to connect blockchains and APIs. Each API has its own pre-created Chainlink. We will provide a robust set of pre-built Chainlinks that allow all developers to easily connect smart contracts to APIs, access external data or connect to off-chain systems.
Finally, Chainlink is also able to decentralize both oracles and data sources.
Decentralized oracles will give developers the ability to use any number of oracles (nodes) to serve smart contracts. Having multiple oracle machines can not only provide a buffer when a certain oracle machine goes offline, but also prevent a single oracle machine from being hacked or bribed.
Decentralization of data sources enables oracles to collect data from multiple sources and aggregate the data into a single identified data point that triggers smart contracts. If there are multiple data sources, smart contracts can avoid the situation where a single data source is wrong. Chainlink offers several data aggregation modes, including averaging and/or removing outliers.

Another major feature of Chainlink is its reputation system. Chainlink built a reputation system for oracles in the same way that Amazon and Uber built reputation systems for sellers and drivers. The reputation value is based on several parameters such as uptime, reaction time, and number of successfully completed tasks. Smart contract requesters can select specific oracles based on ratings or some sort of reputation metric. This reputation system not only provides a reliable reference for developers to choose oracle machines, but also urges nodes to be responsible for their own service levels.
In addition, Chainlink will also provide different levels of security according to the needs of smart contracts. In addition to standardized oracles, Chainlink will also provide oracles that run in a trusted execution environment (TEE), which uses trusted hardware such as Intel SGX. One of the biggest advantages of an oracle running in a TEE is that the node operator cannot see the specific details of the request, including data input, output, and requester. TEE is a very attractive solution because private data (such as closed-source API) can be processed in TEE without revealing any information to node operators or the public. Ultimately, if the oracle in the TEE receives specific login data, it can even access private accounts to read data or trigger actions. This also enables off-chain computing power for smart contracts, which reduces gas costs and improves scalability.
first level title
Big strides toward widespread adoption
In order for smart contracts to be widely used, contracts must be able to securely and reliably connect to external off-chain data and systems. So Chainlink is developing an open-source decentralized protocol that gives smart contract developers access and control over the level of decentralization and confidentiality they need. Chainlink's decentralized oracle network enables smart contracts to connect to off-chain systems, thereby ensuring the determinism, tamper-proof and reliability of the entire life cycle of smart contracts.







