When a transaction is marked “Fail” on Etherscan.io, 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 is exhausted.
In the event of a transaction marked as "Reverted," the transaction did not execute and all state has been reverted to the the state before the transaction. Error messages may be included as defined in the contract.
Bad Jump Destination
In the event of "Bad Jump Destination," the errors are related to the nature of the contract. It may be a generic failure caused by technical elements in the code of the contract. Please contact the contract creator for further assistance.
In the event of "Bad Instruction," the errors are related to the nature of the contract. It may be a generic failure caused by technical elements in the code of the contract. Please contact the contract creator for further assistance.
A possible reason for a Bad instruction error indicates a logical error during contract execution; if interacting with a Token Contract, it's possible that the tokens are not transferable yet
ERC-20 Token Transfer might have Failed
The most common reasons an ERC-20 token transfer might have failed are:
- The Token contract is locked (tokens are not transferable yet)
- The sending from the account has an insufficient token balance
- The Token contract does not emit a Transfer event even though the balance is deducted. (Not fully ERC-20 compliant)