Unknown error pancakelibrary insufficient input amount

There is a familiar problem users face when they are trying to swap their tokens on Pancake swap- The “Insufficient Output Amount” error message. This problem usually occurs because the liquidity or your slippage tolerance is extremely low.

Here’s the full error message, “The transaction cannot succeed due to error: PancakeRouter: INSUFFICIENT_OUTPUT_AMOUNT”.

Followed by, “This is probably an issue with one of the tokens you are swapping”.

You’re getting an “Insufficient Output Amount” error on PancakeSwap because your slippage tolerance is too low.

For example, if your slippage tolerance is 5%, it means that your order will not execute if the price movement is more than 5%.

Here are some solutions to try and help you curb this problem.

Start by refreshing your page before trying again after some time.

Try increasing your spillage tolerance.

If this fails, open PancakeSwap and select the tokens that you want to swap “from” and “to.” Next, click on the “settings” button on the liquidity site and then “spillage tolerance.”

Step 1: Go to Pancakeswap through your TrustWallet and Select the From & To Account.

Choose From as BNB (or as you like) and To as SAFEMOON (or as you like). If you dont have TrustWallet, then you can download Trustwallet and Transfer money by through Signing on to Binance.

Step 2: Tap on the Liquidity Settings Icon as shown below to set the Slippage Tolerance.

Step 3: Now, set the Slippage Tolerance as 12.

Step 4: After that, close the menu by clicking the Close “X” option and tap on “Confirm Swap“.

Step 5: Finally click on the “Approve” button to confirm the transaction.

PancakeRouter: EXPIRED
The transaction cannot succeed due to error: PancakeRouter: EXPIRED. This is probably an issue with one of the tokens you are swapping.
Try again, but confirm (sign and broadcast) the transaction as soon as you generate it.
This happened because you started making a transaction, but you didn’t sign and broadcast it until it was past the deadline. That means you didn’t hit «Confirm» quickly enough.
0

I’m trying to make a multiple swap function in my smart contract using solidity. For example we want to swap BNB->BUSD->USDT->ADA->BNB. The contract interacts with PancakeSwap. I deployed it on BSC testnet.

your problem could is about the amount size. Remember most tokens in blockchain are based on 18 decimals systems.

If you want to call or to swap an amount of «10», because of the decimals, that amount is going to be counted as 0.00000000000000000000010

this number is just to small an the solidity contract will consider it like 0.

Ника Боника
Оцените автора
Добавить комментарий