When a transaction is marked "Fail" on BSCScan, the funds the sender intended to send are not deducted but remain in the sender’s wallet. However, the “Gas Fee” will still be deducted. Below are the scenarios in where your transaction might fail:
Out Of Gas:
When a transaction has failed due to “Out of Gas,” this means the gas limit set during the transaction is below the required gas (computational cost – see here) needed to perform the transaction. The value of the transaction does not leave your address, but the gas fee is deducted because of the computational cost incurred. You will need to reinitiate the transaction with an appropriate gas limit. Wallet services will usually suggest a gas limit for your transactions. Alternatively, you can also look at similar/past transactions/contracts which have been successfully processed to find out the gas limit required.
Possible reasons for an “Out of Gas” error warning:
- Insufficient amount of gas limit provided
- If you are interacting with a Contract, the minimum amount of gas limit required is > 21,000 (try increasing your gas limit)
- Contract execution exceeds the minimum gas limit required
- Contract execution error occurred, but the VM execution continues until all of the gas limits are exhausted.
- The gas price was set too low. The current minimum gas price is 15 gwei for a transaction on the Binance Smart Chain. But according to this article by Binance, 20 gwei seems like the safer choice.
A transaction that has failed due to this reason would look similar to this:
In the event of a transaction marked as "Reverted," the transaction did not execute and all state has been reverted to the state before the transaction. Occasionally, error messages or the exact reason why the transaction was reverted may also be included as defined in the contract.
An example of a transaction that has failed due to the Reverted error would be: