Revolutionary technologies often begin with a specific functionality that opens up new value for users. Over time, these technologies expand, as developers capitalize on additional value subsets. For example, the internet began (mostly) with email, then quickly expanded to the world wide web, telecommunication, social media and much more.

Sergey Nazarov, Co-Founder of Chainlink, believes that smart contracts have already undergone two such value expansionist periods, moving from multi-signature blockchain transactions to protocol smart contracts and then on to scriptable smart contracts via Ethereum. Each progression unlocked additional value, leading to faster production timelines from developers and more functional smart contract applications for end users.

Smart contracts are now in the process of evolving into connected smart contracts. This new wave of value uses oracles to greatly expand the smart contract’s knowledge of what’s happening outside of the blockchain, so it can respond to external events with predefined actions. Chainlink is already demonstrating value through its popular Price Reference Contracts, which aggregate market prices off-chain and securely deliver this data to smart contracts to trigger key functions.

As exciting as this is, oracles have even more capabilities that go beyond securing off-chain data and delivery. To develop the larger scope and future outlook of oracles, Sergey Nazarov sat down for a fireside chat with Professor Ari Juels on Tuesday, February 18th, 2020 in San Francisco, CA.

Ari Juels is a professor at the Jacobs Technion-Cornell Institute at Cornell Tech and in the Computer Science field at Cornell University. He has amassed over 34,000 scholarly citations as part of his academic research career and is widely recognized for formalizing the term “Proof of Work'' alongside Markus Jakobsson in a 1999 paper. He’s an official Chainlink advisor and co-wrote the Chainlink whitepaper. Additionally, he’s a co-director of The Initiative for Cryptocurrencies & Contracts (IC3), the premier academic cryptocurrency and smart contract academic research center. Previously, he worked as the Chief Scientist of RSA, Director of RSA Laboratories, and as a Distinguished Engineer at EMC (now Dell EMC), where he worked until 2013.

The Initial Intrigue of Oracles

One might wonder how a highly decorated academic and industry leader in the fields of computing networks and cybersecurity became so fascinated by oracles. According to Ari, it was a matter of intellectual intrigue; he was initially drawn in by the fact that smart contracts were generating a lot of general excitement online and in research communities.

However, after some investigation, he yearned for more intellectual stimulation than simply moving tokens around on a distributed ledger, saying, “Smart contracts that manage tokens are fairly straightforward to code (…) there’s nothing technically deep happening. Now imagine if we take that same technology and we connect it to the real world; this is what oracles can do. Most of the visionary applications of smart contracts involve such connectivity. In my view, oracles are essential to making blockchain systems technically interesting, deep, and impactful.”

Chainlink can connect smart contracts on any blockchain to any input and output they need to securely replicate a full contract life cycle

This idea of oracles unlocking entirely new smart contract applications sparked Sergey’s interest, as well. Sergey elaborated on why he was initially intrigued by the idea of smart contracts, stating, “The thing that attracted me initially to the smart contract space wasn’t even tokens; it was smart contracts that could do things like move tokens on the basis of an event as a financial or insurance product. (...) Oracles enable that by connecting the smart contract system to the external world, while retaining the security of the smart contracts. They are one of the key missing pieces of the puzzle.”

Chainlink is already showcasing oracles’ capacity to expand smart contract designs via secure data delivery of web data. As Sergey put it, “The logical initial use case for an oracle network is ‘let’s get data; let’s get it to the smart contract so it can function at all.’ There’s a lot of demand for that, and, as there’s more DeFi and more smart contracts that need to rely on external data, that’s just going to continue.”

This is reflected in the launch of Price Reference Data Contracts powered by Chainlink’s decentralized oracle networks. These Price Reference Oracle Networks provide pricing data for over 25 cryptocurrency markets and collectively secure over 200M in USD value for many leading DeFi applications in derivatives (Synthetix), lending (Aave), decentralized exchange (Loopring), insurance (Nexus Mutual), tokenized assets (Set), and more. Without these highly reliable oracle networks feeding accurate price feeds that reflect market-wide price discovery, these DeFi applications could not function in a reliable, secure, and trusted manner.

The Dashboard for the ETH/USD Price Reference Contract, currently being secured by 21 independent, security reviewed, and Sybil resistant Chainlink oracle nodes

Expanding the Definition and Functionality of Oracles

While Chainlink is in the midst of expanding its first value proposition of secure sourcing and delivery of pricing data, according to Ari, data retrieval is just the beginning. “For most people, the world oracle is synonymous with middleware that does something very specific. It relays data from a website to a smart contract. But, I think where things get really interesting is when we think more expansively about the capabilities of oracles. You can think of an oracle network as an opportunity to build your own permissioned committee. You pay three oracles to relay data. You’re basically getting your own ad hoc committee, consisting of a number of entities you have handpicked and trust. When you have a trustworthy committee, there’s an awful lot you can do beyond merely relaying data.”

To begin understanding how expressive oracles can be, Ari and Sergey hypothesized how many future smart contracts will be built, before exploring several emerging design patterns.

Smart Contracts Existing Simultaneously On and Off-chain

According to Sergey, the future development of many smart contracts will consist of two different, yet equally important parts: on-chain and off-chain functions. The on-chain component is the blockchain, which provides extreme reliability and decentralization, as well as transaction finality. This is most beneficial for dispute resolution, on-chain payments, and other high transparency-dependent transactions.

The off-chain component can be designed using Chainlink’s decentralized oracle framework, which offers a pool of oracles that developers can use to form ad hoc committees that perform various services. These functionality include bidirectional data messaging between on-chain contracts and off-chain data and systems, as well as computational capabilities that can be customized to the specifications of the two parties.

Ari expanded on these oracle-enabled off-chain computational capabilities, stating, “This committee can perform privacy-preserving computation on your behalf, such as secure multi-party computation. It can use trusted hardware, which enables a very strong trust model if you believe in the hardware. It can communicate bidirectionally. There’s no reason a smart contract can’t interface with a cyber-physical system and actually control the cyber-physical system. Smart Locks was an early manifestation of this capability. In principle, smart contracts can control any system that emits a digital control.”

Ari speaking candidly on his introduction to oracles and their expansive capabilities

Mixicles

One of these initial design patterns for computational oracles is Mixicles, developed by Ari Juels, Lorenz Briedanback, Alex Coventry, Sergey Nazarov, Steve Ellis, and Brendan Magauran and first introduced in September, 2019. Mixicles create on-chain privacy for DeFi instruments by splitting the contract into two separate parts: contract execution and settlement outputs. The oracle acts as the connecting piece between the two, which allows the contract’s inputs to be decorrelated from its outputs, essentially separating the contract from the payout. Mixicles bring privacy to DeFi using a simple oracle computation.

Sergey spoke about how Mixicles expand the definition of oracles, saying, “Privacy is a very clear use case. I think Mixicles are this initial design pattern of ‘here’s how you generate privacy using trust minimized off-chain computation in the form of an oracle network.’” Ari followed Sergey’s point, stating, “The oracle is doing something here other than just relaying data; it’s also helping provide confidentiality. And this, I think, is just the beginning.”

Arbitrum

Another design pattern recently introduced is Arbitrum, a layer two protocol for scalable off-chain computation of solidity smart contracts, which can be run directly by Chainlink nodes. In addition to their data interoperability functionality, Chainlink nodes can become a complete off-chain tech stack for Dapp developers, while remaining anchored to the Ethereum blockchain for fallback security and on-chain settlement.

Sergey expanded on the culmination of these software features (Mixicles and Arbitrum), saying, “You’re seeing a large amount of features that become available even when you do the most basic features off-chain. You suddenly get two great features, privacy and scalable computation of solidity code, which are both very expansive in terms of what people will be able to build as a result. I think what we are really seeing is that data delivery is the first great use case of oracles and oracle networks, and subsequent use cases are about combining that data delivery with privacy-preserving or scalable off-chain computation to augment the functionality that can happen on-chain.”

The basic architecture for using Chainlink with Arbitrum

Trusted Execution Environments (TEEs) and Town Crier

While Mixicles and Arbitrum offer software-based enhancements for oracles, hardware-based approaches also expand the functionality of oracles. These involve using trusted execution environments – an isolated black box computing environment for executing code that can’t be tampered with by other parts of the computer.

Chainlink first showcased this ability in November 2018 by acquiring Town Crier, a TEE-based oracle developed by Ari Juels and his team at Cornell and IC3. Town Crier authenticates retrieved data by verifying TLS certificates of websites, ensuring integrity of the data consumed by the smart contract. It also enables confidentiality, where not even the oracle node can see the data it retrieves or the computation being performed.

Ari touched on these two key properties, stating, “What trusted execution environments do is enable an application to run in a protected environment, known in SGX speak as an enclave. This environment provides integrity in the sense that the execution of the program can’t be tampered with, even by the operating system (...) It also provides confidentiality, in the sense that the owner of the platform can’t see the state of the program or observe the execution. Therefore, an application can run with secrets that are not visible to the operating system or other applications. These two properties together are very powerful, and trusted execution environments are an excellent platform for deployment of an oracle node.”

A general technical overview of how a Dapp can leverage TEEs

DECO

Another oracle project that was briefly discussed is DECO, introduced on September 3rd, 2019 and led by Fan Zhang, a PHD student in Ari’s technology group at Cornell. DECO is an oracle model that also performs privacy preserving computation, but without the use of trusted hardware. Instead, it requires user participation, wherein the user must initialize a TLS session (secure login to a website) together with the oracle in order to make the data extractable. The oracle can then validate sensitive data during the session via a zero knowledge proof without actually seeing or stealing any of the data. For example, a user logs into their bank account to prove to the oracle that they’re an accredited investor, which relays the proof to the smart contract.

Future Implementations of Connected Smart Contracts

Sergey and Ari concluded the fireside chat by answering a community-driven question about which smart contract applications they foresee or would like to see take off in the next five or 10 years, that might not be on people’s radar. The question was in reference to all of the great web applications that emerged from the internet era, which no one saw coming.

Ari’s Response

Ari gave a longer term outlook by talking about a project he’s working on with his group, particularly first year PHD student, Sishan Long, momentarily named AIRS: Automated Incentives for Reforestation Stewardship. AIRS aims to incentivize stewardship of the environment by consistently taking in satellite data and monitoring its state over time using trusted execution environments. It then rewards users who exercise responsible stewardship of the land.

Ari explained the concept in more detail, saying, “The smart contract references an oracle that ingests satellite data and monitors the conservation of forests. In particular, it measures their carbon capture capacity, the ability to sequesters carbon, how good at carbon sync they are, etc. When a forest has been well conserved and ideally expanded, it pays money to local residents – those presumably responsible for the good stewardship of that tract of forest. The idea is to pour money into the smart contract so it gets dispensed to the people who are responsible for maintaining and expanding this very important carbon sink.”

This use case in particular projects the immense future capabilities of oracles, as the trusted execution environment will need to ingest large amounts of data and perform heavy duty computation through machine learning software. It also showcases new trust models, wherein people can trust that if they exert a certain amount of energy in an activity such as reforestation, they can be assured that they will get paid for their efforts.

Sergey’s Response

Sergey took a different approach to the question by breaking it down into two categories: developed and emerging markets. Since these two markets are currently starting at different technological capacities, smart contracts will benefit from them in different ways. Sergey’s general approach revolves around improving contract infrastructure to spur new economic activity. According to Sergey, “Every time, historically, a society has improved how its contracts work – usually through the improvement of its legal system – that society has enabled all types of economic activity that have gone on to redefine it.”

He likened the changes coming to developed markets to financial market cycles, particularly those surrounding the 2008 financial crisis. Due to the opacity of the global financial system, there is massive systemic financial risk stemming from information asymmetry. A few people exploit this information asymmetry to the tune of “boom and bust” market cycles, which the rest of society pays for. Sergey explained that “systems like blockchains and smart contracts would force developed markets to work in a way where – in the example of the 2008 crisis, a mortgage holder could have a smart contract that is appended with new data as it moves between institutions. That would allow people to research all the way back to what composes this basket of millions of separate contracts and assets (mortgage backed security). (...) Better contracts allow markets and systems to work in the way they’re promised to work, rather than the way people want to exploit them for their benefit and to the detriment of larger society.”

In emerging markets, Sergey sees “a similar leapfrogging to what we’ve seen in the telecom industry and then the internet.” While developed markets tend to evolve in a more linear fashion, developing markets often take massive leaps. For example, the introduction of cell phones where landlines didn’t previously exist completely transformed emerging markets. Similarly, $50 smartphones bypassed the desktop phase of the internet, giving everyone the same accessibility to information previously only accessible in the west.

According to Sergey, smart contracts will cause a similar technological advancement by leapfrogging broken governments and legal systems. Sergey stated, “I think that a technically enforced system of contracts that works in all these different use cases is going to once again allow people to leapfrog past a broken legal system that, in many emerging markets, doesn’t allow people to live fair and dignified lives.”

He went on to talk about how people in emerging markets will soon use their smartphones to access DeFi and decentralized insurance protocols. “These Dapps can give them easy access to trust-minimized forms of saving money, managing risk, combating inflation, and ultimately getting ahead in life, despite bad local government policies.”

The Tools to Build Next Generation Smart Contracts Are Arriving Today

By combining all of these new and exciting capabilities, oracles are clearly giving developers access to many key functionalities that will drive next generation smart contracts. Developers can already get high quality data from Chainlink’s Price Reference Data networks. They will soon be able to use Mixicles for on-chain privacy of DeFi contracts, Town Crier and DECO for privacy preserving extraction of web data, Arbitrum for scalable computation of solidity smart contracts, and Trusted Execution Environments with oracles for all types of private, scalable computation.

Building the next generation of smart contracts isn’t theoretical anymore. Oracles are giving developers the tools to solve interoperability, privacy, and scalability problems right now. The only limit to building with these tools is a developer’s imagination. Sergey expressed his excitement about this future:

“What I see in five to 10 years, once we’ve given people who want to build these contracts all the tools, is the capacity to very quickly take over all the digital agreements out there. Every digital agreement that you would want to make becomes easy enough and cost efficient enough, that it could be backed by smart contract guarantees.”

Join the Community and Start Building Today

If you want to start building with Chainlink today, visit the developer documentation, join the technical discussion on Discord, and/or reach out to us about securely launching your data-enabled application or Chainlink Price Reference Data Contract on mainnet today.

If you want to get involved in the Chainlink community, visit our events page to join future meetups like this in your local area. If you want to become a Chainlink Ambassador and host a meetup, sign up today! For more information, check out the Chainlink website or follow us on Twitter or Reddit.

Don’t forget to get your tickets to the Smart Contract Summit: SmartCon 0, held at the BRIC in Brooklyn, NYC, on Thursday, May 7th, 2020. Tickets are limited; reserve your spot using this link!