Promise and Problems of the DeFi Oracle — When Data Fails

2021-10-16 18:00

Decentralized Finance (DeFi) has had a meteoric rise over the last year. This spectrum of protocols and projects all hinges on the ability of code to replace trust. However, what happens when the data fails?

In the world of traditional finance, we typically rely on the banking system as an intermediary to execute our business. Companies constitute the networks that do business with banks to provide services to consumers. These companies’ industries include investing, credit, debt, money markets, lending, and insurance.

As a result, trust in these companies and banks is central. A customer deposits money and trusts that it will be there. The law enforces the bank’s obligation to make sure that the funds are already in the account.

When it comes to DeFi, there is no need to trust a third party, and all the profits can be pocketed by the user. The trust is secured by a piece of code on a blockchain, called a smart contract.

A brief refresher on smart contracts

The Ethereum blockchain is home to most DeFi protocols. Smart contracts are a program that sits on this blockchain.

The code for the smart contract allows financial transactions to occur based on conditions and rules contained within the smart contract’s code independently.

They offer significant potential to redefine the way independent entities engage in contractual agreements and exchange value. The agreement may involve any number of actions. Although the most common is releasing funds to appropriate parties under certain conditions.

The vending machine metaphor

In 1997, computer scientist Nick Szabo proposed a vending machine metaphor for a smart contract.

He explains that you can guarantee specific outputs with the right inputs, much like a vending machine where you input money and the right number, releases the desired snack.

A software program captures the logical relationship between inputs, actions, and sometimes outputs. Anyone can write a smart contract and deploy it to the network, although it does cost gas. According to Chainlink, over 90% of smart contract applications require some type of external data to be useful.

Currently, Application Programming Interfaces (APIs) enable access to the world’s data. These APIs enable insights as to how the world works. Without this data, smart contracts would have only limited on-chain applications.

Financial smart contracts need market information to determine settlements, insurance-related contracts need data from internet of things (IoT) nodes, and web data to determine how, when and to whom pay-outs should be made.

This is where oracles come in. They allow smart contracts to interact with off-chain APIs.

What is an oracle?

An oracle acts as a trusted, off-chain, real-time source of data that a smart contract requires to execute an action on the blockchain. The API supplies this real-time data. It can be provided by companies like Coinbase and Binance. 

Blockchains are built to be entirely deterministic. Consensus is how the blockchain agrees on what the state of a data value is after a transaction. If one traces all transactions from the first block of the chain to the current chain, one should find that the blockchain state after the last block is added is the same as the blockchain state after the first block.

Sometimes, when APIs are used, each node in a blockchain can be in a wildly different state, depending on how the API interacts with that node. Therefore, procuring data via APIs has implications for determining of data on the blockchain. This is where oracles come in.

Oracles enter data on a blockchain through an external transaction, ensuring consensus on the blockchain. An oracle will get the API and then report it on-chain as a transaction.

This makes oracles vital to the process of executing and ensuring smart contracts. Oracles query and authenticate the external data used to commit smart contract conditions. Some even verify this data as well, although this isn’t universal.

“For many protocols in which price feeds are important, DeFi oracles end up becoming one of the lifebloods of the protocol, as they provide qualities like high reliability and real-time price data that in turn helps the platform operate much more efficiently and in a more trustworthy way,” says Kevin Tai, Co-Founder of Linear Finance.

“That being said, there are also different qualities of oracles, and not all are built the same,” he says.

Building consensus on the blockchain

However, oracles are not perfect and inscrutable. The whole premise of blockchain is decentralization and removing a central point of failure. This failure is often from an institutional third party.

By using oracles that procure data from sources that are often centralized, it seems that oracles can nullify the whole point of using a blockchain. If a centralized oracle is corrupted, then the data being delivered on-chain may be incorrect and lead to smart contracts giving very different outcomes.

Think of Szabo’s vending machine example. Suppose the vending machine registers a higher amount than what is deposited. In that case, it will allow dispensing of something more expensive, causing a discrepancy with the stock levels and the money in the machine.

In the case of the vending machine, there may be some recourse, as there is a company that operates the vending machine. Blockchain transactions are immutable and irreversible, so there is no recourse in the event of an incorrect outcome.

A variety of oracle options

The examples above also highlight the range of Oracles on offer. Each iteration offers a different degree of centralization. These are centralized oracles, distributed multi-sig oracles, DPos oracles, prediction market oracles, and decentralized oracles.

A centralized oracle is where a single third party provides the data. This brings with it faster data acquisition but a central point of failure. If the third party censors data or goes out of business, the smart contract can be left with no data.

The distributed multi-sig oracle provides the smart contract with data from multiple whitelisted sources, on which any central tendency statistical operation (median, average, mean, et.) can be carried out. However, this is still susceptible to manipulation.

The Dpos oracle system is where whitelisted staked nodes can provide data. However, they run the risk of losing their stake if the oracle provides lousy data. They can be incentivized to provide good data, but collusion between nodes must be prevented.

A prediction market oracle is where participants vote on the correct outcome by placing a bet on it. It works if 51% of participants are honest and don’t want to lose money. This is less likely to result in manipulated data than a centralized oracle.

However, in a betting scenario, an oracle can be bribed, become a user themselves, and rig a bet’s outcome such that it is in their favor.

“However, these Oracle types, like the Optimistic Oracle from UMA, rely on the economic guarantee that the cost of corruption or bribery is always higher than the profit from corruption,” says Chandler De Kock, Growth Strategist at UMA.

When oracles fail — some notable examples

There have been some notable incidents involving unexpected smart contract behavior due to issues with data provided by the oracle.

In November 2020, DeFi exchange Compound lost $89 million via a liquidation action (loans sold at a discounted rate) executed by a smart contract.

Compound’s platform allows users to lend cryptocurrency to other people. To borrow crypto, a user must put up collateral greater in value than the amount they borrow. If the blockchain notices that the collateral has suddenly become undercollateralized, then the smart contract forces the loan to be liquidated.

In the case of Compound, the principal factor contributing to this liquidation was oracle data obtained from the oracle CoinbasePRO. It fed the smart contract the price of DAI at $1.3. The normal price of DAI is around $1.

To understand what caused the liquidation, a hypothetical scenario is helpful. If someone took a loan for $100 when DAI was $1, and the value of DAI suddenly increased to $1.3, the amount borrowed would increase to $130. If the person overcollateralized, that is, put up collateral higher than the amount borrowed, say $125, then the customer would get liquidated.

Many users experienced this during the Compound incident, resulting in the mass liquidation. In this situation, there was no clear evidence that the price was manipulated. However, it is technically possible that a malicious actor fooled the smart contract into thinking that the price of DAI had shot up to $1.3.

A lesson from Synthetix

Another example is the 2019 oracle malfunction that affected the DeFi platform Synthetix. Almost lost $1 billion as a result of incorrect data reporting.

Synthetix exposes users to the prices of assets typically considered outside the crypto space, such as fiat currencies. The platform relied on multiple off-chain oracles that were periodically updated on-chain to solicit aggregated fiat currency pricing data.

In June 2019, one of the off-chain oracles supplying data for the price of the Korean Won reported the wrong price. This incorrect price was 1000 times higher than the actual price.

Since only two price oracles were available for the Koren Won, and data between oracles are aggregated to minimize the effect of outliers. As a result, the aggregation was not able to resolve the higher price into something closer to the actual price.

A bot designed to spot and exploit anomalous prices performed transactions totaling $1 billion in turnover. However, the bot was not designed for malicious purposes but for regular trading procedures, and the owner agreed to return the funds.

The future of the oracle

Despite the noted failures of oracles across the space, they play a crucial role in smart contracts’ wide and varied use.

“It is challenging and costly to build and maintain oracles, yet we as an industry cannot exist without them,” says Leo Cheng, Co-Founder of C.R.E.A.M Finance.  

While there is often no way to predict where the DeFi space is headed, improved decentralization of oracles is a pretty good assumption. It is attractive because it aligns with the central values of DeFi and somewhat removes issues currently found in the space.

So far, these oracles have proven slow, expensive, and difficult to implement. This is because it is difficult to decentralize the process through which off-chain data makes its way onto the chain.

However, it is likely that these issues will be resolved gradually over time. Eventually improving the safety and experience of DeFi, as it attempts to make its way into the mainstream.

The post Promise and Problems of the DeFi Oracle — When Data Fails appeared first on BeInCrypto.

Similar to Notcoin - Blum - Airdrops In 2024

origin »

Streamr DATAcoin (DATA) на Currencies.ru

$ 0.0442001 (-2.73%)
Объем 24H $19.001m
Изменеия 24h: -3.64 %, 7d: -24.18 %
Cегодня L: $0.0435031 - H: $0.0483213
Капитализация $48.315m Rank 663
Цена в час новости $ 0.1485 (-70.24%)

defi data when fails oracle promise problems

defi data → Результатов: 126


Data shows institutions, not retail, are driving crypto DeFi Adoption

On-chain analysis firm Chainalysis has stated that the interest of institutional investors in decentralized finance (DeFi) apps and protocols have overtaken that of retail investors.   Institutional investors dominate Defi According to the report, DeFi has recorded a terrific year and has enjoyed widespread user adoption and usage amongst crypto enthusiasts.

2021-9-9 16:00


Фото:

I’m investing in UNI, LINK, and AAVE in September of 2021, and this is why!

Uniswap UNI/USD is one of the most popular decentralized trading protocols out there that facilitates automated trading for decentralized finance (DeFi) tokens. Chainlink LINK/USD is a blockchain abstraction layer that enables smart contracts to be universally connected and allows blockchains to interact with external data feeds, events, and payment methods.

2021-9-2 16:50


Фото:

Panther Protocol and StackOS Partner to Bring Privacy to DeFi and NFTs

PRESS RELEASE. Panther Protocol has joined forces with StackOS, a decentralized cloud protocol, to deliver privacy and data protection tools. As a meta-protocol focused on end-to-end privacy for any digital asset, Panther is of great interest to virtually all DeFi users looking to benefit from personal financial data protection and confidential cryptocurrency transactions. Panther zAssets […]

2021-7-13 00:00


Фото:

ETH 2.0 Contract Exceeds 6 Million Ether, Data Shows Ethereum Outperformed BTC in Q1 and Q2

Statistics show that the Ethereum 2.0 deposit contract has exceeded 6 million ether this week as more than $12.4 billion worth of ethereum is held in the contract today. Onchain metrics show that Ethereum has seen some significant drawdowns in recent times and decentralized finance (defi) activity has slowed compared to last summer’s statistics. Despite […]

2021-7-2 19:30


Sovryn Team Puts SOV on Uniswap, Project Crosses $50Mln Mark in TVL

Sovryn, a project aiming to bring decentralized finance (DeFi) to Bitcoin, has surpassed $50 million in total value locked (TVL). According to data tracking site DeFi Llama, the non-custodial, smart contract-based system for bitcoin lending, borrowing, and margin trading has seen an uptick in its TVL from just under $45 mln at the end of […] The post Sovryn Team Puts SOV on Uniswap, Project Crosses Mln Mark in TVL first appeared on BitcoinExchangeGuide.

2021-6-11 20:49


Фото:

SingularityNET Allies with Ocean Protocol As It Prepares to Launch AI-Based DeFi Fund

SingularityDAO, the first DeFi spin-off project of SungularityNET has partnered with leading decentralized data provider Ocean Protocol. SingularityDAO Allies with Ocean Protocol According to an announcement made today, SingularityNET’s first major DeFi offshoot, SingularityDAO has entered into a partnership with Ocean Protocol to tap the latter’s market-leading Ocean data sets. The alliance between the twoRead More

2021-5-19 15:41


Alpha Finance Lab launches oracle aggregator with data from Band Protocol and Chainlink

CryptoNinjas » Alpha Finance Lab launches oracle aggregator with data from Band Protocol and Chainlink Alpha Finance Lab, a DeFi Lab and on a mission to build an ecosystem of DeFi products, today announced it has launched the ‘Alpha Oracle Aggregator’ with data from two of the largest data oracles providers, Band Protocol and Chainlink, to ensure scalability, flexibility, and security.

2021-5-11 22:00


Solana’s Data Aggregator Step Finance Raises $2 Million in Private Sale

Solana's ecosystem continues to grow in leaps. One of its projects, Step Finance, saw $2 million infused into the network via a funding round led by Alameda Research. Step Finance Raises $2 Million In Private Sale In a press release on Tuesday, Solana-based decentralized finance (DeFi) protocol Step Finance announced that it had raised $2 […] The post Solana’s Data Aggregator Step Finance Raises Million in Private Sale first appeared on BitcoinExchangeGuide.

2021-4-15 21:18