Most of the common blockchain audience has by now heard of DeFi, and the implications it has to those who know how to utilise it - but one thing that hasn’t been greatly explored is Price Oracles and their impact on these applications.

An oracle is a third party service that provides smart contracts with the data they need to execute, usually in relation to price.

I’ll take a look at some of the popular DeFi projects and the oracle system that they’re using, the pros and cons of them, before exploring some emerging solutions, and my suggestions on how to build a fair oracle/data retrieval ecosystem.

Traditional financial systems require intermediaries and therefore have single points of failure. They are easily corrupted, subject to fraud, security issues, and more. Smart contracts and decentralised networks gave us an opportunity to rebuild those systems in a universally accessible way while improving the traditional financial products built atop of them - particularly around lending and borrowing.

DeFi gives us new transparent systems that don’t rely on intermediaries.

One of the common themes of DeFi products is hybrid protocols that eliminate volatility while offering the benefits of decentralised networks. This is done by connecting crypto-assets to traditional assets, particularly those that are backed or related to a dollar peg.

Most notably MakerDAO, which uses this hybrid system to maintain an average peg of $1 - and requires volatile assets to be locked to mint the DAI ($1 token).

There are other hybrid systems that use concepts like supply elasticity, in the case of **Ampleforth **or the now distant memory of Base Protocol. They respond to changes in demand by adjusting circulating supply through a Rebase mechanic.

The intention with rebasing is to constantly rebalance demand with circulating supply which should result in a more stable price, but in a mania, as we recently experienced, this doesn’t quite work. Ampleforth soared to all-time highs, and because of so many positive re-bases (token airdrops to holders) when it was time to come down, it came down very hard and fast.

Oracles are the foundation of the entire ecosystem, as all applications depend on accurate data.

**Compound **is another DeFi product that allows the borrowing and lending of assets through collateral, adjusting interest rates based on demand on the borrow/lend side.

The Compound network is governed by COMP holders who can vote on its future through a proposal system - the more tokens you hold, the larger your votes. This has interesting implications depending on the number of administrators.

It sometimes calculates an average value of the oracle reports, and if there are not many administrators offering data, this could calculate an incorrect price, resulting in a big impact on many borrowers/lenders.

ChainLink has been a clear winner with the rise of DeFi products.

They’ve seen a meteoric increase of the use of their oracles over the last 18 months, and are currently utilised by some of the biggest DeFi teams in the world, including Kyber Network, Fulcrum, Opium Network, Synthetix and many more. The key benefit of ChainLink is that it uses multiple oracles to get a price.

Bzrx recently suffered a fault because it relied on just one oracle, which was Kyber Network for its price feed. This meant a sudden drop on Kyber would liquidate Bzrx positions also. By using ChainLink, the price feeds are spread and this can be prevented.

Despite that, a_ research report__ by Bowen Liu and Pawel Szalachowski of the University of Singapore showed that in the case of Synthetix ETH/USD oracle feed, there was a regular price deviation with an average of 2%._

While this can be regarded as a high standard, for now, it’s important we work towards more accurate price feeds and build more robust systems - which ChainLink are of course doing, but it’s nice to have healthy competition.

At present, most price feed oracles are deviating quite consistently from the actual correct figures.

A few percent might not seem much, but when we’re building new financial systems with lending/borrowing, liquidation events, and interest rates, we need accurate data.

#defi #blockchain #uniswap #oracles #chainlink #ethereum #finance

The Importance of Oracles in Decentralised Finance  | Hacker Noon
1.40 GEEK