How to Fix a Trust Wallet Transaction That Failed Due to an Out of Gas Error on BSC
A transaction that fails with an "out of gas" error on BSC while using Trust Wallet means the gas limit you set was too low for the operation the smart contract needed to perform. The fix is to resend the transaction with a higher gas limit, and if the transaction is stuck, you may need to clear it first by resetting the nonce or using a "cancel" transaction.
What "Out of Gas" Actually Means on BSC
Every transaction on the Binance Smart Chain (now called BNB Smart Chain) requires computational work. The gas limit is the maximum amount of that work you are willing to pay for. If the actual work exceeds the limit, the transaction fails partway through, the changes are rolled back, and you still pay the fee for the work that was done.
This is different from the gas price, which is what you pay per unit of work. A low gas price causes a slow or stuck transaction. A low gas limit causes a failed transaction.
The most common cause is interacting with a complex smart contract - such as a DEX swap, a liquidity pool, or a yield farm - that uses more steps than a simple token transfer. BSC's standard gas limit for a simple BNB transfer is 21,000, but a swap on PancakeSwap might need 250,000 to 500,000 or more, depending on the route and the tokens involved.
Step 1: Check Whether the Transaction Is Still Pending or Already Failed
Open Trust Wallet and go to the transaction history for the relevant token (BNB or the token you tried to swap). Look for the failed transaction.
- If it shows "Failed" with a red indicator, you can simply send a new transaction with a higher gas limit. No special cleanup is needed.
- If it still shows "Pending" or is stuck with no confirmation, you need to cancel or replace it before you can send a new one.
Step 2: Increase the Gas Limit and Resend
When you retry the transaction:
- In Trust Wallet, tap the DApp browser and navigate to the same DEX or contract you were using.
- Initiate the same swap or action.
- Before confirming, tap the gear icon or the "Advanced" section to reveal gas settings.
- Increase the gas limit (not the gas price) to a higher number. A common safe starting point for a BSC swap is 300,000. For more complex operations, you may need 500,000 or 1,000,000.
- Leave the gas price at the recommended value or set it slightly higher to avoid a slow confirmation.
- Confirm and sign.
If the transaction fails again at the higher limit, increase it further. Some contracts are poorly optimized and require very high limits. You can look up the specific contract's typical gas usage on BscScan by searching the contract address and reviewing recent transactions.
Step 3: If the Transaction Is Stuck Pending
A pending transaction blocks any new transaction from the same address with the same nonce. Trust Wallet does not always give you a visible "cancel" button. The workaround:
- Open Trust Wallet and tap Settings > Wallet > your wallet address.
- Look for an option to "Reset" or "Clear" pending transactions. If present, tap it.
- Alternatively, import your seed phrase into a wallet like MetaMask (on a secure, clean device) and use the nonce management tools there to either speed up or cancel the pending transaction.
If you do not have access to another wallet, you can also try sending a 0 BNB transaction to yourself with the same nonce and a higher gas price. This replaces the stuck transaction. To do this:
- In Trust Wallet, send 0 BNB to your own address.
- In the advanced gas settings, set the nonce to the same number as the stuck transaction.
- Set a gas price significantly higher than the stuck transaction.
- Confirm. If it goes through, the stuck transaction is replaced.
What actually prevents this problem
- Set the gas limit manually before confirming any transaction that involves a smart contract. Do not rely on the auto-suggested limit for unfamiliar contracts.
- Use the DEX's own estimate. Most DEXes on BSC (PancakeSwap, Biswap, etc.) estimate the gas limit for you when you initiate a swap. Trust Wallet may override this with a lower default. Check the estimate in the DApp interface before confirming.
- Avoid using Trust Wallet's built-in swap feature for complex DeFi operations. The built-in swap often uses simplified gas settings that can be too low. Use the DApp browser instead.
- Keep some BNB for gas. If your BNB balance is very low, you may not have enough to cover the gas even at the correct limit. The transaction will fail, and you will lose the gas fee.
When the Error Keeps Happening Despite a High Gas Limit
If you have set a gas limit of 1,000,000 or more and the transaction still fails with "out of gas," the problem is not the gas limit. Possible causes:
- The token contract has a transfer fee or a tax that the swap does not account for.
- The liquidity pool has changed or been drained.
- You are trying to swap a honeypot token that blocks sells.
- The contract is paused or requires a whitelist.
In these cases, check the token contract on BscScan for recent transactions and read the contract's code if you can. If you cannot determine the cause, do not keep spending gas on failed attempts.
Not financial advice. 4547onsol.xyz publishes market data and general information about digital assets. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.
Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.