Web3 Dictionary Logo
Web3 Dictionary
Contribute

Categories

AllBlockchainDappsDAOsDeFiNFTsRegulationSecuritySmart ContractsTokenomicsWalletsWeb3 GamingOthers
  1. Web3 Dictionary
  2. Blockchain
  3. Gas Limit
Blockchain

Gas Limit

The maximum amount of computational work (gas) that a transaction or smart contract execution is allowed to consume.

Last Updated

2026-03-19

Related Concepts

GasTransactionEthereum Virtual Machine
Web3-Explorer Logo

Scale Blockchain Infra

AD

Smart contracts, protocol integrations, and scalable architecture for high-performance Web3 products.

See Blockchain Services

What is Gas Limit?

Gas limit is the maximum amount of computational work a user allows a transaction to perform. It acts as a safety mechanism to prevent a malfunctioning or malicious smart contract from consuming all funds in a user's wallet.

How does Gas Limit work?

  1. The user sets a maximum gas units value before sending.
  2. The EVM tracks gas usage as the transaction executes.
  3. If execution finishes under the limit, the user is only charged for what was used.
  4. If the limit is reached before completion, the transaction fails and reverts.
  5. The gas used up to the point of failure is not refunded.

Why does Gas Limit matter?

Gas limits protect users from unexpected costs caused by bugs like infinite loops in smart contracts. They also help the network manage block space by defining the maximum size of any single transaction.

Key features of Gas Limit

  • Maximum computational units per transaction
  • Safety cap for user funds
  • Prevents runaway contract execution
  • Unused gas is refunded to the sender
  • Critical for block size management

Examples of Gas Limit

A standard ETH transfer has a fixed gas limit of 21,000. Complex DeFi swaps typically require a limit between 100,000 and 300,000 to ensure success.

External References

  • Understanding Gas Limits
  • EIP-1559 Fee Mechanism