liquidity and issues swap token to bnb

Hello world, Hope you are well!

I am doing some tests with a clone of the earlybird contract, but i got stuck when swapping from bnb to ebird4 and from ebird4 to bnb. after the deploy I add a liquity of 1bnb and then I activate trading.

I have a few questions please if anyone can help me. Many thanks in advance.


Add liquidity

  • Question 1:

if I try to buy 0.001BNB it fail with the following error.


buy error

Otherwise if I try to buy to same token amount 99650500 the estimate change to 0.000999999BNB and I can swap token without problems.

Can anyone please explain to me what happens and how to solve the problem ?

enter image description here

  • Question 2:

I can not swap EBIRD4 -> BNB, with any amount I always get back to error The transaction cannot succeed due to error: undefined.

Contract Address in testnet 0x38a1364A04E81b496979292d5e3B00582E865938

Contract Code

Sorry I use jsfiddle I haven't found another way to share the code

You need to enter the Slippage value.

If the tax is 5%. Enter 5 as Slippage. If the tax Is 10% enter 10 as Slippage.

Slippage can be changed by clicking on the gear/cog icon

Let me know if it works

thank you very much @Extinctionist30 it seems solved, the problem was related to low slippage and also version of uniswap router v1 used to add liquidity.

1 Like

No Problem Buddy! Glad it worked our for you!

Hi Msimo !
apart from the question of fees, the slippage problem when you test tokens comes sometime when there is too few liquidity on the start. If you put 0.1 BNB as liquidity for your test, an order of 0.1 BNB would be a whale order..! With a little more liquidity it avoids this kind of problem during the tests.