1inch plugin Error

I am using 1inch plugin,

I did a liquidity pool for a token on 1inch network, and

I can swap it normally on 1inch Dapp,

But when I try to use my Dapp, I get insufficient liquidity Error with that token only, also the Dapp is working fine with any token else.

Maybe you need to increase the slippage.

Yes, I did the slippage upto 18%, but the same Error

if there is no onchain liquidity - swap cant happen - i would reach out to 1inch for more details - we just integrate their tech

this is their error and they can explain more exactly why it happens

normally its because the trade for the pair requested cant be routed onchain because there is not enough liquidity

I said, I did a liquidity for that token on 1inch network, I can swap that token on 1inch Dapp as normal, but on my swap using moralis and 1inch plugin, I get that Error

yea i understand - but its still the fact that we just integrate their API and cant help unfortunately

we are just calling their API

therefore - i recommend asking in their discords as we have no knowledge of how their swapping works and why some tokens work and others dont - we are using v3 - you can use it directly yourself https://1inch.io/api/

its just an integration for us

Thank you, Solved the problem with my side…
the amount inside the swap function should be like that

var amount = Number(document.querySelector(’#from-amount’).value * 10 ** currentTrade.from.decimals);

before was

var amount = Number(document.querySelector(’#from-amount’).value );
means the amount that I wanted to swap more than the liquidity that I provided!

2 Likes