Hackernoon logoOracles in DeFi Systems: Off-Chain Aggregation vs Centralized Solutions by@ks.shilov

Oracles in DeFi Systems: Off-Chain Aggregation vs Centralized Solutions

Kirill Hacker Noon profile picture


Blockchain enthusiast developer and writer. My telegram: ksshilov

DeFi projects are changing the way we’re interacting with digital funds. We’re taking real money and transforming them into digital assets that can be used in blockchain-powered applications. Anyway, as much as we want to think that the cryptocurrency world is one that is separated from the actual real-world, it is not. Otherwise, why are you checking the USD price of your tokens?

We are changing the way we are interacting with each other financially, but we are not changing the way we are interacting with the world. Real-world events are influencing our lives and our digital funds. However, blockchain seems to have its own peace. Yes, the price of a token is going up or down. But one ETH will always be one ETH on its blockchain. A block on the blockchain doesn’t know the time. It’s just a block with a number. But blockchain blocks are generated faster or slower based on the external world miners activity.

You can argue that blockchain is immutable but its applications aren’t. Smart contracts are the biggest innovation in allowing blockchain to run DeFi apps without the traditional middleman. While we don’t need a third party when funds are changing hands anymore, we still need outside world interaction in certain cases like interest rates swaps, cash-settled put options, decentralized leverage trading.

Exactly for this purpose, oracles have been invented. Blockchain oracles are software solutions that can act as a secure middleware that facilitates communication between a smart contract and the outside world. The real-world data can be collected from anywhere, data providers, publicly available sources, the World Wide Web. It doesn’t matter as long as the provided data is accurate.

Anyway, pulling data from external sources is a double-edged sword as now the code which is supposed to be trustless, always running in the way it was supposed to run, is being influenced by the potentially corrupted outside world. Oracles are the ones trying to create an environment that can eliminate the variable of trust before the data reaches the blockchain. 

There are many solutions. They are all compatible with most DeFi apps. They are all different in their own ways. Neither is perfect as the oracle technology is still new and under development. Anyway, all the solutions that I’m going to discuss in this article are having a functional application running on the most popular blockchain networks. Here they are!

Off-chain aggregation

One of the live oracle systems is ChainLink whose solution allows smart contracts on Ethereum to access off-chain real-world information, so DeFi projects can easily retrieve it. The decentralized network of oracle nodes is managed by a mechanism based on activity and reputation which is publicly available for full transparency.

ChainLink started as a fully decentralized solution that allowed the consensus to happen on-chain and be publicly audited. Anyway, the high fees and the frequent network congestion of Ethereum forced the team to implement an off-chain aggregation step. The new solution uses Schnorr signatures, a technology that offers oracles the ability to co-participate in solving the task at hand. This means that each oracle can provide a partial signature. Aggregating and combining all the signatures results in one collective signature that can be written on the blockchain with only one transaction. One transaction that equals all answers.

This solution is cost-effective, but it introduces even more problems to the, previously mentioned, oracle problem. It has a time dependency for the nodes to answer the query. If a node takes too long to answer, it won’t receive a reward. It’s a bit counter-intuitive as an honest node will always take longer to find the correct answer compared to a node that is just randomly picking one. If enough nodes are delivering wrong data there is the risk of the oracle to solve wrongly.

Dedicated solution

As the Ethereum network gets slower and more expensive, new DeFi projects are moving to the TRON network where the Bridge oracle is live feeding smart contracts real-world inputs (the project's IEO on Bw.com ongoing) . Bridge is the first oracle system launched on TRON making the network more decentralized than before.

Bridge Oracle focuses on the accuracy of data first which makes it valuable not only for DeFi projects but also for enterprises or governments looking to use oracle verification services. Smart contracts are trustless by design, so in order to maintain their trustless status while incorporating real-world data the oracle solution used should be decentralized and very secure. Bridge is looking to create such an environment for its oracle network so agreements that are dependant on external data can be executed in ideal data conditions.

Smart contracts are the foundation of DeFi apps and DAOs (Decentralized Autonomous Organizations). We’ve already seen a huge interest in these types of solutions. Interest that led to a 227% increase in ETH price. However, ETH price took a break. In the same conditions. LINK (Chainlink’s native token) has seen a 370% increase in price. Making a parallel, this year TRON had a 450% price increase and its growth hasn’t stopped. As Bridge is TRON’s first-ever dedicated public oracle technology the opportunity behind BRG (Bridge’s native token) can be huge.

It’s true that Bridge comes as a dedicated solution specific to the TRON network while other solutions are looking to expand on many chains. While some might argue, an implementation that is tailored precisely for a network needs seems to be the ideal solution to deliver scalability without compromising security.

Centralized solution

The longest actively running oracle system is Provable. Probably the most used oracle service as well. Be aware that it is a centralized solution that could interfere with the vision of most DeFi projects. Anyway, while decentralized solution re still improving, Provable is up and running and ready to serve these dapps for the best.

Technically, this oracle network is using popular IT providers like Amazon’s EC2, Google’s SafetyNet, Intel’s SGX at its own core service. These technologies are grouped together creating an interoperable environment to serve correct data to blockchain. The idea is that even if someone would be able to compromise one of the providers the overall aggregation wouldn’t be compromised. Take for example Intel’s Spectre vulnerability. That could have put the Intel provider under risk. Anyway, for someone to compromise the entire network they would have to run a coordinated attack on Google, Amazon, and others to create a majority. 

The downside of Provable, without taking into consideration its centralization, is relying on TLS data from https websites. Data that is aggregated and delivered as-is. This puts it at risk as data sources can propagate fake news and reach consensus pretty fast. The oracle will never know.

Community-curated data

Another cross-chain solution that is trying to be compatible with multiple blockchains at once is Band Protocol. The oracle system is decentralized and it is meant to provide real-world data to smart contracts. Actually, Band protocol promotes itself as a reliable data source for DeFi projects.

The oracle solution works as a public smart contract accessible from other smart contracts on the blockchain. The data feeds are community-curated. Token Curate DataSources (TCD) is what they are calling the governance system that allows the network’s participants to curate and manage the data. It works well with information that is publicly available and verifiable by anyone like cryptocurrency prices or real-world sports events. But it has problems finding the necessary volume of answers for niche or localized events. Or data that is not easily available or verifiable over the Internet.

As a decentralized solution, it can be accessed by anyone and it can be feed data by anyone. The way they are trying to keep actors out of it is by requiring a minimum amount of tokens to be put at stake. Anyway, if the volume is low, just by having pockets deep enough can let you influence the outcome.

Band also came into everyone’s attention recently when its CTO was suspected as being the founder of SushiSwap whose coin SUSHI lost 500% of its value during one day. The two persons haven’t been identified as being the same, but there are some questionable clues out there.

Crowd-based solution

Another crowd-based oracle is Reality.eth, previously known as Realitio. The system relied on escalating bonds to generate correct information for smart contracts. Not only that the solution is decentralized, but its overall implementation is open to any kind of use as it can cover any natural-language question that has a publicly knowable answer. You can think of Reality.eth as a cheaper multi-use oracle.

The oracle is designed as a layer two trustless system where a decentralized economy is running and managing its data inside the network. As a DeFi project developer, if you are in need of getting some external data inside your contract, you can just ask a question whose answer is the actual data and, to make sure it will be answered you should offer a reward.

Anyone can answer it to claim the reward. Anyway, if you want to claim it you need to place a bond first. Now, other participants can challenge their answers by doubling the bond. This can go on and on until nobody is willing to put more money down. The final answer gets the reward and the bond.

The concept is great but you can easily tell that without significant rewards there is no volume. And without volume, the system can’t be fully reliable. Plus, the wording of the question and the possible answers is the most important aspect. In some cases, it isn’t really a problem.

But, when specific data that are not related to a clear outcome or a clear real-world event, finding someone willing to answer your question can become tricky.


Join Hacker Noon

Create your free account to unlock your custom reading experience.