← Back to home

Yield Volatility Oracle

Python

A yield volatility oracle and protocol for synthetic derivatives based volatility

Problem Statement

We're building a service that can provide a volatility rating for short-term (10 days), mid-term (50 days), and long-term (100 days) of various yield farming opportunities. The problems we're attempting to solve/use-cases are:In a bull/bear market could it be profitable to stake X token?Provide a Web UI dashboard to determine the potential profitability of various yield farming opportunities.Provide a service for liquidity bot's to useWhen running calculations for Uniswap V2, the service will take an input of the token pair that uniswap supports and a volatility range. EX: (USDT/ETH, long-term) and this will return our volatility score.We could expand this idea to support other platforms as well, for example, Balancer and/or 1inch.This information would be available off-chain from our web-ui and possibly an API, as well as available on-chain through our oracle or our smart contracts.

Solution

'- The graph (uniswap v2 subgraphs) for polling new pools and pairs as well as historical data for themChainlink for running our oracle with an external bridgepython for our application that calculates volatilityUMA for offering LSP's based on volatility.We wrote a python application that can perform calculations on the historical daily APY for the supplied days in the day range and then calculates the standard deviation of the daily apy vector. This application makes use of subgraphs to find its data. This application runs as a Chainlink external adapter that we've configured for our chainlink nodes. When our oracle job runs it then writes its results on-chain.

Hackathon

HackMoney 2021

2021

Contributors