[Ethereum] When a transaction has insufficient gas, how long does it take for the funds to be returned to the original wallet

metamaskout-of-gas

I've sent a few transactions from the MetaMask plugin. It appears that the default gas setting is far too low because none of my transactions have gone through. (It has been 12 hours) The question is a 2 parter. Is there anyway to adjust the gas setting of this transaction so that I can get it to go through? If not, how long does it take for the funds to go back to my original wallet so I can try to resend it with more gas. Third part, anyone using MetaMask? How do I adjust the default gas setting in the PlugIn? I'm a total Ethereum Noob so please assume I know nothing.

Thanks,
Tom

Best Answer

The funds will not be returned when a transaction has insufficient gas. When a transaction is Out of Gas, the miner keeps all the gas. This is because in the general case, the miner has to actually process the transaction to determine if and when all gas is consumed. Since the miner has expended resources, it's only fair that they are paid (it's not their responsibility that not enough gas was provided for the transaction).

Transactions can be complex (see some examples from the whitepaper) that's why gas has to be specified upfront, miners can choose which transactions to process, and the miner fee is sometimes only known as part of processing the transaction.

Related Topic