joshstevens19 / simple-uniswap-sdk

Uniswap SDK which handles the routes automatically for you, changes in trade quotes reactive subscriptions, exposure to formatted easy to understand information, bringing back the best trade quotes automatically, generating transactions for you and much more.
MIT License
188 stars 95 forks source link

UniswapError: No routes found on Mainnet #16

Closed it-n-ova closed 2 years ago

it-n-ova commented 3 years ago

Created liquidity pool at pair MTT > USDT on Mainnet. Set up disableMultihops: false, but it still works only at MTT <-> USDT, on any other pair i got an error like: UniswapError: No routes found for MTT > DAI

On uniswap app works great with any other tokens.

fromTokenContractAddress: '0xe0c15f5066FCbAfad6d1972125fB0cC1d2200bbe',
toTokenContractAddress: '0x6b175474e89094c44da98b954eedeac495271d0f',
uniswapVersions: [UniswapVersion.v2, UniswapVersion.v3],
chainId: 1,
settings: new UniswapPairSettings({
    slippage: 0.01,
    deadlineMinutes: 20,
    disableMultihops: false,
    uniswapVersions: [UniswapVersion.v2, UniswapVersion.v3]
})

I am stuck, please help to find out solution.

joshstevens19 commented 3 years ago

hey thanks for this issue, right now UniswapVersion.v3 only handles direct routes aka MIT > DAI it doesn't look at any other routes to take at the current time mainly because v3 was so new when we supported this. This is something we need to bring into the lib, will try to get some time to look and support this logic as soon as I get some time. UniswapVersion.v2 looks at every route possible but yes as said v3 has not been extended in that way yet.

Sorry for the inconvenience

joshstevens19 commented 2 years ago

now looks at many routes