$EX5 pre-sale — Seed tier · 500M fixed supply · 50% burn · sign up at portal.ex5.comJOIN →
Updated

Gas Limit

In short: On the Ethereum platform, the gas limit is the maximum amount of gas a user is willing to spend to perform a transaction.

On the Ethereum platform, the gas limit is the maximum amount of gas a user is willing to spend to perform a transaction. Gas measures the computational work a transaction needs, and the limit works as a spending cap.

Why it matters

The fee you pay equals the gas a transaction actually uses multiplied by the price per unit of gas. If a transaction needs more gas than its limit allows, it runs "out of gas": all of its changes are reversed, but the gas already consumed is still paid. Gas left unused under the limit is not charged. Wallets estimate a suitable limit automatically. A plain ETH transfer between two regular wallets uses 21,000 gas, the base cost of any transaction, while smart contract calls such as token swaps need more. Each block also has its own block gas limit, which caps the total work that fits in one block. When you withdraw from an exchange, it sets the gas for you and usually covers the network cost through the withdrawal fee.

Example

A user swaps tokens on a decentralized exchange, and their wallet suggests a gas limit. If they lower it too far by hand, the swap fails with an out-of-gas error: no tokens change hands, yet the user still pays for the gas used before the failure. If they set a limit higher than needed, the swap goes through and only the gas actually used is charged.