Skip to main content

What Is a Gas Limit?

What Is Gas?​

On Ethereum and other EVM networks, every action costs gas, a unit of computing work. A simple ETH transfer uses 21,000 gas. A token transfer, swap, or dApp call uses more, because the network runs more code.

Your network fee is:

gas used × gas price

The gas price is what you pay per unit, set by the network's base fee plus your tip. See How to Set Custom Network Fees on EVM Networks.

What Is a Gas Limit?​

The gas limit is the most gas a transaction is allowed to use. It's a safety cap: if the transaction would need more, it stops. You only pay for the gas actually used, not the full limit.

How Gem Wallet Sets the Gas Limit​

You don't need to set a gas limit yourself:

TransactionGas limit Gem Wallet uses
Plain ETH (or other coin) transferExactly 21,000, since it never needs more
Token transfers, swaps, staking, and other contract callsThe network's estimate, plus 50% headroom, so the transaction doesn't run out of gas if conditions change before it's included
Requests from a dApp through WalletConnectThe gas limit the dApp asked for

Why the Fee Shown Is Usually Higher Than What I Pay​

Before you confirm, Gem Wallet shows the most the transaction can cost: the gas limit times the highest gas price you agree to. Two things usually make the final fee lower:

  • The transaction uses less gas than the limit, often much less, thanks to the 50% headroom.
  • You pay the block's actual base fee, which can be lower than the maximum you signed.

To see what you actually paid, see How to Check a Transaction's Final Network Fee.

What Does "Out of Gas" Mean?​

If a transaction needs more gas than its limit, it stops partway and fails with out of gas. Nothing it tried to do happens, but the gas it used up to that point is still paid, because the network did the work.

This is rare for transactions you start in Gem Wallet, because of the 50% headroom. It's more likely with a dApp request that sets a low gas limit. See Why Was My Crypto Transaction Reverted? and Why Was I Charged a Network Fee for a Failed Transaction?.

Common Questions​

Can I change the gas limit? No. Gem Wallet sets it for you. With a Custom fee you can change the Base Fee and Priority Fee, which change the gas price, not the limit.

Why did my swap need so much gas? Swaps run more code than transfers, and a first swap of a token also needs an approval, which is a second transaction with its own gas. See Why Did My Swap Use Two Transactions?.

Do other networks use gas? Only EVM networks use "gas" this way. Solana, TRON, TON, and others have their own fee models. See What are Network Fees?.