If you’ve been following our blog for any length of time, you probably know that we are big fans of ChainLink. While we have written numerous blog posts on the various features and functions of ChainLink, this article is intended as a deep dive into what ChainLink actually is and how it can be used in your own applications.
ChainLink is an oracle blockchain technology that enables smart contracts to securely query and interact with external data sources. It’s most commonly known for its cryptocurrency token, the lisk (LSK) oracle which powers the LSK network and which can be used to query any external data source.
However, ChainLink also provides an API that allows third parties to create their own oracles which they then distribute across their own networks using their own native tokens. The result? A decentralized digital oracle network of token-issuing entities called “oracles” — enabling users to request information from third party sources either directly through their oracle network, or indirectly via other oracles in the network.
In this article we will explore what an oracle is, including examples of how oracles can be utilized in your own applications, as well as provide a high-level overview of what each feature means and how they can be used collectively in a smart contract architecture.
What is an oracle?
An oracle is a decentralized computing device that queries and interprets data from multiple sources, including decentralized data storage and distributed data sources such as the Internet. While centralized oracles can help scale external data access, oracles enable third-party access to data sources that are not easily accessible through a centralized system.
For example, if you have a financial institution that wants to provide up-to-the-minute stock prices to a trading app, an oracle could query that data source and return the latest prices to the trading app.
Scaling oracles with smart contracts
Another useful use of oracles is to query non-centralized data sources that you control, for example, your own cloud server. By issuing your own token, you can create an oracle that is controlled and managed by you. You could then issue that oracle as a smart contract, and let the app query data from your data lake whenever it’s available.
Oracles in the ChainLink network
ChainLink has a number of features that make oracles particularly useful, including multisignature addresses and smart contracts. Let’s begin with the former, which is an easy way for oracles to verify the authenticity of data messages. Additionally, a user can set a threshold to restrict the number of times an address can query data.
This threshold can be relevant when the user wants to verify data authenticity only once, but wants to make sure it comes back with results once requested.
Using oracles in your own applications
Now that we have an overview of what an oracle is and how it can be used, it’s time to examine how oracles can be used in your own applications. First, we need to discuss how oracles are used in decentralized applications (dApps). In a decentralized application, data is fetched from a variety of sources, processed, and stored in a distributed fashion across multiple computers and decentralized apps.
A typical scenario is where a user requests information from a decentralized app, like a stock exchange, and the decentralized app sends them the latest data feed. Then, when the user makes a buy or sell decision, the decentralized app uses the data received to make an informed decision. In the example above, if the user purchased shares in a company, the decentralized app would return the latest price feed to the user.
In our search for the best solutions to the problems we know and the ones we don’t, we’ve encountered many different blockchain technologies and tools. One of them is ChainLink. While its use cases are very specific, it does provide a great deal of flexibility and scalability, allowing for oracles and third-party access to data.
Additionally, its decentralized architecture makes it ideal for decentralized applications. Using oracles in your applications makes AI accessible to a much wider range of consumers. As more and more people use oracles, the more demand there is for products and services that make use of them. With time, we could see an entire ecosystem of decentralized applications based on the oracle protocol.