Why transaction fails with "Out of Gas" Error?

The "Out of Gas" error occurs when the assigned Gas Limit for a transaction is not enough to complete the operation on the Ethereum Virtual Machine (EVM).

"EVM is the core computation engine for Ethereum and other Ethereum-compatible blockchains. It is responsible for processing smart contracts and transactions. "

This typically happens with smart contracts or token transfers (like ERC20 or BEP20), as they generally require more gas than a simple ETH transfer due to the additional computational steps involved.

Here’s a more straightforward explanation:

When you send ETH or a token (like an ERC20), each transaction needs "gas" to be processed. If the Gas Limit is set lower that the transaction requires, there won't be enough to complete the it, and it will fail with an "Out of Gas" error. Tokens like ERC20 and BEP20 often need more gas than regular ETH transfers because they involve additional operations through smart contracts, which consume more gas.

In such cases, use higher Gas Limit to allow more gas to be spent. The default limit for token transactions in the Ellipal application is set to 100000, set it to 200000 or even higher if you encounter "Out of Gas" error.

The actual gas usage is unpredictable, as it can vary significantly depending on the token or the specific smart contract function being executed.

Keep in mind that the gas limit you set is just the maximum amount you're willing to spend (the highest possible cost) to prevent errors that could result in excessive costs. If the transaction fails due to running "Out of Gas," the gas already spent is non-refundable. This behavior is a characteristic of the Ethereum blockchain and is not related to the functionality of any particular crypto wallet.

Retour au blog