Increment
Search…
⌃K

Architecture

Frontend demonstration: https://app.increment.fi/oracle

Mainnet:

Basic architecture: Multiple whitelisted-nodes independently fetching price data from multiple data sources to guard against potential node failure. Then the medianizer contract aggregates and picks the median data reported from whitelisted nodes.
There are two ways for nodes to perform price aggregation: median method and weighted-average method.
  • Median: When there are enough price origins, taking the median value can improve security more effectively.
  • Weighted-average: Based-on trading volume, liquidity depth, exchange reputation, etc., price will be fetch from different exchanges for different fungible tokens, applied with different weights.

Flow/USD price feed

It has 8 origins currently and is applied with the median method based on https://www.coingecko.com/en/coins/flow#markets:
  • Kraken Flow/USD
  • Coinbase Flow/USD
  • Binance Flow/USDT x (Latest USDT/USD On-Chain PriceOracle data)
  • OKX Flow/USDT x (Latest USDT/USD On-Chain PriceOracle data)
  • Gateio Flow/USDT x (Latest USDT/USD On-Chain PriceOracle data)
  • Huobi Flow/USDT x (Latest USDT/USD On-Chain PriceOracle data)
  • KuCoin Flow/USDT x (Latest USDT/USD On-Chain PriceOracle data)
  • Bybit Flow/USDT x (Latest USDT/USD On-Chain PriceOracle data)

USDT/USD price feed

It has 4 origins and is applied with the weighted-average method base on https://www.coingecko.com/en/coins/tether#markets:
  • Kraken USDT/USD - 50%
  • Coinbase USDT/USD - 35%
  • Bitfinex USDT/USD - 10%*
  • BinanceUS USDT/USD - 5% * There're concerns and rumors about Bitfinex & Tether manipulation / non-transparency. So although Bitfinex's USDT/USD volume is on par with Coinbase's, it only has a weight of 10%.

Stablecoins' price feed

  • FUSD/USD price feed is applied with a constant 1.0, as FUSD is 100%-backed, audited and regulated stablecoin issued by PrimeTrust.
  • USDC/USD price feed has 5 price origins and is applied with the median method based on https://www.coingecko.com/en/coins/usd-coin#markets:
    (* According to the recent SBV's collapse and Circle is holding a % of cash reserve in SBV, so USDC is not fixed to 1.0 face value any more since 03/11/2023.)
    • The "fair-value" 1.0
    • Kraken USDC/USD
    • (Bybit USDC/USDT) x (Latest USDT/USD On-Chain PriceOracle data)
    • (Binance USDC/USDT) x (Latest USDT/USD On-Chain PriceOracle data)
    • (OKX USDC/USDT) x (Latest USDT/USD On-Chain PriceOracle data)

Other fungible tokens' price feed:

  • BLT/USD price feed is applied with the weighted-average method based on https://www.coingecko.com/en/coins/blocto-token#markets:
    • Gateio BLT/USDT x (Latest USDT/USD On-Chain PriceOracle data) - 67%
    • Mexc BLT/USDT x (Latest USDT/USD On-Chain PriceOracle data) - 33%
    • *To on-board BLT token's price from Bloctoswap, it needs to integrate with care.
  • stFlow/USD price feed is computed with on-chain data by:
    • (stFlow/Flow taken from LiquidStaking Contract) x (Flow/USD On-Chain PriceOracle data)

Testnet:

Basic architecture: A single node fetching from multiple data sources. (Very much close to the mainnet's arch, but to save our resources and costs.)

Emulator:

Basic architecture: A single node SimpleOracle fetching from a single data source (Coingecko api) is used on emulator for local bootstrapping and testing.
Price data is periodically fetched, and it gets updated whichever below conditions happen first:
  • windowSize: e.g. 1200 - every 1,200 seconds
  • deviation: e.g. 0.01 - once Δ { fetchedData, lastData } > 0.01 * lastData