rori4 / spot-price-aggregator

Liquidity-weighted dex price oracle for offchain price discovery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spot Price Aggregator

The 1inch spot price aggregator is a set of smart contracts that extract price data for tokens traded on DEXes from the blockchain. To avoid price manipulations within a transaction, the spot price aggregator should ONLY be used off-chain. DO NOT use it on-chain. For off-chain usage see Examples section below.

Wrappers

To handle wrapped tokens, such as wETH, cDAI, aDAI etc., the 1inch spot price aggregator uses custom wrapper smart contracts that wrap/unwrap tokens at the current wrapping exchange rate.

Connectors

If no direct liquidity pair exists between two tokens, the spot price aggregator calculates rates for those coins using another token that has pairs with both of them – a connector token.

Supported Deployments

Ethereum Mainnet

Supported DEXes

  • Mooniswap
  • 1inch Liquidity Protocol V1.1
  • Uniswap V1
  • Uniswap V2
  • Sushiswap
  • Equalizer.fi
  • Uniswap V3
  • Synthetix
  • Chainlink
  • Shibaswap

Supported wrappers

  • Aave V1
  • Aave V2
  • Compound
  • Fulcrum V1
  • Fulcrum V2
  • WETH
  • Cream

Supported connectors

  • ETH
  • WETH
  • DAI
  • USDC
  • USDT
  • WBTC
  • 1INCH

Binance Smart Chain

Supported DEXes

  • 1inch Liquidity Protocol V1.1
  • Pancakeswap
  • Streetswap
  • Bakeryswap
  • Julswap
  • Demaxswap

Supported wrappers

  • Venus
  • WBNB

Supported connectors

  • BNB
  • WBNB
  • ETH
  • DAI
  • USDC
  • USDT
  • BUSD

Polygon

Supported DEXes

  • QuickSwap
  • ComethSwap
  • SushiSwap
  • Dfyn

Supported wrappers

  • AAVE
  • WMATIC

Supported connectors

  • MATIC
  • WMATIC

Kovan

Supported DEXes

  • 1inch Liquidity Protocol V1.1
  • Uniswap V2
  • Uniswap V1

Supported wrappers

  • Venus
  • WETH

Supported connectors

  • ETH
  • WETH

Optimism

Supported DEXes

  • Uniswap V3
  • Synthetix

Arbitrum

Supported DEXes

  • Uniswap V3
  • Sushiswap
  • Swapr

Avax

Supported DEXes

  • Trader Joe
  • Pangolin Exchange

xDai

Supported DEXes

  • Honeyswap
  • Levinswap
  • Swapr
  • Sushiswap

Examples

About

Liquidity-weighted dex price oracle for offchain price discovery

License:MIT License


Languages

Language:JavaScript 70.7%Language:Solidity 29.3%