Home » Finance » Cryptocurrency » How to Fix “cannot estimate gas” on PancakeSwap

How to Fix “cannot estimate gas” on PancakeSwap

Are you getting a “cannot estimate gas” error on PancakeSwap?

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

Followed by, “transaction may fail or may require manual gas limit. This is probably an issue with one of the tokens you are swapping”.

The error message prevents you from buying or selling the token.

It can be caused when you’re swapping a token such as Safemoon, Bonfire, or others.

Errors like these are very common on PancakeSwap, so you’re not the only one experiencing it.

In this guide, you’ll learn what does “cannot estimate gas” mean on PancakeSwap and how to fix it.

What does “cannot estimate gas” mean on PancakeSwap?

Cannot estimate gas PancakeSwap

“cannot estimate gas” on PancakeSwap means that the exchange cannot estimate the fee of the transaction.

It usually happens when there are too many decimal places in the number of tokens.

When there are too many decimal places in the number of tokens, the “cannot estimate gas” error may occur.

For example, if you’re swapping BNB for 155.968325 ANKR, you may get the error message.

This is because the token has too many decimal places.

Another reason why you got the “cannot estimate gas” error is because the token might be a scam.

However, this is usually not the case.

To check whether the token is a scam, you need to view its recent transactions.

If there are people buying and selling the token recently, then it’s most likely not a scam and the error message is caused by PancakeSwap.

The error message can be easily fixed by using the steps below.

How to fix “cannot estimate gas” on PancakeSwap

To fix “cannot estimate gas” on PancakeSwap, change your slippage tolerance to 12%.

Then, you need to change the number of tokens that you’re trying to swap.

After you’ve changed the number of tokens that you’re trying to swap, the error message will be fixed.

For example, if you’re trying to swap BNB for Safemoon, the number of Safemoon may have a lot of decimal places.

Or, the last numbers of Safemoon might be very randomized (e.g. 5123859).

When this happens, PancakeSwap may have trouble estimating the fee of the transaction.

As a result, the transaction will fail and you’ll get the “cannot estimate gas” error.

In addition, a low slippage tolerance might cause your transaction to fail as well.

This is due to the fee of the token.

You can mitigate this by increasing your slippage tolerance in increments to find out the lowest slippage tolerance for the transaction to succeed.

Here’s how you can fix “cannot estimate gas” on PancakeSwap:

Step #1: Change your slippage tolerance to 12%

To begin with, you need to open PancakeSwap.

Once you’re on PancakeSwap, choose the tokens that you want to swap.

You can do so by selecting the token that you want to buy in the “To” field.

Then, select the token that you want to use to swap for it in the “From” field.

Next, you need to change your slippage tolerance.

To do so, tap on the Settings icon.

After you’ve tapped on the Settings icon, the Settings pop-up will open.

On the Settings pop-up, you’ll see a “Slippage tolerance” field.

In the field, input “12” as your slippage tolerance.

Then, close the Settings pop-up by tapping on the “x” icon.

Alternatively, you can increase your slippage tolerance in increments.

Start with a 2% slippage tolerance, then work your way up to 4%, 6%. 8%, and more.

This will allow you to find the lowest slippage tolerance for the transaction to succeed.

However, if you’re trying to buy a token like Safemoon, you’ll need to set a slippage tolerance of 12%.

This is due to the token’s fees.

Step #2: Change the last numbers to zero

Next, you need to change the last numbers of the token to zero.

Firstly, select the token that you want to buy in the “To” field.

Then, select the token that you want to use to swap it with (e.g., BNB, Ethereum).

Next, enter the amount of BNB or Ethereum that you want to swap for the token.

For example, if you want to swap 0.04515 BNB, input “0.04515” in the “From” field.

This will make the “To” field estimated.

However, the “To” field cannot be estimated if you’re buying a token.

If the “To” field is estimated, you may receive an error message like the “cannot estimate gas” error when you tap on “Swap”.

Instead, you need the “From” field to be estimated.

How to fix "cannot estimate gas" on PancakeSwap

When you’re buying a token, you need the “From” field to be estimated.

To do so, change the last numbers of the token that you’re trying to buy to zeroes.

For example, if you’re trying to buy 155.958 ANKR, change it to 155.000.

In most cases, this will fix the “cannot estimate gas” error.

However, if the last numbers of the token that you’re trying to buy are already all zeroes, try changing it to random numbers.

For example, if you’re trying to buy 155.000 ANKR, change it to 155.958.

If you’re still getting the “cannot estimate gas” error, try changing the numbers in the “To” and “From” fields to random ones until the transaction succeeds.

This is because the error message is usually caused by the number of tokens that you’re trying to swap.

Conclusion

Here are some general rules to follow whenever you’re buying a selling a token:

If you’re buying a token, make sure that the “From” field is estimated.

To do so, change the last numbers of the token in the “To” field.

On the other hand, if you’re selling a token, make sure that the “To” field is estimated.

To do so, change the last numbers of the token in the “From” field.

This will mitigate any transaction errors from happening such as the “cannot estimate gas” error.

Further reading

Best International Trading Brokers in 2021

How to Buy Dogelon Mars (ELON)

How to Buy HODL Coin (HODL)

About the author

Lim How Wei

Lim How Wei is the founder of followchain.org, with over 7+ years of experience in Social Media and 3+ years of experience in investing in stocks and cryptocurrencies. He has researched, tested, and written hundreds of articles ranging from social media platforms to messaging apps.