Balancer Protocol
Published in

Balancer Protocol

What Kind of Oracles Do We Need for DeFi Derivatives?

Oracle is one of the key ingredients of the DeFi infrastructure. Among all the solutions, decentralized exchanges are a natural one, simply because they are the hubs where trades take place and prices are discovered. In this regard, Vitalik Buterin even proposed UNI should become an oracle token.

As a DeFi derivative project, Deri Protocol highly depends on oracle solutions. In fact, Deri Protocol represents a group of especially demanding users of oracles, the DeFi derivative dApps. Please note that there are indeed derivative dApps independent of oracles, which are not included in the scope of this discussion. Because of the business nature, the following properties are required for an oracle to be adopted for derivative use cases. Due to these requirements, while Uniswap is highly expected by Vitalik, its current oracle module is not suitable for derivatives.

  1. Flashloan-proof.
  2. Low-latency. Following Vitalik’s phrasing, derivatives belong to the category of not-okay-with-high-latency use cases.
  3. Non-maintenance. Since blockchain is a state machine without the ability to take actions proactively, any maintenance job (e.g. regularly recording the TWAP values) would be a pain in the neck.
  4. Tradable price. Price is better tradable and backed with sufficient liquidity.

And here comes the good news. Recently with the rollout of Balancer V2 , Balancer has provided a comprehensive solution for derivative use cases. This is achieved by storing the snapshots of the prices at the beginning of the last block with swaps (lastChangeBlock) for the concerning token pairs.

The Balancer Labs team was probably the first to realize that the demands for oracle are divergent in different use cases. Therefore they have rolled out different types of oracles tailored for different scenarios. For example, algorithmic stablecoins and collateralized loans are usually pretty tolerant of latencies. Thus the TWAP-based oracle solution works just fine for them. However, that is not the case for Deri Protocol and other derivative dApps depending on oracles. If Deri were trading at prices with significant latencies, it would be front-run by high-frequency traders. Such exploitations would simply destroy the whole project.

To tackle the pricing issue in the not-okay-with-high-latency use cases, Balancer V2 rolled out the so-called instant oracle. With this oracle, we can get the most up-to-date prices with all the requirements met:

  1. Flashloan-proof: users can avoid flashloan manipulation with the Balancer V2 oracle prices.
  2. Low-latency: you can either get the price of the current block or the price snapshot at the beginning of the last block with swaps. In other words, you can get the most up-to-date prices that are not subject to flashloan manipulations.
  3. Non-maintenance: you get the prices as you go and no prerequisite job is necessary.
  4. Tradable price: The prices you get from Balancer V2 oracle are the real trading prices in the pools, which means you could buy/sell at these prices with Balancer. (You do need to pay attention to the pool’s TVL for slippage management).

Therefore, for any token pair with sufficient TVL in the pool, Balancer V2 provides a secure, efficient, and convenient oracle for its price. This is a cornerstone for DeFi derivatives and a milestone in DeFi history.

About Deri Protocol

Deri Protocol is a decentralized protocol for users to exchange risk exposures precisely and capital efficiently. It is the DeFi way to trade derivatives: to hedge, to speculate, to arbitrage, all on chain. This is achieved by liquidity pools playing the roles of counterparties for users. With Deri Protocol, risk exposures are tokenized as NFTs so that they can be imported into other DeFi projects for their own financial purpose. Having provided an effective on-chain mechanism to exchange and hold risk, Deri Protocol has minted one of the most important blocks of the DeFi infrastructure.

Website | Twitter | Github | Telegram

About Balancer

Balancer Protocol allows for automated portfolio management and providing liquidity turning the concept of an index fund on its head: instead of paying fees to portfolio managers, you collect fees from traders who rebalance your portfolio by following arbitrage opportunities. Developers leverage Balancer as a permissionless building block to innovate freely and create new treasury management systems. Balancer Lab’s mission is to become the primary source of DeFi liquidity by providing the most flexible and powerful platform for asset management and decentralized exchange.

Website | Twitter | Discord

--

--

--

Balancer Protocol allows for automated portfolio management, turning the concept of an index fund on its head: instead of paying fees to portfolio managers, you collect fees from traders who rebalance your portfolio by following arbitrage opportunities.

Recommended from Medium

Shardeum, solution to the scalability trilemma

BigchainDB, a database on blockchain steroids

Cocos-BCX TestNet was upgraded to V1.1.3

How Blockchain Will Transform the Manufacturing Industry

When I sent my non-existent cat live on chain

dfuse is coming to the WORBLI Network

The Optimistic Layer 2 Wars

🔥 #DeFi #Polygon

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Deri Protocol

Deri Protocol

Deri Protocol = (Perpetual Futures + Everlasting Options) x Decentralized.

More from Medium

Uniswap v3 hackathon Deep Dive

Why does Olympus DAO work

Introducing Rai liquidity vaults in partnership with Reflexer!

Introducing Alpha Pro