Gas

Unit that measures the computational cost of executing operations on a blockchain such as Ethereum.

What is it? - Dummies

El gas It's like the digital gasoline what you need for something to work on the blockchain. If you want to send cryptocurrency or use a decentralized app, you have to pay a small amount of gas for the network to process it. Without gas, The operation is not executed. The more complicated the action, More gas do you need.

What is it? - PRO

Gas It's the unit of measure that determines the computational cost required to execute operations, transactions and smart contracts on Ethereum and other blockchains compatible with the Ethereum Virtual Machine (EVM). Each instruction or function in a smart contract consumes a specific amount of gas, and the total amount of gas required for an operation reflects how complex that action is from the point of view of processing and storage.

For a transaction to be processed on the network, the user must define:

  • Gas Limit: the maximum amount of gas you are willing to spend.
  • Gas price: the price per unit of gas, usually expressed in gwei (a fraction of ETH).

The total cost of a transaction is calculated as:
gas used × gas price = commission in ETH

In Ethereum and its L2, this system performs several functions:

  • Avoid misuse of computing resources (like infinite loops).
  • Allows you to prioritize transactions depending on the price offered (greater incentive = faster).
  • Reward validators or miners that process transactions.
  • Adjust the internal economy of the network through mechanisms such as EIP-1559 (base fee + tip).

Gas can vary greatly depending on:

  • The state of network congestion.
  • The type of transaction (e.g. transferring ETH vs. minting an NFT).
  • The blockchain used (e.g. Ethereum mainnet, Arbitrum, Polygon).

In L2 solutions, gas still exists but is usually much cheaper. In many cases, the end user is even abstracted.

Key points

  • It is the measure of the computational cost of an operation in the blockchain network.
  • Each executed transaction or action consumes a specific amount of gas
  • It is paid in native cryptocurrency (such as ETH) to encourage validators or miners
  • Avoid abuse and ensure the proper functioning of smart contracts
  • Varies depending on network, traffic and type of operation
  • Advantages

  • Control the efficient use of resources on the blockchain network
  • Encourages transaction processing by nodes
  • Allows you to adjust the execution priority Depending on the gas price
  • Encourages code optimization in dApps and smart contracts
  • It supports the economic sustainability of the network (base fee, burning, etc.)
  • Disadvantages

  • Can be expensive in times of congestion, affecting usability
  • It hinders the non-technical user experience, especially if you don't understand how it's calculated
  • Requires accurate estimates to avoid failures in complex contracts
  • Misconfigured, can lead to failed or slow transactions
  • It's not uniform across networks, which can lead to confusion
  • Related blog posts

    Related Concepts

    Related Services

    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World
    ·
    From Spain to the World

    HEADQUARTERS

    C. Marqués de Larios, 4
    29005 - Malaga

    LABS

    C. La Gitanilla, 17
    29004 - Malaga

    INNOVATION LEADERS
    Contact us

    WE WILL HELP YOU

    Request a free consultation to learn about our solutions

    Your information is submitted succesfully!

    We will contact you via the email you provided in the form.

    Oops! Something went wrong while sending the message.

    Contact us

    WE WILL HELP YOU
    Request a free consultation to learn about our solutions
    Your information is submitted succesfully!
    We will get in touch with you through the email you provided in the form.
    Oops! Something went wrong while sending the message.