Getting any error message on PancakeSwap can be quite frustrating. Especially when you are in a hurry to catch the new price peak, but the transaction doesn’t seem to go through.
But the solution to the error message: “The transaction cannot succeed due to error: cannot estimate gas”. Is fortunately quite simple.
In this guide, you will learn why are you getting the cannot estimate gas error on Pancakeswap and how to easily fix it and successfully complete your transaction. Let’s dive in!
What does the “Cannot estimate gas” error mean on PancakeSwap
The “cannot estimate gas” is one of the error messages you can get when you are trying to swap your tokens on PancakeSwap. It simply means that the transaction cannot succeed because the platform cannot estimate the gas fees for that particular transaction.
This usually occurs when there are too many decimal places in the number of the token you are trying to swap. For instance, if you are swapping 10 BUSD for 2600.3578642 Thetan Coin (THC) this error message could appear.
That’s because PancakeSwap has a hard time calculating your gas fee if there are too many decimals or the last decimal places are very randomized – as .548736321
Another reason why you are getting the “cannot estimate gas” error is simply because the token might be a scam. That doesn’t happen that often, but it could be the cause.
Now let’s take a look at how easy it is to fix this error.
How to fix “Cannot estimate gas” on PancakeSwap
Solution 1: Increase the Slippage Tolerance
To fix this error you want to increase your slippage tolerance. If you increase the slippage tolerance PancakeSwap will simply have more room to maneuver with the resulting amount of token you get after the swap. Thus, it will also calculate the gas fee better.
Head to the Pancakeswap and choose the pair you want to trade as you normally would. I will be trying to swap 1,000 Thetan Arena coins for BUSD.
As you can see by default the slippage tolerance is set to 0.5%. Which is extremely low. This means that there is only a possible price change of 0.5%.
To increase the slippage tolerance head to the settings – the small gear icon.
A window with various settings will pop up. Here you can also change, for example, the gas fees – if you want the transaction to be executed faster, set higher gas fees. And also the slippage tolerance we are looking for.
Now increase the slippage tolerance. The perfect solution is 12%. However, if you want to save a bit of money, you can gradually increase the value. I would recommend starting with at least 6% and increasing until the trade is made.
Now try the transaction again to see if it goes through. If not let’s head to step two.
Solution 2: Round up the amount of token you are to receive
As we stated before, the “Cannot estimate gas” error happens because there are too many decimal places and PancakeSwap has a hard time calculating the gas fee.
We can easily reduce the number of decimal places manually.
Once again fill in the token you want to swap and the token you want to receive. I will try to swap Thetan Coin for BUSD.
Fill in the top box with the number of tokens you want to swap. Let’s say I want to go with 1,025 THC.
As you can see the outcome number is pretty randomized. That can easily cause the “Cannot estimate gas” error. Since you want to avoid this, you will need to delete the decimal places for BUSD (for the token you would like to receive).
As you can see, now instead of 3.89468 we get only 3.0 BUSD. This will make quite a difference in our case since we are converting to dollars. But in your case it may not make such a drastic difference, it depends on the token you are swapping to.
Conclusion
If you are experiencing the “Cannot estimate gas” type of error it means that the PancakeSwap wasn’t able to calculate the gas fee due to the number of decimal places. And there are two possible solutions for that:
- Increase your slippage tolerance
- Round up your numbers, that means deleting all decimal places from the intended token to receive.
Unfortunately, this type of error message is not the only one you can be experiencing. That’s why we’ve created an entire series focused on PancakeSwap errors. Click on the name of the error and it will take you to an article dedicated to it:
- Insufficient Output amount error
- Cannot Estimate Gas error
- Unsupported Chain ID
- Insufficient Balance
- Pancake K error
- PancakeRouter: Expired
- Pancake: TRANSFER_FROM_FAILED
- Price Impact too High error
Or all the articles can be found in one place, here.