Fail with error bep20 transfer amount exceeds balance

Распространенные сообщения об ошибках. Используйте боковую панель, чтобы перейти к ошибке, которую вы увидели.

INSUFFICIENT_OUTPUT_AMOUNT

The transaction cannot succeed due to error: PancakeRouter: INSUFFICIENT_OUTPUT_AMOUNT. This is probably an issue with one of the tokens you are swapping.

Вы пытаетесь обменять токен, но выставили слишком низкий коэфициент проскальзивания. Сделка также может не пройти из-за низкой ликвидности..

  1. 1.

    Обновите страницу и попробуйте снова.

  2. 2.

    Попробуйте обменять меньшую сумму за раз.

  3. 3.

    Увеличьте проскальзывание:

    1. 1.

      Нажмите значок настроек на странице ликвидности.

    2. 2.

      Увеличьте проскальзывание в большую сторону и повторите попытку.

  4. 4.

    Напоследок попробуйте ввести сумму с меньшим количеством знаков после запятой.

Обычно это происходит при торговле токенами с низкой ликвидностью.

Это означает, что не хватает одного из токенов, которые вы пытаетесь обменять в Пуле Ликвидности: это, вероятно токен которым мало кто торгует.

Тем не менее, есть также шанс, что вы пытаетесь торговать мошенническим токеном, который не может быть продан. В этом случае PancakeSwap не может заблокировать токен или вернуть средства.

INSUFFICIENT_A_AMOUNT or INSUFFICIENT_B_AMOUNT

Fail with error ‘PancakeRouter: INSUFFICIENT_A_AMOUNT’
or
Fail with error ‘PancakeRouter: INSUFFICIENT_B_AMOUNT’

Вы пытаетесь добавить/убрать ликвидность из пула ликвидности (LP), но вам не хватает одного из двух токенов в паре.

Обновите страницу и попробуйте снова

  1. 1.

    Нажмите значок настроек на странице ликвидности.

  2. 2.

    Увеличьте проскальзывание в большую сторону и повторите попытку.

Причиной ошибки является попытка добавить/убрать ликвидность из пула ликвидности (LP), но не хватает одного из двух токенов в паре token A или token B

Возможно, что цены изменяются слишком быстро, а допуск на проскальзывание слишком мал.

Хорошо, значит, ты действительно полон решимости что-то исправить. Мы не советуем делать это, если ты не знаешь, что делаешь.

В настоящее время нет простого способа решить этот вопрос с сайта PancakeSwap: вам нужно будет напрямую взаимодействовать с контрактом. Вы можете добавлять ликвидность непосредственно через контракт Рутера, устанавливая при этом сумму в размере небольшого объема, а затем снимать всю ликвидность.

  1. 1.

    Нажмите Write Contract, потом Connect to Web3 и подключите кошелек.

  2. 2.

    В секции «1. approve», подтвердите LP токен рутеру вводя следующее

    1. 1.

      spender (address): введите адрес контракта LP токена с которым вы пытаетесь взаимодействовать

  1. 1.

    Выберите пункт Read Contract.

  2. 2.

    строка 5. balanceOf, введите адрес своего кошелька и нажмите Query.

  3. 3.

    Запомните число, которое экспортируется. Оно показывает ваш баланс в пределах LP в формате uint256, которое понадобится в следующем шаге.

Добавить или извлечь Ликвидность

  1. 1.

    Выберите Write Contract и Connect to Web3 как было описано выше.

  2. 2.

    Найдите addLiquidity или removeLiquidity (что бы вы ни пытались сделать)

  3. 3.

    Введите адреса обоих токенов LP.

  4. 4.

    В liquidity (uint256), введите uint256 который вы получили в «balanceOf» ранее.

  5. 5.

    Установите amountAMin или amountBMin: «1» должно получится.

  6. 6.

    Добавьте адрес вашего кошелька в to (address).

  7. 7.

    Крайний срок (deadline) должен быть epoch (Unix-время) больше чем время исполнении транзакции.

Это может привести к очень высокому проскальзыванию, и может привести к потере пользователем средств, в случае фронтрана ботом.

The transaction cannot succeed due to error: PancakeRouter: EXPIRED. This is probably an issue with one of the tokens you are swapping.

Попробуйте еще раз, но при этом подтвердите (подпишите и отправьте в сеть) транзакцию как только её сгенерируете.

Подобное может случиться, если вы начали сделку, но не закончили её вовремя. Постарайтесь сразу нажать кнопку «Confirm».

The transaction cannot succeed due to error: Pancake: K. This is probably an issue with one of the tokens you are swapping.

Обновите страницу и попробуйте снова. Увеличьте коэфициент проскальзывания.

Вероятнее всего, в момент сделки слишком быстро изменилась цена токена. Подобное происходит в периоды сильной волотильности и ажиотажа на рынке. Сайт может отображать устаревшую информацию из смартконтракта (цена/кол-во токенов к покупке). По этой причине сделка может не состояться.

BEP20: burn amount exceeds balance

Fail with error ‘BEP20: burn amount exceeds balance’

Вам не хватает токенов SYRUP для снятия CAKE из пула.

Количество токенов SYRUP на вашем балансе должно соответствовать количеству CAKE в пуле.

  1. 1.

    Купить SYRUP на бирже. Если вы хотите снять 100 CAKE, вам необходимо 100 SYRUP.

Если первый пункт не получился, вы можете выполнить “emergencyWithdraw” напрямую с контрактом чтоб получить токены что были использованы.

  1. 2.

    Нажмите “Connect to Web3” и подключите кошелёк.

  2. 3.

    Секция “4. emergencyWithdraw”, введите «0» нажмите “Write”.

Это снимет ваши токены и вы потеряете не собранные CAKE.

Это потеряет любой доход, который вы еще не собрали.

Чтобы это больше не повторилось, не продавай свои SYRUP. Тебе он нужен чтобы снять саке из “Stake CAKE Earn CAKE” пула.

Эта ошибка произошла из-за того, что вы продали или отправили токены SYRUP. SYRUP печатается в соотношении 1:1 к CAKE, когда вы делаете вклад в пул CAKE-CAKE. SYRUP должен быть сожжен в соотношении 1:1 к CAKE при запросе функции leaveStaking (снятие из пула CAKE), так что если тебе не хватает, ты не можешь выйти из пула.

Warning! Error encountered during contract execution [out of gas]

Вы установили слишкий низкий лимит газа для проведения сделки.

Попробуйте вручную увеличить gas limit (не трогайте gas price (gwei)!) в вашем кошельке перед тем, как подписать транзакцию.

Лимита в 200000 почти всегда достаточно.

Пример выше из Metamask; Если вы не уверены, как настроить лимит газа, то проверьте документацию кошелька, которым вы пользуетесь.

Все просто, твой кошелек (Metamask, Trust Wallet и т.д.) не может завершить то, что он пытается сделать.

Ваш кошелек расчитал не правильно, лимит газа слишком мал- поэтому вызов функции обрывается до завершения вызываемой функции.

BEP20: transfer amount exceeds balance

Fail with error ‘BEP20: transfer amount exceeds balance’

Вы пытаетесь выйти из SYRUP пула с низким вознаграждением (не хватает наград).

Чтобы получить свои токены, выполните “emergencyWithdraw” напрямую с адресом контракта.

  1. 1.

    Найдите адрес контракта пула, от которого вы пытаетесь выйти. Вы можете найти его в журнале транзакций вашего кошелька..

  2. 4.

    Нажмите “Connect to Web3” и подключите кошелек.

  3. 5.

    Открыв секцию “4. emergencyWithdraw”, введите «0» и нажмите “Write”.

Это действие снимет токен САКЕ, но не соберет награду.

Это потеряет любой доход, который вы еще не собрали.

Эта ошибка имеет тенденцию появляться, когда вы пытаетесь выйти из старого Syrup пула, но не хватает наград в резерве, чтобы собрать их при выходе из него. Это приводит к провалу сделки.

Common error messages. Use the sidebar to jump to the error you’re seeing.

INSUFFICIENT_OUTPUT_AMOUNT

The transaction cannot succeed due to error: PancakeRouter: INSUFFICIENT_OUTPUT_AMOUNT. This is probably an issue with one of the tokens you are swapping.

You’re trying to swap tokens, but your slippage tolerance is too low or liquidity is too low.

  1. 1.

    Refresh your page and try again later.

  2. 2.

    Try trading a smaller amount at one time.

  3. 3.

    Increase your slippage tolerance:

    1. 1.

      Tap the settings icon on the liquidity page.

    2. 2.

      Increase your slippage tolerance a little and try again.

  4. 4.

    Lastly, try inputting an amount with fewer decimal places.

This usually happens when trading tokens with low liquidity.

That means there isn’t enough of one of the tokens you’re trying to swap in the Liquidity Pool: it’s probably a small-cap token that few people are trading.

However, there’s also the chance that you’re trying to trade a scam token which cannot be sold. In this case, PancakeSwap isn’t able to block a token or return funds.

INSUFFICIENT_A_AMOUNT or INSUFFICIENT_B_AMOUNT

Fail with error ‘PancakeRouter: INSUFFICIENT_A_AMOUNT’ or Fail with error ‘PancakeRouter: INSUFFICIENT_B_AMOUNT’

You’re trying to add/remove liquidity from a liquidity pool (LP), but there isn’t enough of one of the two tokens in the pair.

Refresh your page and try again, or try again later.

  1. 1.

    Tap the settings icon on the liquidity page.

  2. 2.

    Increase your slippage tolerance a little and try again.

The error is caused by trying to add or remove liquidity for a liquidity pool (LP) with an insufficient amount of token A or token B (one of the tokens in the pair).

It might be the case that prices are updating too fast when and your slippage tolerance is too low.

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.

The transaction cannot succeed due to error: Pancake: K. This is probably an issue with one of the tokens you are swapping.

Refresh the page and try again, or increase slippage tolerance via the settings icon and try again.

This probably happened because you’re trying to buy or sell tokens during a big price movement. The frontend is getting outdated information (e.g. outAmount) from the smart contract, causing the swap to fail.

BEP20: burn amount exceeds balance

Fail with error ‘BEP20: burn amount exceeds balance’

You don’t have enough PAPER in your wallet to unstake from the PTS-PTS PAPER pool.

Get at least as much PAPER as the amount of PTS that you’re trying to unstake.

  1. 1.

    Buy PAPER on the exchange. If you want to unstake 100 PTS, you need at least 100 PAPER.

If that still fails, you can perform an “emergencyWithdraw” from the contract directly to unstake your staked tokens.

  1. 2.

    Click “Connect to Web3” and connect your wallet.

  2. 3.

    In section “4. emergencyWithdraw”, enter «0» and click “Write”.

This will unstake your staked tokens and lose any uncollected PTS yield.

This will lose any yield that you haven’t harvested yet.

To stop this happening again, don’t sell your PAPER. You still need it to unstake from the “PTS-PTS” pool.

This error has happened because you have sold or transferred PAPER tokens. PAPER is minted in a 1:1 ratio to PTS when you stake in the PTS-PTS PAPER Pool. PAPER must be burned at a 1:1 ratio to PTS when calling leaveStaking (unstaking your PTS from the pool), so if you don’t have enough, you can’t unstake from the pool.

Warning! Error encountered during contract execution [out of gas]

You have set a low gas limit when trying to make a transaction.

Try manually increasing the gas limit (not gas price!) in your wallet before signing the transaction.

A limit of 200000 is usually enough.

The above example is from Metamask; check your wallet’s documentation if you aren’t sure how to adjust the gas limit.

Basically, your wallet (Metamask, Trust Wallet, etc.) can’t finish what it’s trying to do.

Your wallet estimates that the gas limit is too low, so the function call runs out of gas before the function call is finished

BEP20: transfer amount exceeds balance

Fail with error ‘BEP20: transfer amount exceeds balance’

You’re trying to unstake from a Syrup Pool with low rewards in it.

You can perform an “emergencyWithdraw” from the contract directly to unstake your staked tokens.

  1. 1.

    Find the contract address of the Syrup Pool you’re trying to unstake from. You can find it in your wallet’s transaction log.

  2. 4.

    Click “Connect to Web3” and connect your wallet.

  3. 5.

    In section “4. emergencyWithdraw”, enter «0» and click “Write”.

    This will unstake your staked tokens and lose any uncollected yield.

This will lose any yield that you haven’t harvested yet.

This error tends to appear when you’re trying to unstake from an old PAPER Pool, but there aren’t enough rewards in the pool left for you to harvest when withdrawing. This causes the transaction to fail.

Name already in use

pancake-document / help / troubleshooting.md

  • Go to file T
  • Go to line L
  • Copy path
  • Copy permalink

Copy raw contents

Copy raw contents

Sometimes you may find yourself facing a problem that doesn’t have a clear solution. These troubleshooting tips may help you solve problems you run into.

Issues on the Exchange

INSUFFICIENT_OUTPUT_AMOUNT

The transaction cannot succeed due to error: PancakeRouter: INSUFFICIENT_OUTPUT_AMOUNT. This is probably an issue with one of the tokens you are swapping.

the transaction cannot succeed due to error: execution reverted: pancakerouter: insufficient_output_amount.

You’re trying to swap tokens, but your slippage tolerance is too low or liquidity is too low.

  1. Refresh your page and try again later.
  2. Try trading a smaller amount at one time.
  3. Increase your slippage tolerance:
    1. Tap the settings icon on the liquidity page.
    2. Increase your slippage tolerance a little and try again.
  4. Lastly, try inputting an amount with fewer decimal places.

<% tab title=»Reason» %>This usually happens when trading tokens with low liquidity.

That means there isn’t enough of one of the tokens you’re trying to swap in the Liquidity Pool: it’s probably a small-cap token that few people are trading.

However, there’s also the chance that you’re trying to trade a scam token which cannot be sold. In this case, PancakeSwap isn’t able to block a token or return funds. <% endtab %>

INSUFFICIENT_A_AMOUNT or INSUFFICIENT_B_AMOUNT

Fail with error ‘PancakeRouter: INSUFFICIENT_A_AMOUNT’
or
Fail with error ‘PancakeRouter: INSUFFICIENT_B_AMOUNT’

You’re trying to add/remove liquidity from a liquidity pool (LP), but there isn’t enough of one of the two tokens in the pair.

<% tabs %> <% tab title=»Solution» %>Refresh your page and try again, or try again later.

Still doesn’t work?

  1. Tap the settings icon on the liquidity page.
  2. Increase your slippage tolerance a little and try again.

<% tab title=»Reason» %>The error is caused by trying to add or remove liquidity for a liquidity pool (LP) with an insufficient amount of token A or token B (one of the tokens in the pair).

It might be the case that prices are updating too fast when and your slippage tolerance is too low.

<% tab title=»Solution for nerds» %>OK, so you’re really determined to fix this. We really don’t recommend doing this unless you know what you’re doing.

There currently isn’t a simple way to solve this issue from the PancakeSwap website: you’ll need to interact with the contract directly. You can add liquidity directly via the Router contract, while setting amountAMin to a small amount, then withdrawing all liquidity.

Approve the LP contract

Head to the contract of the LP token you’re trying to approve.
For example, here’s the ETH/WBNB pair: https://bscscan.com/address/0x70d8929d04b60af4fb9b58713ebcf18765ade422

  1. Select Write Contract, then Connect to Web3 and connect your wallet.
  2. In section «1. approve», approve the LP token for the router by entering
    1. spender (address): enter the contract address of the LP token you’re trying to interact with
    2. value (uint256): -1
  1. Switch to Read Contract.
  2. In 5. balanceOf, input your wallet address and hit Query.
  3. Keep track of the number that’s exported. It shows your balance within the LP in the uint256 format, which you’ll need in the next step.

Add or Remove Liquidity

  1. Select Write Contract and Connect to Web3 as above.
  2. Find addLiquidity or removeLiquidity (whichever one you’re trying to do)
  3. Enter the token addresses of both of the tokens in the LP.
  4. In liquidity (uint256), enter the uint256 number which you got from «balanceOf» above.
  5. Set a low amountAMin or amountBMin: try 1 for both.
  6. Add your wallet address in to (address).
  7. Deadline must be an epoch time greater than the time the tx is executed.

<% hint style=»warning» %>This can cause very high slippage, and can cause the user to lose some funds if frontrun <% endhint %> <% endtab %>

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.

The transaction cannot succeed due to error: Pancake: K. This is probably an issue with one of the tokens you are swapping.

Try modifying the amount on “To” field. Therefore putting «(estimated)» symbol on “From”. Then initiate the swap immediately.

This usually happen when you are trying to swap a token with its own fee.

The transaction cannot succeed due to error: execution reverted: Pancake: TRANSFER_FAILED.

Make sure you have 30% more tokens in your wallet than you intend to trade, or try to trade a lower amount. If you want to sell the maximum possible, try 70% or 69% instead of 100%.
Caused by the design of Restorative Rebase tokens like tDoge or tBTC.
Understand how restorative rebase tokens work.

Another possible cause of this issue is the malicious token issuer just suspended the trading for their token. Or they made selling action only possible for selected wallet addresses. Please always do your own research to avoid any potential fraud. If the token you are trying to swap but failed with this error code is coming from an airdrop, that is most likely a scam. Please do not perform any token approval or follow any links, your fund may be at risk if you try to do so.

Transaction cannot succeed

Try trading a smaller amount, or increase slippage tolerance via the settings icon and try again. This is caused by low liquidity.

Price Impact too High

Try trading a smaller amount, or increase slippage tolerance via the settings icon and try again. This is caused by low liquidity.

This transaction would fail. Please contact support

<% tabs %> <% tab title=»Solution» %>If you got this error while removing liquidity from a BNB pair:

Please select «Receive WBNB» and retry.

If you got this error while trying to swap:

Please contact the project team of the token you’re trying to swap. **** This issue must be resolved by the project team.

<% tab title=»Reason» %>This issue (while swapping) is caused by tokens which have hard-coded the V1 PancakeSwap router into their contract.

While this practice is ill-advised at best, the reason for these projects having done this appears to be due to their tokenomics, in which each purchase sends a % of the token to LPs.

The projects affected will likely not work with the V2 router: they will most likely need to create new versions of their tokens pointing to our new router address, and migrate any existing token holders to their new token.

We recommend that any projects which created such tokens should also make efforts to prevent their users from adding them to V2 LP.

Cannot read property ‘toHexString’ of undefined

«Unknown error: «Cannot read property ‘toHexString’ of undefined»

When trying to swap tokens, the transaction fails and this error message is displayed. This error has been reported on mobile devices using Trust Wallet.

  1. Attempt the transaction again with increased slippage allowance.
  2. If 1. does not resolve your problem, consider using another wallet such as SafePal for your transaction.

<% tab title=»Reason» %>This usually happens when trading tokens with insufficient slippage allowance on Trust Wallet.

The exact details of the problem are still being investigated. <% endtab %>

Execution reverted: TransferHelper: TRANSFER_FROM_FAILED.

The transaction cannot succeed due to error: execution reverted: TransferHelper: TRANSFER_FROM_FAILED.

When trying to swap tokens, the transaction fails and this error message is displayed. This error has been reported across platforms.

  1. Check to make sure you have sufficient funds available.
  2. Ensure you have given the contract allowance to spend the amount of funds you’re attempting to trade with.

<% tab title=»Reason» %>This error happens when trading tokens with insufficient allowance, or when a wallet has insufficient funds.
If you’re trading tokens with Restorative Rebase like tau assets tDoge or tBTC, make sure you understand how they work first with this guide to Rebase tokens. <% endtab %>

Issues with Farms

Fail with error ‘ds-math-sub-underflow’

You’ve run out of allowance of your LP token allowance to the MasterChef contract.

Use token approval manager like unrekt or BscScan to

Issues with Syrup Pools

BEP20: burn amount exceeds balance

Fail with error ‘BEP20: burn amount exceeds balance’

You don’t have enough SYRUP in your wallet to unstake from the CAKE-CAKE pool.

Get at least as much SYRUP as the amount of CAKE that you’re trying to unstake.

  1. Buy SYRUP on the exchange. If you want to unstake 100 CAKE, you need at least 100 SYRUP.
  2. Try unstaking again.

If that still fails, you can perform an “emergencyWithdraw” from the contract directly to unstake your staked tokens.

  1. Go to: https://bscscan.com/address/0x73feaa1eE314F8c655E354234017bE2193C9E24E#writeContract
  2. Click “Connect to Web3” and connect your wallet.
  3. In section “4. emergencyWithdraw”, enter «0» and click “Write”.

This will unstake your staked tokens and lose any uncollected CAKE yield.

<% hint style=»warning» %>This will lose any yield that you haven’t harvested yet.

To stop this happening again, don’t sell your SYRUP. You still need it to unstake from the “Stake CAKE Earn CAKE” pool.

This error has happened because you have sold or transferred SYRUP tokens. SYRUP is minted in a 1:1 ratio to CAKE when you stake in the CAKE-CAKE Syrup Pool. SYRUP must be burned at a 1:1 ratio to CAKE when calling leaveStaking (unstaking your CAKE from the pool), so if you don’t have enough, you can’t unstake from the pool.

Out of Gas error

Warning! Error encountered during contract execution [out of gas]

You have set a low gas limit when trying to make a transaction.

<% tabs %> <% tab title=»Solution» %>Try manually increasing the gas limit (not gas price!) in your wallet before signing the transaction.

A limit of 200000 is usually enough.

The above example is from Metamask; check your wallet’s documentation if you aren’t sure how to adjust the gas limit.

<% tab title=»Reason» %>Basically, your wallet (Metamask, Trust Wallet, etc.) can’t finish what it’s trying to do.

Your wallet estimates that the gas limit is too low, so the function call runs out of gas before the function call is finished. <% endtab %>

BEP20: transfer amount exceeds allowance

Fail with error ‘BEP20: transfer amount exceeds allowance’

  1. Use Unrekt.net to revoke approval for the smart contract you’re trying to interact with
  2. Approve the contract again, without setting a limit on spend allowance
  3. Try interacting with the contract again.

<% tab title=»Reason» %>This happens when you set a limit on your spend allowance when you first approved the contract, then try to swap more than the limit. <% endtab %>

BEP20: transfer amount exceeds balance

Fail with error ‘BEP20: transfer amount exceeds balance’

You’re probably trying to unstake from a Syrup Pool with low rewards in it. Solution below.

If not, you may be trying to send tokens that you don’t have in your wallet (for example, trying to send a token that is already assigned to a pending transaction). In this case, just make sure you have the tokens you’re trying to use.

<% tabs %> <% tab title=»Solution» %>Firstly, let the team know which pool you’re trying to unstake from, so they can top up the rewards. If you’re in a hurry to unstake and you don’t mind losing your pending yield, try an emergencyWithdraw:

You can perform an “emergencyWithdraw” from the contract directly to unstake your staked tokens.

  1. Find the contract address of the Syrup Pool you’re trying to unstake from. You can find it in your wallet’s transaction log.
  2. Go to https://bscscan.com/ and in the search bar, enter the contract address.
  3. Select Write Contract.
  4. Click “Connect to Web3” and connect your wallet.
  5. In section “3. emergencyWithdraw”, and click “Write”.

This will unstake your staked tokens and lose any uncollected yield.

<% hint style=»warning» %>This will lose any yield that you haven’t harvested yet. <% endhint %>

<% tab title=»Reason» %>This error tends to appear when you’re trying to unstake from an old Syrup Pool, but there aren’t enough rewards in the pool left for you to harvest when withdrawing. This causes the transaction to fail. <% endtab %>

Issues with Prediction

Other issues

Provider Error
No provider was found

This happens when you try to connect via a browser extension like MetaMask or Binance Chain Wallet, but you haven’t installed the extension.

Unsupported Chain ID

Switch your chain to BNB Smart Chain. Check your wallet’s documentation for a guide if you need help.

Already processing eth_requestAccounts. Please wait.

Make sure you are signed in to your wallet app and it’s connected to BNB Smart Chain.

Issues buying SAFEMOON and similar tokens

To trade SAFEMOON, you must click on the settings icon and set your slippage tolerance to 12% or more.
This is because SafeMoon taxes a 10% fee on each transaction:

  • 5% fee = redistributed to all existing holders
  • 5% fee = used to add liquidity

This is also why you might not receive as much of the token as you expect when you purchase.
Read more on How to Buy Safe Moon.

Internal JSON-RPC errors

«MetaMask — RPC Error: Internal JSON-RPC error. estimateGas failed removeLiquidityETHWithPermitSupportingFeeOnTransferTokens estimateGas failed removeLiquidityETHWithPermit «

Happens when trying to remove liquidity on some tokens via Metamask. Root cause is still unknown. Try using an alternative wallet.

You don’t have enough BNB to pay for the transaction fees. You need more BEP-20 network BNB in your wallet.

Increase the gas limit for the transaction in your wallet. Check your wallet’s documentation to learn how to increase gas limit.

Cause unclear. Try these steps before trying again:

  1. Increase gas limit
  2. Increase slippage
  3. Clear cache

Issues with Profile

Oops! We couldn’t find any Pancake Collectibles in your wallet.

We’re investigating the logic behind this issue. Meanwhile please try the workaround.

  1. Go to “Collectible” page, then come back to profile page.
    If you can’t find the link, go to https://pancakeswap.finance/collectibles directly.
  2. Retry profile creation.
  • Clear the cache and retry.
  • Retry on different browser.
  • Retry on different wallet apps.
  • Retry on the different network (switch between Wi-Fi and cellular)

Checking username keeps spinning

There are two possible causes.

  1. You have multiple wallets installed on the browser.
  2. Network issue.

<% tabs %> <% tab title=»Solution 1″ %>Root cause: You have multiple wallets installed on the browser.

It may make a conflict between wallets. This is out of PancakeSwap’s control and we can do nothing.

  1. Have only single wallet installed on browser, remove the others.
  2. Reconnect the wallet and retry setting username again.

<% tab title=»Solution 2″ %>Root cause: Network is unstable.

You have to retry.

  1. Delete whatever has been entered in the text field completely.
  2. Re-type username, then please wait for seconds.
  3. If it doesn’t work, reload the page and retry again.

Источник

description

Common error messages. Use the sidebar

➡️

to jump to the error you’re seeing.

Troubleshooting Errors

Sometimes you may find yourself facing a problem that doesn’t have a clear solution. These troubleshooting tips may help you solve problems you run into.

Issues on the Exchange

INSUFFICIENT_OUTPUT_AMOUNT

The transaction cannot succeed due to error: PancakeRouter: INSUFFICIENT_OUTPUT_AMOUNT. This is probably an issue with one of the tokens you are swapping.

the transaction cannot succeed due to error: execution reverted: pancakerouter: insufficient_output_amount.

You’re trying to swap tokens, but your slippage tolerance is too low or liquidity is too low.

{% tabs %}
{% tab title=»Solution» %}

  1. Refresh your page and try again later.
  2. Try trading a smaller amount at one time.
  3. Increase your slippage tolerance:
    1. Tap the settings icon on the liquidity page.
    2. Increase your slippage tolerance a little and try again.
  4. Lastly, try inputting an amount with fewer decimal places.
    {% endtab %}

{% tab title=»Reason» %}
This usually happens when trading tokens with low liquidity.

That means there isn’t enough of one of the tokens you’re trying to swap in the Liquidity Pool: it’s probably a small-cap token that few people are trading.

However, there’s also the chance that you’re trying to trade a scam token which cannot be sold. In this case, PancakeSwap isn’t able to block a token or return funds.
{% endtab %}
{% endtabs %}

INSUFFICIENT_A_AMOUNT or INSUFFICIENT_B_AMOUNT

Fail with error ‘PancakeRouter: INSUFFICIENT_A_AMOUNT’
or
Fail with error ‘PancakeRouter: INSUFFICIENT_B_AMOUNT’

You’re trying to add/remove liquidity from a liquidity pool (LP), but there isn’t enough of one of the two tokens in the pair.

{% tabs %}
{% tab title=»Solution» %}
Refresh your page and try again, or try again later.

Still doesn’t work?

  1. Tap the settings icon on the liquidity page.
  2. Increase your slippage tolerance a little and try again.


{% endtab %}

{% tab title=»Reason» %}
The error is caused by trying to add or remove liquidity for a liquidity pool (LP) with an insufficient amount of token A or token B (one of the tokens in the pair).

It might be the case that prices are updating too fast when and your slippage tolerance is too low.


{% endtab %}

{% tab title=»Solution for nerds» %}
OK, so you’re really determined to fix this. We really don’t recommend doing this unless you know what you’re doing.

There currently isn’t a simple way to solve this issue from the PancakeSwap website: you’ll need to interact with the contract directly. You can add liquidity directly via the Router contract, while setting amountAMin to a small amount, then withdrawing all liquidity.

Approve the LP contract

Head to the contract of the LP token you’re trying to approve.
For example, here’s the ETH/WBNB pair: https://bscscan.com/address/0x70d8929d04b60af4fb9b58713ebcf18765ade422

  1. Select Write Contract, then Connect to Web3 and connect your wallet.
  2. In section «1. approve», approve the LP token for the router by entering
    1. spender (address): enter the contract address of the LP token you’re trying to interact with
    2. value (uint256): -1

Query «balanceOf»

  1. Switch to Read Contract.
  2. In 5. balanceOf, input your wallet address and hit Query.
  3. Keep track of the number that’s exported. It shows your balance within the LP in the uint256 format, which you’ll need in the next step.

Add or Remove Liquidity

Head to the router contract: https://bscscan.com/address/0x05ff2b0db69458a0750badebc4f9e13add608c7f#writeContract

  1. Select Write Contract and Connect to Web3 as above.
  2. Find addLiquidity or removeLiquidity (whichever one you’re trying to do)
  3. Enter the token addresses of both of the tokens in the LP.
  4. In liquidity (uint256), enter the uint256 number which you got from «balanceOf» above.
  5. Set a low amountAMin or amountBMin: try 1 for both.
  6. Add your wallet address in to (address).
  7. Deadline must be an epoch time greater than the time the tx is executed.

{% hint style=»warning» %}
This can cause very high slippage, and can cause the user to lose some funds if frontrun
{% endhint %}
{% endtab %}
{% endtabs %}

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.

Pancake: K

The transaction cannot succeed due to error: Pancake: K. This is probably an issue with one of the tokens you are swapping.

Try modifying the amount on “To” field. Therefore putting «(estimated)» symbol on “From”. Then initiate the swap immediately.

This usually happen when you are trying to swap a token with its own fee.

Pancake: TRANSFER_FAILED

The transaction cannot succeed due to error: execution reverted: Pancake: TRANSFER_FAILED.

Make sure you have 30% more tokens in your wallet than you intend to trade, or try to trade a lower amount. If you want to sell the maximum possible, try 70% or 69% instead of 100%.
Caused by the design of Restorative Rebase tokens like tDoge or tBTC.
Understand how restorative rebase tokens work.

Another possible cause of this issue is the malicious token issuer just suspended the trading for their token. Or they made selling action only possible for selected wallet addresses. Please always do your own research to avoid any potential fraud. If the token you are trying to swap but failed with this error code is coming from an airdrop, that is most likely a scam. Please do not perform any token approval or follow any links, your fund may be at risk if you try to do so.

Transaction cannot succeed

Try trading a smaller amount, or increase slippage tolerance via the settings icon and try again. This is caused by low liquidity.

Price Impact too High

Try trading a smaller amount, or increase slippage tolerance via the settings icon and try again. This is caused by low liquidity.

estimateGas failed

This transaction would fail. Please contact support

{% tabs %}
{% tab title=»Solution» %}
If you got this error while removing liquidity from a BNB pair:

Please select «Receive WBNB» and retry.

If you got this error while trying to swap:

Please contact the project team of the token you’re trying to swap. **** This issue must be resolved by the project team.
{% endtab %}

{% tab title=»Reason» %}
This issue (while swapping) is caused by tokens which have hard-coded the V1 PancakeSwap router into their contract.

While this practice is ill-advised at best, the reason for these projects having done this appears to be due to their tokenomics, in which each purchase sends a % of the token to LPs.

The projects affected will likely not work with the V2 router: they will most likely need to create new versions of their tokens pointing to our new router address, and migrate any existing token holders to their new token.

We recommend that any projects which created such tokens should also make efforts to prevent their users from adding them to V2 LP.

The up-to-date router address is https://bscscan.com/address/0x10ED43C718714eb63d5aA57B78B54704E256024E
{% endtab %}
{% endtabs %}

Cannot read property ‘toHexString’ of undefined

«Unknown error: «Cannot read property ‘toHexString’ of undefined»

When trying to swap tokens, the transaction fails and this error message is displayed. This error has been reported on mobile devices using Trust Wallet.

{% tabs %}
{% tab title=»Solution» %}

  1. Attempt the transaction again with increased slippage allowance.
  2. If 1. does not resolve your problem, consider using another wallet such as SafePal for your transaction.
    {% endtab %}

{% tab title=»Reason» %}
This usually happens when trading tokens with insufficient slippage allowance on Trust Wallet.

The exact details of the problem are still being investigated.
{% endtab %}
{% endtabs %}

Execution reverted: TransferHelper: TRANSFER_FROM_FAILED.

The transaction cannot succeed due to error: execution reverted: TransferHelper: TRANSFER_FROM_FAILED.

When trying to swap tokens, the transaction fails and this error message is displayed. This error has been reported across platforms.

{% tabs %}
{% tab title=»Solution» %}

  1. Check to make sure you have sufficient funds available.
  2. Ensure you have given the contract allowance to spend the amount of funds you’re attempting to trade with.
    {% endtab %}

{% tab title=»Reason» %}
This error happens when trading tokens with insufficient allowance, or when a wallet has insufficient funds.
If you’re trading tokens with Restorative Rebase like tau assets tDoge or tBTC, make sure you understand how they work first with this guide to Rebase tokens.
{% endtab %}
{% endtabs %}

Issues with Farms

Fail with error ‘ds-math-sub-underflow’

You’ve run out of allowance of your LP token allowance to the MasterChef contract.

Use token approval manager like unrekt or BscScan to

Issues with Syrup Pools

BEP20: burn amount exceeds balance

Fail with error ‘BEP20: burn amount exceeds balance’

You don’t have enough SYRUP in your wallet to unstake from the CAKE-CAKE pool.

Get at least as much SYRUP as the amount of CAKE that you’re trying to unstake.

  1. Buy SYRUP on the exchange. If you want to unstake 100 CAKE, you need at least 100 SYRUP.
  2. Try unstaking again.

If that still fails, you can perform an “emergencyWithdraw” from the contract directly to unstake your staked tokens.

  1. Go to: https://bscscan.com/address/0x73feaa1eE314F8c655E354234017bE2193C9E24E#writeContract
  2. Click “Connect to Web3” and connect your wallet.
  3. In section “4. emergencyWithdraw”, enter «0» and click “Write”.

This will unstake your staked tokens and lose any uncollected CAKE yield.

{% hint style=»warning» %}
This will lose any yield that you haven’t harvested yet.
{% endhint %}

To stop this happening again, don’t sell your SYRUP. You still need it to unstake from the “Stake CAKE Earn CAKE” pool.

This error has happened because you have sold or transferred SYRUP tokens. SYRUP is minted in a 1:1 ratio to CAKE when you stake in the CAKE-CAKE Syrup Pool. SYRUP must be burned at a 1:1 ratio to CAKE when calling leaveStaking (unstaking your CAKE from the pool), so if you don’t have enough, you can’t unstake from the pool.

{% embed url=»https://dashboard.tenderly.co/tx/binance/0x754e18ceea82acac256b49c2b7a81260f7f86dd5e56ee2e3cc1b6ac864c29a8e» %}

Out of Gas error

Warning! Error encountered during contract execution [out of gas]

You have set a low gas limit when trying to make a transaction.

{% tabs %}
{% tab title=»Solution» %}
Try manually increasing the gas limit (not gas price!) in your wallet before signing the transaction.

A limit of 200000 is usually enough.

The above example is from Metamask; check your wallet’s documentation if you aren’t sure how to adjust the gas limit.
{% endtab %}

{% tab title=»Reason» %}
Basically, your wallet (Metamask, Trust Wallet, etc.) can’t finish what it’s trying to do.

Your wallet estimates that the gas limit is too low, so the function call runs out of gas before the function call is finished.
{% endtab %}
{% endtabs %}

BEP20: transfer amount exceeds allowance

Fail with error ‘BEP20: transfer amount exceeds allowance’

{% tabs %}
{% tab title=»Solution» %}

  1. Use Unrekt.net to revoke approval for the smart contract you’re trying to interact with
  2. Approve the contract again, without setting a limit on spend allowance
  3. Try interacting with the contract again.
    {% endtab %}

{% tab title=»Reason» %}
This happens when you set a limit on your spend allowance when you first approved the contract, then try to swap more than the limit.
{% endtab %}
{% endtabs %}

BEP20: transfer amount exceeds balance

Fail with error ‘BEP20: transfer amount exceeds balance’

You’re probably trying to unstake from a Syrup Pool with low rewards in it. Solution below.

If not, you may be trying to send tokens that you don’t have in your wallet (for example, trying to send a token that is already assigned to a pending transaction). In this case, just make sure you have the tokens you’re trying to use.

{% tabs %}
{% tab title=»Solution» %}
Firstly, let the team know which pool you’re trying to unstake from, so they can top up the rewards. If you’re in a hurry to unstake and you don’t mind losing your pending yield, try an emergencyWithdraw:

You can perform an “emergencyWithdraw” from the contract directly to unstake your staked tokens.

  1. Find the contract address of the Syrup Pool you’re trying to unstake from. You can find it in your wallet’s transaction log.
  2. Go to https://bscscan.com/ and in the search bar, enter the contract address.
  3. Select Write Contract.
  4. Click “Connect to Web3” and connect your wallet.
  5. In section “3. emergencyWithdraw”, and click “Write”.

This will unstake your staked tokens and lose any uncollected yield.

{% hint style=»warning» %}
This will lose any yield that you haven’t harvested yet.
{% endhint %}
{% endtab %}

{% tab title=»Reason» %}
This error tends to appear when you’re trying to unstake from an old Syrup Pool, but there aren’t enough rewards in the pool left for you to harvest when withdrawing. This causes the transaction to fail.
{% endtab %}
{% endtabs %}

Issues with Prediction

Check prediction-troubleshooting.md

Other issues

Provider Error

Provider Error
No provider was found

This happens when you try to connect via a browser extension like MetaMask or Binance Chain Wallet, but you haven’t installed the extension.

{% tabs %}
{% tab title=»Solution» %}
Install the official browser extension to connect, or read our guide on how to connect a wallet to PancakeSwap.
{% endtab %}
{% endtabs %}

Unsupported Chain ID

Switch your chain to BNB Smart Chain. Check your wallet’s documentation for a guide if you need help.

Already processing eth_requestAccounts. Please wait.

Make sure you are signed in to your wallet app and it’s connected to BNB Smart Chain.

Issues buying SAFEMOON and similar tokens

To trade SAFEMOON, you must click on the settings icon and set your slippage tolerance to 12% or more.
This is because SafeMoon taxes a 10% fee on each transaction:

  • 5% fee = redistributed to all existing holders
  • 5% fee = used to add liquidity

This is also why you might not receive as much of the token as you expect when you purchase.
Read more on How to Buy Safe Moon.

Internal JSON-RPC errors

«MetaMask — RPC Error: Internal JSON-RPC error. estimateGas failed removeLiquidityETHWithPermitSupportingFeeOnTransferTokens estimateGas failed removeLiquidityETHWithPermit «

Happens when trying to remove liquidity on some tokens via Metamask. Root cause is still unknown. Try using an alternative wallet.

Internal JSON-RPC error. { «code»: -32000, «message»: «insufficient funds for transfer» } — Please try again.

You don’t have enough BNB to pay for the transaction fees. You need more BEP-20 network BNB in your wallet.

Error: [ethjs-query]

Error: [ethjs-query] while formatting outputs from RPC ‘{«value»:{«code»:-32603,»data»:{«code»:-32000,»message»:»transaction underpriced»}}}»

Increase the gas limit for the transaction in your wallet. Check your wallet’s documentation to learn how to increase gas limit.

Swap failed: Error: [ethjs-query] while formatting outputs from RPC ‘{«value»:{«code»:-32603,»data»:{«code»:-32603,»message»:»handle request error»}}}’

Cause unclear. Try these steps before trying again:

  1. Increase gas limit
  2. Increase slippage
  3. Clear cache

Issues with Profile

Oops! We couldn’t find any Pancake Collectibles in your wallet.

We’re investigating the logic behind this issue. Meanwhile please try the workaround.

{% tabs %}
{% tab title=»Workaround 1″ %}

  1. Go to “Collectible” page, then come back to profile page.
    If you can’t find the link, go to https://pancakeswap.finance/collectibles directly.
  2. Retry profile creation.
    {% endtab %}

{% tab title=»Workaround 2″ %}
Change the environment.

  • Clear the cache and retry.
  • Retry on different browser.
  • Retry on different wallet apps.
  • Retry on the different network (switch between Wi-Fi and cellular)
    {% endtab %}
    {% endtabs %}

Checking username keeps spinning

There are two possible causes.

  1. You have multiple wallets installed on the browser.
  2. Network issue.

{% tabs %}
{% tab title=»Solution 1″ %}
Root cause: You have multiple wallets installed on the browser.

It may make a conflict between wallets. This is out of PancakeSwap’s control and we can do nothing.

  1. Have only single wallet installed on browser, remove the others.
  2. Reconnect the wallet and retry setting username again.
    {% endtab %}

{% tab title=»Solution 2″ %}
Root cause: Network is unstable.

You have to retry.

  1. Delete whatever has been entered in the text field completely.
  2. Re-type username, then please wait for seconds.
  3. If it doesn’t work, reload the page and retry again.
    {% endtab %}
    {% endtabs %}

I’m created a Smart Contract with the abilities to execute a multi call to the 0x DeFi aggregator. I already have the logic on my centralised server who checks for an arbitrage opportunity. When an opportunity is found, the server calls my smart contract (let’s called it ArbitraEdge from now on).

This is the contract of ArbitraEdge: 0x791F46b25376d0477d44bB80F05a378Dd7c8454f

It’s verified so you’ll see the whole code. ArbitraEdge’s contract is pretty simple. It just manages the allowance of some tokens and it execute a multi call to 0x’s contracts.

I’ve been working on this for a really long time but every time I call the «multicallArbitrage()» function inside ArbitraEdge, it usually returns this error:

«BEP20: transfer amount exceeds balance»

I thought that this error can be originated by two things:

  1. At first I thought at a Slippage Error. After debugging a bit with Tenderly I remembered that 0x features a slippage protection and a price impact protection. That said, it means that my server already checks if it’s a good opportunity and if it has a high slippage or a high price impact. If that’s the case, it doesn’t call the multicallArbitrage() function on ArbitraEdge’s contract. Also I set the slippage to 30% just to test if it will get through anyway but unfortunately no. Looked at this, we can say that if the opportunity it’s not good at 100% from the params I set, the call should not reach the smart contract. So we can throw away (I guess) the possibility that the problem is originated by Slippage.

  2. Allowance. I tried to take a look at it, but it seems all fine too. I always approve ALL the tokens both through ArbitraEdge and the 0x Smart contract. Let me explain better:

Usually an arbitrage opportunity on my server looks like this:

  • BUSD/HFT
  • HFT/BUNNY
  • BUNNY/HFT
  • HFT/BUSD

So as you can guess, it’s an arbitrage wrapped in BUSD. In this way the consumer of ArbitraEdge only needs to approve BUSD on his hand. ArbitraEdge will approve the followings: BUSD, HFT, BUNNY. In ArbitraEdge you’ll see that I have two functions: approveArbitrageBot() and approveMaxSpender(). Both of these sets the allowance for the contract itself and to approve 0x’s contract.

0x provides a cool feature that on the api request it gives me a property called “allowance target” so i pass directly that as an allowance.

Looking at tenderly I see that the transaction fails after the second/third swap.

Some examples of failed transactions:

  1. https://bscscan.com/tx/0x2b2be4f852bb89d66ad57082d4ff48b261db02446634cd8323da9e3d919b6c51

  2. https://bscscan.com/tx/0x31f490e4df02f56ed59c1a3607bbe2b59ae545dad53e7d4746fdd50050a8eb14

You can see the input of this transactions from the Tenderly debug transaction.

Понравилась статья? Поделить с друзьями:
  • Fail to load driver reason unknown error 19 htc
  • Failed to add pdh counter paging file total usage error code 0xc0000bb8
  • Fail to hook gettickcount shadow of mordor как исправить
  • Fail to hook gettickcount metal gear solid v ground zeroes как исправить
  • Fail to connect to server wo mic как исправить