ethereumsmartcontractscryptocurrencywalletdecentralized-applications

Fail with error PancakeRouter: INSUFFICIENT_B_AMOUNT


In pancake swap, when we enter liquidity pool with any pair of tokens, i'm getting this error after confirming the transaction through connected wallet

Fail with error 'PancakeRouter: INSUFFICIENT_B_AMOUNT


Solution

  • I am just going to be more detailed, so people who are new to this maybe able to understand the full flow.. I am learning too, so people who are already an expert are welcome to correct me or give more details if required.

    Firstly, Pancake is a Decentralized Exchange (DEX) that operates on Binance Smart Chain (BSC) Network where you can do Decentralized Financing (DeFi) like Staking or Liquidity Mining with BSC tokens or Token Pair that are supported/popular in Pancake DEX respectively.

    When you try to enter into Pancake Liquidity Pool (LP) with a token pair (example: BNB/BMON or BMON/BUSD),

    1. you will be asked to enter how much of your tokens you wish to get into the LP from your non-custodial Wallet like Metamask Wallet.
    2. Once you enter the values, the Pancake Liquidity interface will show the equivalent tokens for both the tokens selected as pair.
    3. Then you should confirm to deposit the amount of both the tokens you selected to enter the token pair LP (called Cake-LP in Pancake).
    4. Once you press 'Confirm' in Pancake, you will be given a message the approximate (~) number of Cake-LP tokens you may end up getting into that LP after transaction succeeds. It will also clearly state that "if the approximate number of LP token may not be available after trying the transaction, then the transaction would automatically fail.
    5. This error "PancakeRouter: INSUFFICIENT_B_AMOUNT" is due to the above mentioned failure.

    To avoid such errors, make sure to click/tap 'confirm' in Pancake DEX and subsequent authorize confirmation in your connected Wallet ASAP. So the transaction would end up giving you approximately the same no. of LP token and hence the transaction will be able to finish successfully.

    If you still see the same issue, try 2 or 3 more times, then it will succeed.

    Thanks!