Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while getting quote in uniswap UI in sepolia network for uniswap v2 router #914

Open
kr-manav opened this issue Nov 9, 2024 · 1 comment

Comments

@kr-manav
Copy link

kr-manav commented Nov 9, 2024

I am facing an issue in getting the quote of my token while swapping on Sepolia Network. Below is the detailed explanation:

I deployed a token in Sepolia network and added liquidity on Uniswap V2 from the Uniswap UI itself. Now, if i try to swap the token from the UI, the quote api fails after throwing the error as “No quotes available”. For a check, i added the liquidity on Uniswap V3 from the UI itself. Then, I am getting the quote api result from the uniswap v3 pool, but not from V2 pair address. Also, there is a difference in liquidity that i added in both the protocols.

In Uniswap V2,

0.001 eth - 10,000,000 DT (Dummy Token) is the added liquidity ratio.

Transaction Link: https://sepolia.etherscan.io/tx/0x652ab5119b16f0c644efb18e46fb761bb20c9760f413571e5b19661893431139

In Uniswap V3,

0.00001 eth - 99,977.643268050637436061 DT is the added liquidity ratio
Transaction Link: https://sepolia.etherscan.io/tx/0x04bada3c0155e6a91c6820fba03d2d52235da64e28c1c5c48e740efb3a81b045

Now, the situation is, if I try to swap ETH to DT from UI,

Let’s say i am swapping 0.0000001 eth (that is less than total eth present in v3 pool), quote api gives the expected result as an output number of tokens.

But, if i am trying to swap 0.00001 eth (that is same as number of eth present in v3 pool), quote api gives the maximum number of tokens to withdraw as an output. Now, if i increase the number of eth provided, the output provided is the same (but logically it should give the error or check the price from the v2 pool and provide the result).

So the resultant concerns are:

  1. When trying to swap the ETH to tokens of more than the amount present in the pool, the quote api returns the same value as maximum withdrawable tokens. (For eg, if the maximum withdrawable tokens are 10000, against 0.00001 eth, the quote api will give same result as 10000, for 0.001 eth or 0.01 eth or 1 eth. (but logically should give error as insufficient liquidity).

image
image
image

  1. The quote api doesn’t provide any result from the uniswap V2, it only check for the uniswap v3 pool. Is there anything, that quote api returns the quote only for V3 on sepolia testnet, or is there anything missed out by my side.

image

The UI gives the same output number of tokens for 0.001 eth, 0.01 eth and 1 eth. Also, from the setting, I have allowed only v2, and the quote api fails with error "No quotes available" , but still gives the result and gives the error in UI as "Unable to swap"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@kr-manav and others