In a sentence, Chainlink is a secure way to connect smart contracts to external data.
But unless you’re deep into crypto already, that probably doesn’t mean much. To understand Chainlink, you first need to understand blockchain, and then you need to understand smart contracts, and then you need to understand why smart contracts need a secure way of connecting to external data.
So in this post I want to go through all this in a non-technical way and hopefully get across why I think smart contracts and Chainlink are important. Even in 2020, crypto still has a lot of negative associations, but if you look beyond these there is a ton of real world use cases and huge disruptive potential. Chainlink is a great example of this.
Smart contracts are self-executing digital agreements stored on blockchains. And these digital agreements potentially cover a lot of things, including:
- Payment for goods or services
- Insurance contracts
- Financial agreements (e.g. derivatives, bond payments)
- Raising capital for businesses and paying shareholders
Basically, “agreements” is a very broad term and so smart contracts have a broad potential scope.
As I see it, smart contracts have two big advantages over the current infrastructure for digital agreements: lower costs and higher security.
The cost savings of smart contracts come from cutting out middlemen and replacing existing infrastructure with the decentralized infrastructure of blockchains.
What this actually looks like will vary depending on the industry where smart contracts are deployed. But taking something like insurance as an example, you could potentially cut a lot of overheads – e.g. the buildings, a lot of paperwork, a lot of staff – by replacing existing infrastructure with decentralized smart contracts.
And these cost savings are only going to become more pronounced as organizations like Ethereum work on scaling their platforms.
Perhaps more relevant in 2020, though, is the security aspect of smart contracts.
Smart contracts are highly secure due to the decentralized nature of the blockchains they are stored on. If the status of our agreement is stored on the Ethereum blockchain, say, and someone hacks one node – or 10 nodes or even 100 nodes – our smart contract will still be safe because there are thousands of other nodes that maintain the true status of the contract.
Decentralization means smart contracts are highly reliable and tamper-proof agreements; once a smart contract is written, you can be confident it will execute exactly as written.
Smart contracts before 2020
So, we have this exciting new technological infrastructure with huge potential cost savings and security benefits – but what are smart contracts actually used for?
At the moment, not much.
We’ve had a few decentralized applications like Cryptokitties and Cryptomon, as well as a few proof of concept demos. Various startups have sought to tokenize assets with varying degrees of success.
Perhaps the biggest use case for smart contracts so far has been initial coin offerings (ICOs). ICOs represent a more open and less expensive way for companies to raise capital.
Unfortunately, however, a lot of ICOs so far have been overly hyped, or bad ideas, or just outright scams. And the bursting of the ICO bubble in January 2018 gave crypto an even worse reputation than it already had.
Externally aware smart contracts
In my view, a big reason why smart contracts haven’t had much real world impact so far is that they are limited to tokenization. These tokens could represent the real world, but do not interact with it. And as long as this remains the case, outsiders will just see crypto as nerds trading tokens with each other.
But this is where Chainlink comes in.
Blockchain platforms like Ethereum do not have native functionality to connect with off-chain data and so are limited to tokenization. Chainlink, however, is middleware that sits between blockchain platforms and external data sources, enabling blockchains to communicate with these off-chain resources. Another word for this service is a blockchain oracle.
Possible data sources to use in smart contracts include but are by no means limited to:
- Retail bank payments
- Price feeds
- Exchange rates
- Flight times
- Weather data
- Sports results
Basically, Chainlink can connect anything with an API to a smart contract. Google, for example, recently posted a blog demonstrating how Chainlink can integrate data from BigQuery into a smart contract. And, amongst a bunch of other APIs, CLC Group offers sentiment analysis of text via their Honeycomb marketplace.
By interacting with these off-chain resources, we can create smart contracts that actually do things in the real world!
As an example, if blockchains can access flight times data and make retail bank payments, we can code up a smart contract that says “if the flight is delayed by an hour or more, pay $50 to this bank account” and just like that you have flight insurance on the blockchain – highly secure and with potentially much lower overheads than current methods.
The oracle problem
I mentioned above that one of the key benefits of smart contracts over existing digital agreements is security, and that this security comes from decentralization.
However, if we introduce external data (via an oracle) we risk losing the security that is an important reason why anyone would use a smart contract in the first place.
Let’s say you and I set up a smart contract that says you’ll pay me $1 million if the Bank of England base rate hits 3%.
Decentralization means it isn’t viable for me to hack the contract itself to steal your money because it would cost much more than the contract is worth for me to do so. But what I could potentially do is hack the input to the contract. I could hack the oracle to say the Bank of England base rate is 3% (even when it isn’t), which will trigger the smart contract and enable me to steal your $1 million.
This isn’t a problem with the smart contract itself. The smart contract executed exactly as it was written, exactly as it was supposed to. The weak link here is the oracle, i.e. the external data provider.
To avoid this problem, Chainlink takes the same architecture that makes the contract itself secure—i.e. decentralization—and applies it to the oracle:
With Chainlink, you can specify multiple node operators (and multiple data sources) to ensure that the inputs and outputs to your smart contract are as decentralized as the smart contract itself.
Decentralizing both the oracle and the smart contract itself in this way ensures your smart contract is reliable and secure from end to end.
An example smart contract
Another example use case for Chainlink would be a smart contract for payment for goods on delivery. I like this example as it illustrates how accessing a bunch of different data sources can make an interesting and complex smart contract.
First, we would use Chainlink to verify that goods have been delivered.
Depending on what these goods are will likely determine how much decentralization (i.e. security) your contract needs.
If it’s just your Amazon parcel worth $50, say, then you would likely only use one, possibly two, nodes to confirm the parcel has arrived. But if the smart contract is part of some high-value supply chain (a more plausible use case), then you could use multiple Chainlink nodes (and multiple different data providers) to reliably confirm that the shipment has been delivered.
Once delivery is confirmed, this triggers the smart contract to pay out to the seller.
And with Chainlink you can pay the seller in any currency and use any payment method they want. A buyer could pay in pound sterling, say, and Chainlink can do currency conversions and pay out the correct amount to the seller – whether that’s in Swiss francs or US dollars or even a cryptocurrency like Bitcoin or Ether.
The whole agreement is automated and highly secure from end to end and doesn’t require the parties to trust (or pay) a third party escrow service.
The future of smart contracts
In summary, Chainlink is a decentralized oracle network – a highly secure way to connect smart contracts to external data sources.
The network went live on 30th May 2019 and has seen steady growth in usage since. At least at the moment, it’s pretty safe to say that Chainlink is the de facto standard oracle in the same way Ethereum is the de facto standard smart contract platform.
My own take is that high-value financial contracts – things like derivatives – will be among the first major use cases for Chainlink, mainly because the security aspect I have described is so important for such contracts. And perhaps unsurprisingly, Chainlink is concentrating a lot of effort on decentralized finance developments like Mixicles. Over time, though, I think we’ll see smart contracts deployed for lower-value contracts – especially as blockchains like Ethereum scale and gas costs come down.
I see Chainlink and smart contracts as powerful tools for automation, efficiency, and security. The potential applications are vast, and the examples I have described here only scratch the surface of what’s possible.
But smart contracts are still such a nascent technology that it’s almost impossible to know exactly how they’ll be used. Just as no one could really guess that the internet would give rise to applications like Instagram and cloud gaming back in 1995, it’s almost impossible to predict what sorts of smart contracts people will create over the coming years.