Home » Finance » Cryptocurrency » How to Fix “TRANSFER_FROM_FAILED” on PancakeSwap

How to Fix “TRANSFER_FROM_FAILED” on PancakeSwap

Are you getting a “TRANSFER_FROM_FAILED” error on PancakeSwap?

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

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

The transfer from failed error on PancakeSwap prevents you to swap a token that you own on your cryptocurrency wallet (e.g., Trust Wallet, MetaMask).

As a result, you won’t be able to liquidate your position.

If you’re a developer, you need to fix the error so that buyers can swap the token on PancakeSwap.

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

What does “TRANSFER_FROM_FAILED” mean on PancakeSwap?


The “TRANSFER_FROM_FAILED” error on PancakeSwap means that you’re unable to swap the token.

In most cases, the token is a scam, and you won’t be able to get your money back.

It’s frustrating because you’re able to buy the token, but you’re unable to sell it.

This is due to a code in the contract that blocks transfers to the liquidity provider.

Hence, before you buy a token, make sure to view its transactions first.

If the token is a scam, you’ll only see that people are buying and not selling it.

To view a token’s transactions, you can visit this website and search for the token’s name or address.

Then, scroll down to the “Token tx” tab to see a list of the token’s transactions.

Green indicates a buy, while red indicates a sell.

If the entire list is green, the token is most likely a scam because nobody is selling it.

Additionally, the majority of contracts that are on a 0.5.17 build is a scam, so you need to make sure to avoid them in the future.

To check the build of a contract, you can visit this website and search for the token’s name or address.

Then, click on “x Contract” on the info sidebar (x being the token’s name).

After you’ve clicked on “x Contract”, you’ll land on the token’s contract on the BscScan website.

The version of the contract is displayed next to “Compiler Version”.

If the version is 0.5.17, try to avoid buying the token.

How to fix “TRANSFER_FROM_FAILED” on PancakeSwap

PancakeSwap fix

To fix “TRANSFER_FROM_FAILED” on PancakeSwap as a user, you can try changing the last number on the “From (estimated)” field on PancakeSwap.

If you’re a developer, you can fix the error by turning off the “setSwapAndLiquifyEnabled” feature.

Alternatively, you can try using “V1” of PancakeSwap instead of “V2”:

If you’re a user and you’re looking to swap “1000000” BONFIRE, change the number to “1000001” instead.

After you’ve changed the last number on the “From (estimated)” field, your transaction will go through.

If you’re still unable to swap the token, it means that the error is either caused by the token/PancakeSwap.

PancakeSwap has recently migrated from V1 to V2.

This caused issues with swapping tokens on the exchange.

For the error to be fixed, the developer of the token needs to turn off the “setSwapAndLiquifyEnabled” feature on the token’s contract.

Hence, you need to wait until the developer fixes the issue on their end.

You can also try using “V1” of PancakeSwap instead of “V2”.

However, if the token is new and it has a weak community behind it, it might be a scam.

If you’re the developer of the token, you need to fix the issue by editing the token’s contract.

If you’re a user, you need to tell the developer to fix the issue using the steps below:

1. Navigate to “Write Contract” & connect to Web3

BscScan write contract

The first step is to go to the token’s contact on BscScan.

Firstly, visit BscScan and search for your token.

Once you’re on your token, you’ll see multiple tabs including “Transfers”, “Holders”, “Info”, and more.

You’ll also see the “Write Contract” tab.

Click on “Write Contract” to open the token’s contract.

On the “Write Contact” tab, you’ll see multiple features that you can write.

To write features, you need to connect to Web3 first.

Click on “Connect to Web3” and select the wallet that you want to connect to (MetaMask/WalletConnect).

2. Input “false” & click on “Write” on “setSwapAndLiquifyEnabled”


After you’ve connected to Web3, scroll down until you find the “setSwapAndLiquifyEnabled” feature.

The feature is a boolean data type that only has true or false.

You can turn that feature on or off.

If the feature is enabled, liquidity will go into the pool automatically.

However, due to the migration of PancakeSwap from V1 to V2, this feature is causing the “TRANSFER_FROM_FAILED” error.

To fix the error, type “false” under the “setSwapAndLiquifyEnabled” feature and click on “Write”.

After you’ve typed “false” and clicked on “Write”, the “setSwapAndLiquifyEnabled” feature will be disabled.

In addition, the “TRANSFER_FROM_FAILED” error will be fixed as well.

Hence, other people will be able to continue buying or selling the token.

Unfortunately, if you’ve renounced ownership of the token on BscScan, you won’t be able to modify the contract.


If you’ve recently launched a token and no one is able to buy or sell it, you need to go to BscScan to fix it.

On BscScan, type “false” under the “setSwapAndLiquifyEnabled” feature and click on “Write”.

The issue is caused by the migration of PancakeSwap from V1 to V2, so the error will remain until PancakeSwap fixes it.

If you’re a developer, try changing the “setSwapAndLiquifyEnabled” feature to “true” after a few days to see whether people can buy or sell your token.

If they are still unable to, change the “setSwapAndLiquifyEnabled” feature back to “false” until PancakeSwap fixes it.

Further reading

How to Fix “Insufficient Liquidity For This Trade” on PancakeSwap

How to Buy Spore Finance (SPORE)

Best International Trading Brokers in 2021

About the author

Lim How Wei

Lim How Wei is the founder of followchain.org, with 8+ years of experience in Social Media Marketing and 4+ years of experience as an active investor in stocks and cryptocurrencies. He has researched, tested, and written thousands of articles ranging from social media platforms to messaging apps.

Lim has been quoted and referenced by major publications and media companies like WikiHow, Fast Company, HuffPost, Vice, New York Post, The Conversation, and many others. One of his articles about the gig economy was quoted by Joe Rogan who hosts The Joe Rogan Experience (arguably the most popular podcast in the world), in the This Past Weekend podcast by Theo Von.

In his free time, Lim plays multiple games like Genshin Impact, League of Legends, Counter-Strike, Hearthstone, RuneScape, and many others. He creates guides, walkthroughs, solutions, and more on games that he plays to help other players with their progression.