Smart Contracts, Decentralized Oracles, and 5 Oracle Reviews

Smart contracts are digitally facilitated agreements between parties, written directly into computer code. If smart contracts can be connected to events in the real-world, they can automatically enforce the terms of the agreement. This is why oracles are needed. Oracles are middleware which allow smart contracts to be triggered by event data, in a safe, reliable way. Data providers, decentralized oracles, and blockchains can build a new trustless system for digital agreements, offering end to end reliability and a superior form of contract.

Oracles have broad implications for businesses in categories like: shipping, insurance, and finance. If a developer’s goal is to create a decentralized service, almost all defi projects will require a decentralized oracle.

5 Oracle Projects I’ll discuss

The oracle space has grown rapidly in just a couple years, it includes projects like: Chainlink, Band Protocol, Tellor, Witnet, and Zap, which are all live on mainnet.

Below, I’ll discuss: what oracles are, the problem with centralized oracles, how trusted execution environments use oracles, and which services can integrate oracles with smart contracts.

What are Oracles?

Oracles are middleware which allow blockchains to communicate with external data sources, then deliver this data to a contract safely. Oracles allow market data, iot data, shipping data, and real-world event data to be delivered without manipulation or corruption. They bring end-to-end reliability to smart contracts. If a smart contract can be manipulated or easily broken by tweaking inputs or outputs of data, it destroys the entire system’s integrity. Oracles bring system reliability, allowing smart contracts to become a superior way to do digital agreements.

Below, Vitalik speaks on how we need multiple decentralized oracles and oracle designs.

Why are decentralized oracles more reliable, than centralized oracles?

Centralized sources of data can easily be manipulated. If data sources are connected in a decentralized manner across nodes, they are less vulnerable to attacks. Consensus between multiple, independent node operators ensures that data inputs and outputs cannot be gamed. Nodes are incentivized financially to provide accurate data, they are penalized if they provide inaccurate data. A reputation system and financial staking ensures that oracles provide good data.

Decentralized oracles provide better security, but can still be attacked. One type of attack that can be performed on a decentralized oracle is called an inconsistent source attack. Attackers can use this type of attack to undermine the credibility of rival nodes. It can get them penalized or removed from the network.

When all aspects of the system including: blockchain, data sources, and oracles are decentralized, a smart contract is more resilient, and safe from attackers.

How are Oracles Used in Trusted Execution Environments?

Another important use case for oracles, is the delivery of data to and from a trusted execution environment (TEE). TEE’s allow for a trusted hardware environment to bring data in and out for off-chain computation. TEE’s reduce a computer’s attack surface area and allow for safer, decentralized computation.

An oracle allows smart contracts to potentially control private keys, manage credentials for payments, and provide confidential off chain data delivery and computation.

5 Decentralized oracle reviews

Zap – Zap is a permissionless protocol to buy/sell data, create liquid tokens, attach bonding price curves to these tokens, and bond/un-bond capital to them. Zap allows users to mint ERC-20 tokens, then link them to price oracles, which allows the tokenization of real-world assets. Zap devs state that they are the very first decentralized oracle, even beating Chainlink to mainnet.

Here is an unofficial source for info on Zap.

ERC-20 Token Issuance on Zap

The Zap protocol has ERC20 token issuance capabilities, similar to Ethereum. It gives users the ability to tokenize assets including real estate and commodities, then choose an oracle to track the asset’s price. Tokens can be created instantly, then traded on an exchange.

The Zap project uses bonding curves to create an incentivization model. It gives projects access to trusted price data and other services via algorithmically generated tokens.

What is a Bonding Curve?

A bonding curve is a smart contract that issues ERC-20 tokens that a user can “bond” value to according to a chart below (the curves can vary depending on the dev preferences). When a new user joins, tokens are minted and the price moves higher up the curve. Bonding curves auto-adjust supply, and control the minting/burning process. ERC20 tokens are minted or burned automatically as people bond and un-bond to their bonding curves.

The Zap Protocol doesn’t enforce a particular consensus mechanism. Users can select whichever oracles they trust. Reputation is decided by the community. Oracles with the longest runtime and most value staked to them are most likely to be reliable

Data providers for Zap are curated by the community. Users bond value to data providers that they deem trustworthy. Data providers have incentives to remain honest, they can be penalized or removed from the network if they provide inaccurate data.

Tellor – Tellor is a proof-of-work oracle incubated by BinanceLabs. Miners stake coins in order to provide price-feed data to defi projects.

The team decided on proof-of-work, because POW makes it harder for data sources to submit a bad value. Miners must stake coins to submit values, and the median value is accepted. Values can also be disputed. If a node submits a bad value, they will be disputed and miners will be penalized for submitting inaccurate data.

Miners recieve rewards for each block, and devs also recieve rewards for the dev-share. Tellor didnt do an IEO, but they built in a dev-share model of 10% of mining rewards going to developers. Developers used this model, because they thought IEOs were a bad model. They believe a dev share model was better to fund development of the project.

The Tellor token supply is low, but it has inflation built in to support developers of the project. Tellor mints 27.5 tokens every 10 minutes.

Recently audited by Certik, the goals of Tellor are to increase the number of queries by a factor of 10 and reduce their block times. They are also building for other chains like Cosmos, and Harmony.

ChainLink – ChainLink, an oracle project which was founded in 2017, is inarguably the most successful in the space. It has major partnerships ranging from Microsoft, Google, Binance, Swift, and Intel.

Sergey Nazarov‘s stated goal with Chainlink is to “provide reliable tamper-proof inputs and outputs for complex smart contracts on any blockchain.” Sergey states “the same trust dynamics and benefits that can be applied to ownership via tokenization, can be applied to digital agreements.” This type of contract will guarantee extreme reliability for the parties involved.

Chainlink has built open source code which allows its users to become node operators. Node operators can earn revenue by providing accurate data. They provide market data to Chainlink’s decentralized oracle network, which can then be fed into smart contracts.

The Chainlink project’s goal is to expand the scope of what a smart contract can do, while maintaining the security offered by a decentralized system. They aim to produce extreme reliability for technically enforced smart contracts. Sergei believes a technologically enforced legal system built on smart contracts will reduce overall global economic financial risk.

Witnet – Witnet is a decentralized oracle network that connects data sources to smart contracts. It allows the information to be verified, without having to trust a 3rd party. Witnet also allows a degree of blockchain interoperability, allowing contracts to be triggered based on transactions on other blockchains.

It operates based on a distributed network of mining nodes called “witnesses“. Node operators earn WIT tokens for sending accurate data to smart contracts. The consensus between nodes ensures the accuracy of this data.

Nodes in the Witnet oracle network are chosen based on a reputation score that it has earned by fulfilling requests for data. Nodes do not need to stake large amounts of tokens or buy expensive mining hardware to participate as a node.

Band Protocol – The BAND protocol is a community-curated oracle network. It uses bonding curves, which users can attach value to. It functions as a system for reputation, data curation, incentivization, and revenue for stakers, who collect fees.

Band chooses the data provider with the largest amount of BAND tokens staked, to provide data for a specific dataset. Data providers are curated by the community. Users can bond value to whichever data provider they deem valuable. The BAND protocol automatically chooses the wealthiest data providers, by the value of tokens staked.

BAND Devs state that it only takes “3 lines of code to integrate data from BAND into a smart contract”. They say that the difference between Band and Chainlink is their token model, as well as how users integrate data into the contract.

Band has partnerships with a few lending protocols, stablecoins, betting, and gaming projects, but the exact names are underwraps for now. Recently they partnered with Fantom to provide oracles for financial applications.

Conclusion

Decentralized oracles can provide dramatic improvements to our legal system, financial system, cloud computing, and many decentralized services. Oracles will allow smart contracts to have uses extending beyond ownership and tokenization.

Vitalik states that multiple types and designs of oracles are needed, so i feel that competition is likely to expand, as developers realize the implications of how smart contracts can extend beyond blockchain. I think the potential of smart contracts is just beginning to be tapped in a way that could drastically change our world economy.

If you liked this article, please follow me @defipicks