When a transaction is marked “Fail” on Polygonscan.com, 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.
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. 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.