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.
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.
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 DEXes
- Chainlink - 0x8606321723D9cA7db708A8b12DAd0A8a83f2F3bD
- KyberDMM - 0xb194735EdC3Ab0F77Ef1E961f7e14E12dC0CF2AF
- Mooniswap - 0x5F6a6428756CfAF96584286Ef9f7411621196f3A
- Synthetix - 0xb7EF687B322910f3315F91f9F4B9b4B77219ddb4
- Uniswap - 0xAdF7CC69626eB6F03F4F613832C84Cf62586A6Bb
- Equalizer - 0xEBA383DA9FCe0Ea0acB59A185A73D48dC089c73F
- ShibaSwap - 0x0fE8bD9CB73ADC66561330B648a8fC62b4F58943
- SushiSwap - 0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa
- UniswapV2 - 0xA21E47477DE9BbcDC962ee18a5E7D339c5a16D28
- UniswapV3 - 0x008D10214049593C6e63564946FFb64A6F706732
- Curve - 0x4e5Cee3B8Af0CB46EFAA94Cba5E0f25f8770BB19
- Pancake 3 - 0x7e72b1e0e6DD6F71e3b98f768E814613C2097e61
- Dodo - 0x0A7c4d89e1629f189Eb12dd716B178d1b90D9f66
- DodoV2 - 0x03aA019F3B78110e030c34e9fA98047A1f62859A
Supported wrappers
- WETH - 0x2b36053EB3BC1D68f51Bb7916D1503D1556f3ffc
- AaveV1 - 0x8C00a411Fe8983525F82CFCe34fe4B092d9E525d
- AaveV2 - 0x06cC74503B6d1eB6D4d6Bc402f48fC07b804105f
- AaveV3 - 0x0c8fc7a71C28c768FDC1f7d75835229beBEB1573
- StataTokens (AaveV3) - 0x1A75DF59f464a70Cc8f7383983852FF72e5F5167
- Compound - 0x7C327E1Ee66d4cF7F4053387241351FDc95A0c04
- CompoundV3 - 0xd24222B521337DABE4f1e56d351818fbf26905eD
- YVault - 0x9FF110f132d988bfa9bC6a21851Da1aF3aC6EaF8
- stETH - 0x26daCf7E879b18FE658326ddD3ABC0D6910B3E9F
- wstETH - 0x37eB78fE793E89353e46AEe73E299985C3B8d334
- CHAI - 0x6fE4926a0fCc78ab764b39f2738e1Dea145d7AC0
- Erc4626 - 0xE2B06CDBB6128347B11DE676DA8b51e1e1f7F76E
- USDS - 0x18645943628cf0FdCD1A9FF3a5b56d71203CFc22
Supported connectors
- ETH - 0x0000000000000000000000000000000000000000
- WETH - 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
- USDC - 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
- DAI - 0x6B175474E89094C44Da98b954EedeAC495271d0F
- USDT - 0xdAC17F958D2ee523a2206206994597C13D831ec7
- NONE - 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF
- WBTC - 0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599
- 3CRV - 0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490
Prev oracle versions (legacy)
- May-28-2021 - 0x07D91f5fb9Bf7798734C3f606dB065549F6893bb
- Apr-07-2023 - 0x3E1Fe1Bd5a5560972bFa2D393b9aC18aF279fF56
- add filtering prices by liquidity
- Jul-13-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-01-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- ApeSwap - 0xeD55d76Bb48E042a177d1E21AffBe1B72d0c7dB0
- BakerySwap - 0x82b6B75F5fEabbfD370D45daCEFae3D5c06099DA
- BSCswap - 0xD4eFb5998DFBDFB791182fb610D0061136E9DB50
- Demax - 0x7bdc6954e1c7869B4147A320d589689F628E9921
- KyberDMM - 0xb194735EdC3Ab0F77Ef1E961f7e14E12dC0CF2AF
- Mooniswap - 0x5F6a6428756CfAF96584286Ef9f7411621196f3A
- Pancake 1 - 0x1b947aF8b3dd6aa96F8726cd92c894D0Ba6367a3
- Pancake 2 - 0xB9fa95a38D50c5Bad1eA2b4E85e106Fe886cCb3A
- Pancake 3 - 0x7e72b1e0e6DD6F71e3b98f768E814613C2097e61
- Thugswap - 0x7bBc0156c31A19097eEd6B636AA2F4AB8A31BFD9
- UniswapV2 - 0x4C5B9573dE7660c097F1a21050038378CD691066
- UniswapV3 - 0x008D10214049593C6e63564946FFb64A6F706732
Supported wrappers
- AaveV3 - 0x0c8fc7a71C28c768FDC1f7d75835229beBEB1573
- StataTokens (AaveV3) - 0x1A75DF59f464a70Cc8f7383983852FF72e5F5167
- Venus - 0x11DEE30E710B8d4a8630392781Cc3c0046365d4c
- WBNB - 0x54431918cec22932fcf97e54769f4e00f646690f
Supported connectors
- NONE - 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF
- WBNB - 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c
- DAI - 0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3
- ETH - 0x2170Ed0880ac9A755fd29B2688956BD959F933F8
- USDC - 0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d
- BSC-USD - 0x55d398326f99059fF775485246999027B3197955
- BUSD - 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56
- 1INCH - 0x111111111117dC0aa78b770fA6A738034120C302
Prev oracle versions (legacy)
- May-28-2021 - 0xfbD61B037C325b959c0F6A7e69D8f37770C2c550
- Apr-06-2023 - 0x27950ecAeBB4462e18e8041AAF6Ea13cA47Af001
- add filtering prices by liquidity
- Jul-13-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-02-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- QuickSwap - 0xeec05e0D8F7D3f56CECE2026Feaf41b09B423790
- QuickSwapV3 - 0x07B040d681AB25713eC722789e00520d3692CA39
- ComethSwap - 0x11BFd590f592457b65Eb85327F5938141f61878a
- DFYN - 0xeD55d76Bb48E042a177d1E21AffBe1B72d0c7dB0
- SushiSwap - 0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa
- UniswapV2 - 0x4C5B9573dE7660c097F1a21050038378CD691066
- UniswapV3 - 0x008D10214049593C6e63564946FFb64A6F706732
- Curve - 0x4e5Cee3B8Af0CB46EFAA94Cba5E0f25f8770BB19
Supported wrappers
- WMATIC - 0xA0446D8804611944F1B527eCD37d7dcbE442caba
- AaveV2 - 0x138CE40d675F9a23E4D6127A8600308Cf7A93381
- AaveV3 - 0x0c8fc7a71C28c768FDC1f7d75835229beBEB1573
- StataTokens (AaveV3) - 0x1A75DF59f464a70Cc8f7383983852FF72e5F5167
- CompoundV3 - 0xAc63D130525c251EbB24E010c2959a98c80B993a
Supported connectors
- MATIC - 0x0000000000000000000000000000000000000000
- NONE - 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF
- WMATIC - 0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270
- USDC.e - 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174
- USDC - 0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359
- USDT - 0xc2132D05D31c914a87C6611C10748AEb04B58e8F
- WETH - 0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619
Prev oracle versions (legacy)
- May-28-2021 - 0x7F069df72b7A39bCE9806e3AfaF579E54D8CF2b9
- Apr-05-2023 - 0xf023D71EfB08339EA28F0C186AE130c74D44C58c
- add filtering prices by liquidity
- Jul-13-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-01-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- UniswapV2 - 0x4C5B9573dE7660c097F1a21050038378CD691066
- UniswapV3 - 0x008D10214049593C6e63564946FFb64A6F706732
- Velodrome Finance - 0x3Ca884d47b84B147Ca8E70003942c0B614603B39
- VelodromeV2 - 0x8606321723D9cA7db708A8b12DAd0A8a83f2F3bD
- Synthetix - 0xb7EF687B322910f3315F91f9F4B9b4B77219ddb4
- Slipstream - 0xcdEee819aEf73511331522552Ca1E54e771D40ed
- Curve - 0x4e5Cee3B8Af0CB46EFAA94Cba5E0f25f8770BB19
Supported wrappers
- AaveV3 - 0x0c8fc7a71C28c768FDC1f7d75835229beBEB1573
- StataTokens (AaveV3) - 0x1A75DF59f464a70Cc8f7383983852FF72e5F5167
- // todo: add BaseCoinWrapper
Supported connectors
- NONE - 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF
- WETH - 0x4200000000000000000000000000000000000006
- USDC.e - 0x7F5c764cBc14f9669B88837ca1490cCa17c31607
- USDC - 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85
- USDT - 0x94b008aA00579c1307B0EF2c499aD98a8ce58e58
- DAI - 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1
- WBTC - 0x68f180fcCe6836688e9084f035309E29Bf0A2095
- OP - 0x4200000000000000000000000000000000000042
Prev oracle versions (legacy)
- May-28-2021 - 0x11DEE30E710B8d4a8630392781Cc3c0046365d4c
- Apr-06-2023 - 0x59Bc892E1832aE86C268fC21a91fE940830a52b0
- add filtering prices by liquidity
- Jul-13-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-01-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- DXswap - 0xc197Ab9d47206dAf739a47AC75D0833fD2b0f87F
- SushiSwap - 0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa
- UniswapV2 - 0x4C5B9573dE7660c097F1a21050038378CD691066
- UniswapV3 - 0x008D10214049593C6e63564946FFb64A6F706732
- Curve - 0x4e5Cee3B8Af0CB46EFAA94Cba5E0f25f8770BB19
Supported wrappers
- WETH - 0x0F85A912448279111694F4Ba4F85dC641c54b594
- AaveV3 - 0x0c8fc7a71C28c768FDC1f7d75835229beBEB1573
- StataTokens (AaveV3) - 0x1A75DF59f464a70Cc8f7383983852FF72e5F5167
- CompoundV3 - 0x04098C93b15E5Cbb5A49651f20218C85F202Cd27
Supported connectors
Prev oracle versions (legacy)
- Sep-14-2021 - 0x735247fb0a604c0adC6cab38ACE16D0DbA31295F
- Apr-03-2023 - 0x59Bc892E1832aE86C268fC21a91fE940830a52b0
- add filtering prices by liquidity
- Jul-13-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-01-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- Joe - 0xc197Ab9d47206dAf739a47AC75D0833fD2b0f87F
- Pangolin - 0xE93293A6088d3a8abDDf62e6CA1A085Cec97D06F
- SushiSwap - 0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa
- UniswapV2 - 0x4C5B9573dE7660c097F1a21050038378CD691066
- UniswapV3 - 0x008D10214049593C6e63564946FFb64A6F706732
- Curve - 0x4e5Cee3B8Af0CB46EFAA94Cba5E0f25f8770BB19
Supported wrappers
- WAVAX - 0x046605839c01C54921f4aA1AAa245E88227707D8
- AaveV2 - 0x8Aa57827C3D147E39F1058517939461538D9C56A
- AaveV3 - 0x0c8fc7a71C28c768FDC1f7d75835229beBEB1573
- StataTokens (AaveV3) - 0x1A75DF59f464a70Cc8f7383983852FF72e5F5167
Supported connectors
- NONE - 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF
- AVAX - 0x0000000000000000000000000000000000000000
- WAVAX - 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7
- WETH.e - 0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB
- USDT.e - 0xc7198437980c041c805A1EDcbA50c1Ce5db95118
- WBTC.e - 0x50b7545627a5162F82A992c33b87aDc75187B218
- USDC.e - 0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664
- USDC - 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E
Prev oracle versions (legacy)
- Dec-23-2021 - 0xBd0c7AaF0bF082712EbE919a9dD94b2d978f79A9
- Apr-03-2023 - 0xf023D71EfB08339EA28F0C186AE130c74D44C58c
- add filtering prices by liquidity
- Jul-13-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-01-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- Honeyswap - 0xE93293A6088d3a8abDDf62e6CA1A085Cec97D06F
- Levinswap - 0x52a8193C7f42b75F27e4ce96f8ddBA7e854453Ef
- Swapr - 0x27950ecAeBB4462e18e8041AAF6Ea13cA47Af001
- SushiSwap - 0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa
- Curve - 0x4e5Cee3B8Af0CB46EFAA94Cba5E0f25f8770BB19
Supported wrappers
- WXDAI - 0xB89A664FdAf504CDc7826B97Ba6e522d9b78dbE7
- AaveV3 - 0x0c8fc7a71C28c768FDC1f7d75835229beBEB1573
- StataTokens (AaveV3) - 0x1A75DF59f464a70Cc8f7383983852FF72e5F5167
Supported connectors
- XDAI - 0x0000000000000000000000000000000000000000
- WXDAI - 0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d
- NONE - 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF
- WETH - 0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1
- HNY - 0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9
- USDC - 0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83
- USDT - 0x4ECaBa5870353805a9F068101A40E0f32ed605C6
Prev oracle versions (legacy)
- Dec-23-2021 - 0x142DB045195CEcaBe415161e1dF1CF0337A4d02E
- Apr-06-2023 - 0x3Ce81621e674Db129033548CbB9FF31AEDCc1BF6
- add filtering prices by liquidity
- Jul-13-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-02-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- Solidex - 0x3Ce81621e674Db129033548CbB9FF31AEDCc1BF6
- SpiritSwap - 0xc197Ab9d47206dAf739a47AC75D0833fD2b0f87F
- Spooky - 0xE93293A6088d3a8abDDf62e6CA1A085Cec97D06F
- SushiSwap - 0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa
- Curve - 0x4e5Cee3B8Af0CB46EFAA94Cba5E0f25f8770BB19
Supported wrappers
Supported connectors
Prev oracle versions (legacy)
- Mar-21-2022 - 0xE8E598A1041b6fDB13999D275a202847D9b654ca
- Apr-04-2023 - 0xFdCB8fA524f84081988e6065Fc8EF060f2CF0C27
- add filtering prices by liquidity
- Jul-13-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-02-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- Trisolaris - 0xD4eFb5998DFBDFB791182fb610D0061136E9DB50
- WannaSwap - 0x7bdc6954e1c7869B4147A320d589689F628E9921
- NearPAD - 0x3E1Fe1Bd5a5560972bFa2D393b9aC18aF279fF56
- AuroraSwap - 0xd8C7661C2bA6E9732613C15780f9fBBD55d8bf9c
- Dodo - 0x0A7c4d89e1629f189Eb12dd716B178d1b90D9f66
- DodoV2 - 0x03aA019F3B78110e030c34e9fA98047A1f62859A
- Curve - 0x4e5Cee3B8Af0CB46EFAA94Cba5E0f25f8770BB19
Supported wrappers
Supported connectors
Prev oracle versions (legacy)
- May-26-2022 - 0xE4E0552452e5cC1306A2bF5B2Fd9b1eA19418795
- Mar-31-2023 - 0xeD55d76Bb48E042a177d1E21AffBe1B72d0c7dB0
- add filtering prices by liquidity
- Jul-13-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-02-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- KlaySwap - 0xf023D71EfB08339EA28F0C186AE130c74D44C58c
- ClaimSwap - 0xFdCB8fA524f84081988e6065Fc8EF060f2CF0C27
Supported wrappers
Supported connectors
Prev oracle versions (legacy)
- Aug-02-2022 - 0x138CE40d675F9a23E4D6127A8600308Cf7A93381
- Apr-06-2023 - 0x89314d57A8A4E636A00922ac289BC3a9a69C4361
- add filtering prices by liquidity
- Jul-13-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-02-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- MuteSwitch - 0x9b6b2D846Ef69b1eA7D1A865E6E30A4D35AD8776
- Syncswap - 0x226b15358e2DF022ada190fc3Ac4a32ea26C18c8
Supported wrappers
Supported connectors
Prev oracle versions (legacy)
- Mar-28-2023 - 0x1ec0a5F6dc07E93491426d5aAAc3E2BC505Ef41C
- Jun-05-2023 - 0xEE053a8333B7F804bE050B3D73289C6dbbEB2BFd
- Jul-12-2023 - 0xC762d56614D3411eC6fABD56cb075D904b801613
- fix math in some cases with variable overflow
- use create3 for deploying the same address on different networks
- Sep-02-2023 - 0xc9bB6e4FF7dEEa48e045CEd9C0ce016c7CFbD500
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xdCa3e52Af86F8244fd0EDA8064Dc30E154d93033
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x739B4e7a3ad8210B6315F75b24cfe0D3226f6945 - current implementation
- add methods to return oracles prices and liquidity at the same time
Supported DEXes
- BaseSwap - 0xb57CdEC62Df2AA93AC4C2449Eb50eB4d2f264f3e
- RocketSwap - 0x3EB7BFE1217b97d19e740C3587f2b12D00abc0Bc
- SwapBased - 0xA57eE57aa7af7c43265A8376c3d54543Cc78C089
- DackieSwap - 0x2c53D99f9458CB43b685a6d9Cd7144290b7C6B13
- HorizonDex - 0x1fA155F63335c1FB4b932d5F1BF50b50ffF1bC0f
- SushiSwapV3 - 0xE4186059f521C715d2977922A6e8704d9C342e5A
- UniswapV2 - 0x4C5B9573dE7660c097F1a21050038378CD691066
- UniswapV3 - 0x008D10214049593C6e63564946FFb64A6F706732
- VelocimeterV2 - 0xDc6815ff5B65b1d3bAB4604fF92126EaB0539353
- Aerodrome - 0x63c63C5F5B6cdFDb020320A1c392Ef933e37Bd33
- Slipstream - 0xB5d6422B5237228C8A9891F9DD94BCaBB523D247
Supported wrappers
- WETH - 0x3Ce81621e674Db129033548CbB9FF31AEDCc1BF6
- AaveV3 - 0x0c8fc7a71C28c768FDC1f7d75835229beBEB1573
- StataTokens (AaveV3) - 0x1A75DF59f464a70Cc8f7383983852FF72e5F5167
- CompoundV3 - 0x3afA12cf9Ac1a96845973BD93dBEa183A94DD74F
- Erc4626 - 0xE2B06CDBB6128347B11DE676DA8b51e1e1f7F76E
Supported connectors
Prev oracle versions (legacy)
- Aug-09-2023 - 0x52cbE0f49CcdD4Dc6E9C13BAb024EABD2842045B
- Sep-02-2023 - 0x0AdDd25a91563696D8567Df78D5A01C9a991F9B8
- add calculation optimizations
- expand calculations to OraclePrices library
- Jul-03-2024 - 0xf224a25453D76A41c4427DD1C05369BC9f498444
- fix wrappedDstTokens price usage
- Aug-15-2024 - 0x00000000000D6FFc74A8feb35aF5827bf57f6786 - current implementation
- add methods to return oracles prices and liquidity at the same time
This section provides a comprehensive guide on deploying an oracle, including the nuances of script parameters and additional setup steps. Follow these steps to ensure accurate and reliable oracle deployment for price data retrieval.
- Identify DEXes with Sufficient Liquidity: Begin by surveying the network for Decentralized Exchanges (DEXes) that offer sufficient liquidity. This ensures the oracle can retrieve reliable and accurate price data.
- Select Supported DEXes: Choose DEXes that are supported by
SpotPriceAggregator
or are forks of supported protocols. Supported DEXes can be found in thecontracts/oracles/
directory of the project.
- Configure the Network Settings:
- Skip this step if your network is supported. This can be checked by observing whether the network is mentioned (registered or not) during a test run, visible in the console output. This verification can be done also by reviewing the
registerAll
method in theNetworks
class. If your network is listed there, it's considered supported, and no further action is required for registration in this step. - Update the Hardhat settings file to configure the network.
- Utilize the
Networks
class from solidity-utils for network registration. - Example configuration snippet:
... const { Networks } = require('@1inch/solidity-utils/hardhat-setup'); const net = new Networks(true, 'mainnet', true); net.register(your_network_name, networkId, process.env.YOURNETWORK_RPC_URL, process.env.YOURNETWORK_PRIVATE_KEY, etherscan_network_name, process.env.YOURNETWORK_ETHERSCAN_KEY); const networks = net.networks; const etherscan = net.etherscan; ...
- Skip this step if your network is supported. This can be checked by observing whether the network is mentioned (registered or not) during a test run, visible in the console output. This verification can be done also by reviewing the
-
Set Environment Variables: Define necessary environment variables in the
.env
file located at the project root. Include variables such asYOURNETWORK_RPC_URL
,YOURNETWORK_PRIVATE_KEY
, andYOURNETWORK_ETHERSCAN_KEY
with appropriate values:-
YOURNETWORK_RPC_URL
: The RPC URL for accessing your network's node. This URL can support the HTTP header 'auth-key'. To use this header, append the header value to the URL using the|
symbol. For example:http://localhost:8545|HeaderValue
. This format allows you to authenticate requests to your node. -
YOURNETWORK_PRIVATE_KEY
: Your account's private key, which should be entered without the0x
prefix. This key is used for deploying contracts and executing transactions on the network. -
YOURNETWORK_ETHERSCAN_KEY
: The API key for an Etherscan-like blockchain explorer that supports your network. This key is necessary for verifying and publishing your contract's source code. Ensure you register for an API key with a compatible explorer service for your network.
-
- Deploy Oracles:
- Use the deploy script located at
deploy/commands/simple-deploy.js
. You can find a description of the script and how to use it in the scripts description. - Configure the
PARAMS
object for each protocol you wish to deploy an oracle for. The parameters include:- contractName: Name of the contract from the
contracts/oracles/
directory. - args: Arguments required by the contract (See contract's constructor).
- deploymentName: A name for your deployment, which will be used to create a file in the
deployments/
directory.
- contractName: Name of the contract from the
- Ensure the
skip
flag is set tofalse
to proceed with deployment. - Example command for deployment:
yarn && yarn deploy <your_network_name>
.
- Use the deploy script located at
- Deploy Wrappers:
- Follow similar steps as step 5 to deploy necessary wrappers and
MultiWrapper
. You can find different wrappers in thecontracts/wrappers/
directory. AfterMultiWrapper
is deployed, it will be possible to edit these lists of wrappers.
- Follow similar steps as step 5 to deploy necessary wrappers and
- Deploy OffchainOracle:
- Follow similar steps as step 5 to deploy the
OffchainOracle
. Make sure to include the deployed oracles (from step 5),MultiWrapper
with wrappers (from step 6) and specifying the tokens you wish to use as connectors for price discovery. AfterOffchainOracle
is deployed, it will be possible to edit these lists of oracles and connectors.
- Follow similar steps as step 5 to deploy the
For any questions or further assistance, don't hesitate to reach out (for example via issue). This guide aims to facilitate your oracle deployment process, ensuring a smooth and reliable setup.