From 9fe3fd71918c50696a8a89cd08e78b0ba0d7ada3 Mon Sep 17 00:00:00 2001 From: bojangles123 <102300572+bojangles123@users.noreply.github.com> Date: Mon, 30 Oct 2023 20:11:39 +0000 Subject: [PATCH] Update oracle.md --- _pages/oracle.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/_pages/oracle.md b/_pages/oracle.md index 9f6e7097e9..7c913096b4 100644 --- a/_pages/oracle.md +++ b/_pages/oracle.md @@ -6,12 +6,17 @@ category: Jekyll layout: post --- -## Fyde's Need for Oracles -The Fyde Protocol enables people to deposit their assets to mint TRSY, burn their TRSY to withdraw some assets, and swap the USD value of AssetA for the USD value of AssetB. To support these functions, the protocol requires oracles to provide price feeds for all supported assets. +## Fyde's need for oracles +Fyde Protocol operates by allowing users to deposit assets to mint TRSY, burn TRSY for asset withdrawal, and swap the USD value of one asset for another. To facilitate these functionalities, accurate and current price information for all supported assets is crucial. This is where oracles come into play, providing reliable and real-time price feeds, ensuring the protocol functions accurately and securely. ## Fyde's oracle design -Fyde uses a combination of Chainlink and Uniswap V3 TWAP oracles with a 30 minutes time window. Whenever there is a need for an oracle value, the protocol will aggregate price from Chainlink and Uniswap V3 TWAP and implement various circuit breaker along the aggregation. -We acknowledge the limitations of using on-chain TWAP and the high risk of attack and manipulation. To reduce the risk of price manipulation, we have a whitelist criterion for assets in the protocol based on sufficient liquidity in the Uniswap V3 pool. +Fyde’s design incorporates a blend of Chainlink and Uniswap V3 TWAP (Time-Weighted Average Price) oracles, utilizing a 30-minute time window to fetch price data. This hybrid approach aims to harness the benefits of both Chainlink’s decentralized oracle network and Uniswap V3’s on-chain TWAP oracles to achieve more robust and reliable price feeds. + +## Aggregation and circuit breakers +When the protocol needs to ascertain the value of an asset, it doesn’t rely on a single source. Instead, it aggregates prices from Chainlink and Uniswap V3 TWAP, enhancing reliability and accuracy. Alongside aggregation, the implementation of circuit breakers adds an extra layer of security. Circuit breakers can halt operations based on predefined conditions, adding robustness against abnormal price movements or possible oracle failures. + +## Managing risks and asset whitelisting +Recognizing the potential risks associated with on-chain TWAPs, such as susceptibility to attacks and price manipulations, Fyde implements several in-depth risk management strategies. One such strategy is the application of a stringent whitelist criterion, ensuring that only assets meeting specific standards, such as substantial liquidity in Uniswap V3 pools, notable trading volumes and market caps, doxxed founders, etc. are integrated into the protocol. Another strategy involves assessing the historical price performance of a token in comparison to a broad spectrum of crypto tokens over the same timeframe (drilling down to the minute and second level), ensuring that the token exhibits "normal" price behavior in the moments leading up to it's deposit into the pool. These precautions aim to mitigate the risks of price manipulations, thereby maintaining the integrity and stability of the Fyde Protocol’s operations. ### Oracle flow @@ -22,9 +27,7 @@ We acknowledge the limitations of using on-chain TWAP and the high risk of attac ### Circuit breaker implementation -We have implemented a circuit breaker to prevent the use of incorrect prices. -When it comes to Chainlink, we mainly check if the price is up-to-date and if the data is correct. -For Uniswap, we compare the values of the TWAP 30 min and TWAP 1 min to avoid consumming prices during periods of volatility. +Embedded within Fyde are circuit breakers to prevent the use of incorrect prices. For Chainlink, primary checks involve ensuring that the price is up-to-date and the data is accurate. In the case of Uniswap, Fyde compares the values between the 30-minute TWAP (Time-Weighted Average Price) and the 1-minute TWAP to avoid consuming prices during periods of heightened volatility.