Skip to content

Intro to Smart Contracts - Oracles: Connecting the External World to the Blockchain

A few weeks ago, I published my first blog post on smart contracts, introducing some basic definitions as well as how these decentralized apps function on the Ethereum blockchain.

If you need a refresher, a smart contract is a distributed blockchain application that stores logic and executes actions when the conditions of a particular agreement are met. These contracts are built using languages like Solidity, which is one of the programming languages for developing decentralized applications.

However, one limitation of using smart contracts is that they can only process information which exists on the blockchain, so in order for these applications to see wider adoption, blockchain developers needed to create a method for quickly and automatically recording and leveraging disparate information otherwise not stored on a network. This is where oracles come into play.

A blockchain oracle is a piece of software- typically an API- that fetches information available on the web and reports that information to smart contracts on the blockchain. This information could include anything from world events: from changes in the stock market to that day’s dew point in San Francisco.

Any information which a smart contract must depend on in order to function, but isn’t able to pull from the blockchain, might require the help of thousands of oracles, all reporting requested information so that the smart contract can execute on accurate, trustworthy, real-time data.

This offers a number of advantages for industries looking to further automate their processes. For example, freight companies can code smart contracts that notify workers in a particular region when to take further precautions due to inclement weather. This decentralized app can automatically issue this warning without direct oversight by continuously pulling available weather data from oracles.

We might also see an expansion of smart contract technology used in the medical field as well. Hospitals can automate medical supply ordering processes to respond to real-time changes in their stock or availability of stock, using oracles that can continuously update the smart contract with inventory and/or the volume of inventory currently available from suppliers. This can ensure that hospitals, especially during this difficult period, can reduce administrative overhead and ensure that they have the best chance at securing the supplies that they need.

Of course, this use case is not unique to the medical field as this type of decentralized app could also benefit retailers or manufacturers who are constantly working to predict their supply needs against demand. Oracles can help combat the ever-present “bull-whip” risks, through which sharp increases in demand, followed by periods of lower demand, often leads to retailers and manufactures acquiring more inventory and raw materials than they truly need, by continuously updating automated ordering applications with second-by-second data on present demand.

Chainlink, a network agnostic oracle platform, is the leading platform for connecting real-world data to the blockchain through oracles. It facilitates the transfer of tamper-proof data between the APIs drawing real world data from centralized locations on the internet and the smart contracts receiving and responding to that data.

Similar to other networks, it issues its own ERC677 token, called LINK, and is used to compensate node operators that verify smart contracts executed on the Chainlink network, or can be used as any other ERC20-based token might be.

To learn more about how you can build your own smart contracts on the Ethereum network while leveraging all of the information available on the web, reach out to This Dot Labs to connect with one of our Solidity experts! We can’t wait to hear your ideas!

This Dot Labs is a development consultancy focused on providing staff augmentation, architectural guidance, and consulting to companies.

We help implement and teach modern web best practices with technologies such as React, Angular, Vue, Web Components, GraphQL, Node, and more.

You might also like


Semantic HTML: Why it matters and top tips on how to apply it


Getting Started with Git


Intro to Google DevTools: Console Panel


Intro to Google DevTools: Network Panel