{"id":9201,"date":"2023-08-14T15:01:00","date_gmt":"2023-08-14T15:01:00","guid":{"rendered":"https:\/\/www.bitnovo.com\/blog\/?p=9201"},"modified":"2025-09-10T15:27:15","modified_gmt":"2025-09-10T15:27:15","slug":"what-is-gas-in-ethereum","status":"publish","type":"post","link":"https:\/\/www.bitnovo.com\/blog\/en\/what-is-gas-in-ethereum","title":{"rendered":"What is GAS in Ethereum?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Alternar tabla de contenidos\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ffffff;color:#ffffff\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ffffff;color:#ffffff\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-gas-in-ethereum\/#how_does_gas_work_in_ethereum\" >How does Gas work in Ethereum?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-gas-in-ethereum\/#what_is_the_gas_price\" >What is the Gas Price<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-gas-in-ethereum\/#what_is_the_gas_limit_in_ethereum\" >What is the gas limit in Ethereum?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.bitnovo.com\/blog\/en\/what-is-gas-in-ethereum\/#how_to_calculate_ethereum_transaction_fees\" >How to calculate Ethereum transaction fees<\/a><\/li><\/ul><\/nav><\/div>\n<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Tiempo de lectura:<\/span> <span class=\"rt-time\"> 6<\/span> <span class=\"rt-label rt-postfix\">minutos<\/span><\/span><p>If you\u2019ve made it this far, you\u2019ve probably heard of \u2018Ethereum Gas\u2019 and that expression has struck you so much that you\u2019ve decided to investigate its meaning. If you want to know\u00a0<strong>what Gas in Ethereum is and what it\u2019s for<\/strong>, read on.<\/p>\n<p>Before explaining how gas works in Ethereum, it is important for you to know that\u00a0<strong>the Ethereum network works in a similar way to Bitcoin.<\/strong><\/p>\n<p>In the Bitcoin protocol, transactions provide for a commission to be paid in\u00a0<strong>satoshis<\/strong>\u00a0(the smallest decimal unit of Bitcoin).<\/p>\n<ol>\n<li aria-level=\"1\">These commissions\u00a0<strong>serve as an incentive<\/strong>\u00a0to pay for the tasks performed by the miners, who are the ones who keep the network running.<\/li>\n<li aria-level=\"1\">In addition, putting a cost on any transaction<strong>\u00a0ensures the security of the network<\/strong>, as it makes it unprofitable for a hacker to carry out attacks.<\/li>\n<\/ol>\n<p>As you probably already know, Ethereum works on its own open source network, based on a blockchain and, as in the case of Bitcoin, the miners (or Master Nodes) that are part of the network, are responsible for processing and validating transactions. When validating a transaction and once each block in the chain has been successfully resolved,<strong>\u00a0the miners earn a fee in the form of a reward.\u00a0\u00a0<\/strong><\/p>\n<p>This is where the \u201c<strong>gas<\/strong>\u201d comes in, which can be considered, as the name suggests,\u00a0<strong>the fuel that drives the applications and transactions executed on the Ethereum network.<\/strong><\/p>\n<p>So, to better understand the concept of gas in Ethereum, imagine a car that needs gasoline to run. In the same way<strong>\u00a0the Ethereum blockchain needs fuel in order to function<\/strong>\u00a0and process transactions.<\/p>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h2><span class=\"ez-toc-section\" id=\"how_does_gas_work_in_ethereum\"><\/span><b>How does Gas work in Ethereum?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p>You are probably now wondering how gas works in Ethereum and why the Ethereum protocol uses this system. Below I will explain it to you.<\/p>\n<p>The Ethereum network runs as a computer or virtual machine called the\u00a0<strong>Ethereum Virtual Machine<\/strong>\u00a0(EVM) . Most smart contracts running on the EVM are coded using a programming language called Solidity. Each line of code in Solidity requires a certain amount of gas to be executed.<\/p>\n<p>This means that all transactions that users execute on ethereum must provide gas for:<\/p>\n<ul>\n<li aria-level=\"1\">Cover your data (intrinsic gas).<\/li>\n<li aria-level=\"1\">Cover your entire calculation.<\/li>\n<\/ul>\n<p>Like any proof-of-work system, Ethereum relies heavily on the hashrate of its miners. The more miners there are on the network, the more secure and faster the system will be.<\/p>\n<p>So,\u00a0<strong>to attract more miners to the system, it is necessary to use incentives<\/strong>. Miners can earn money by\u00a0<a href=\"https:\/\/www.bitnovo.com\/blog\/en\/how-to-mine-ethereum-a-complete-guide-for-newcomers\/\">mining blocks<\/a>\u00a0and\u00a0<strong>getting rewards in the form of gas.\u00a0<\/strong><\/p>\n<p>This means that, in order to perform an action on Ethereum, a user has to pay a small fee corresponding to the amount of Gas used in order to perform that action on the blockchain.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"what_is_the_gas_price\"><\/span><b>What is the Gas Price<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><b>The gas rates (or price) are called \u201cgwei\u201d<\/b>, a denomination of Ethereum\u2019s native currency, ether (ETH). 1 gwei, also known as nanoether, is equal to 0.000000001 ETH.<\/p>\n<p><b>Gwei are payments users make to miners\u00a0<\/b>to compensate for the computing power required to process and validate transactions on the Ethereum blockchain.<\/p>\n<p><b><i>So what does the price of Gas in Ethereum depend on?\u00a0<\/i><\/b><\/p>\n<p>Well, the Ethereum network can only process a limited number of Gas units at any given time as otherwise the network could be overloaded by heavy usage. For this reason, Miners are in charge of controlling the number of requests that are sent and, at the same time, decide which transaction to give priority to.<\/p>\n<p>How do they do it? By taking into account\u00a0<strong>the Gas Price<\/strong>\u00a0and\u00a0<strong>the Gas Limit.<\/strong><\/p>\n<p>In other words,\u00a0<strong>if you want the miners to give priority to your transaction, you will have to pay more Gas.<\/strong>\u00a0The higher the price you are willing to pay for each unit of Gas, the faster the miners will process your transaction.<\/p>\n<p>One of the advantages of this system is that it separates the cost of the transaction from the cost of ETH, thus preventing transactions from being too expensive.<\/p>\n<p>In fact,\u00a0<strong>Ethereum developers decided to assign constant values to the different operations that users can perform on Ethereum<\/strong>\u00a0so that each task on Ethereum has a predefined Gas value,which means that it does not change according to the rise or fall in the value of ether.<\/p>\n<p>So,\u00a0<strong>although the price of ether is volatile, the cost of operations always remains constant.\u00a0<\/strong><\/p>\n<h2><span class=\"ez-toc-section\" id=\"what_is_the_gas_limit_in_ethereum\"><\/span><b>What is the gas limit in Ethereum?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<div id=\"row-130941395\" class=\"row row-collapse row-full-width align-equal align-center\">\n<div class=\"col small-12 large-12\">\n<div class=\"col-inner text-center\">\n<div class=\"is-divider divider clearfix\"><\/div>\n<div id=\"row-534560961\" class=\"row\">\n<div class=\"col small-12 large-12\">\n<div class=\"col-inner text-center\">\n<div id=\"image_2092668395\" class=\"img has-hover x md-x lg-x y md-y lg-y\">\n<div class=\"img-inner dark\"><img fetchpriority=\"high\" decoding=\"async\" class=\"attachment-large size-large lazyloaded\" src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-1024x701.jpg\" sizes=\"(max-width: 1020px) 100vw, 1020px\" srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-1024x701.jpg 1024w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-300x206.jpg 300w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-768x526.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-1536x1052.jpg 1536w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-2048x1403.jpg 2048w\" alt=\"l\u00edmite de gas en ethereum Bitnovo\" width=\"1020\" height=\"698\" data-srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-1024x701.jpg 1024w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-300x206.jpg 300w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-768x526.jpg 768w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-1536x1052.jpg 1536w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-2048x1403.jpg 2048w\" data-src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/Que-es-el-gas-de-ethereum1-1024x701.jpg\" data-sizes=\"(max-width: 1020px) 100vw, 1020px\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"is-divider divider clearfix\"><\/div>\n<p style=\"text-align: left;\">When we talk about gas in ethereum, we also usually talk about the \u201cGas Limit\u201d.<\/p>\n<p>As I explained earlier, the Ethereum network relies on a system based on the Proof of Work (PoW) algorithm, and miners working on the network use special hardware to process Ethereum blocks full of transactions. In exchange for their service, miners earn rewards through gas payments.<\/p>\n<p>Different types of activities on Ethereum have different gas costs, which increase according to the complexity of the activity on the blockchain.<\/p>\n<p>So,\u00a0<strong>the gas limit refers to the maximum amount of gas you are willing to pay when performing a transaction on the Ethereum blockchain.<\/strong>\u00a0The higher the gas limit, the more you have to work to execute a transaction on the Ethereum network.<\/p>\n<p><b><i>The system works like this:<\/i><\/b><\/p>\n<p>If you want to perform an operation on Ethereum (be it a transaction or a Smart Contract), you must specify a gas limit before sending it to the network. The gas limit is the maximum amount of gas you are willing to pay for this transaction.<\/p>\n<p><b>Normally the gas limit is always greater than the actual amount of gas required for the transaction.\u00a0<\/b><\/p>\n<p>In fact, if you specify a gas limit that is too low (i.e. operations require more gas than you have allocated to the transaction), then a miner will complete the transaction until the gas runs out. If this happens, the transaction will fail and the miner will keep the commissions (taking into account the expense you incurred in terms of time and energy in executing so many transactions). This transaction will be recorded in the blockchain as \u201cfailed\u201d.<\/p>\n<p>Here is a table from the\u00a0<a href=\"https:\/\/ethereum.github.io\/yellowpaper\/paper.pdf\">Ethereum Yellow Paper<\/a>\u00a0that indicates approximately the cost of a specific instruction in gas.<\/p>\n<div class=\"is-divider divider clearfix\"><\/div>\n<div id=\"row-1523497010\" class=\"row\">\n<div class=\"col small-12 large-12\">\n<div class=\"col-inner text-center\">\n<div id=\"image_1262000636\" class=\"img has-hover x md-x lg-x y md-y lg-y\">\n<div class=\"img-inner dark\"><img decoding=\"async\" class=\"attachment-large size-large lazyloaded\" src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/ethereum-yellow-paper.png\" sizes=\"(max-width: 740px) 100vw, 740px\" srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/ethereum-yellow-paper.png 740w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/ethereum-yellow-paper-300x255.png 300w\" alt=\"ethereum yellow paper Bitnovo\" width=\"740\" height=\"628\" data-srcset=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/ethereum-yellow-paper.png 740w, https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/ethereum-yellow-paper-300x255.png 300w\" data-src=\"https:\/\/www.bitnovo.com\/blog\/wp-content\/uploads\/2021\/02\/ethereum-yellow-paper.png\" data-sizes=\"(max-width: 740px) 100vw, 740px\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>As you will see in the table there are basically 3 types of gas limits:<\/p>\n<ul>\n<li aria-level=\"1\"><b>The Gas Limit of a transaction is 21,000 gas.\u00a0<\/b>This means that a basic transaction cannot consume more than this amount of gas.<\/li>\n<li aria-level=\"1\"><b>The Gas Limit of a Smart Contract is higher and can vary<\/b>\u00a0between 130 and 145 thousand Gas Units, depending on its level of complexity.<\/li>\n<li aria-level=\"1\"><b>The Gas Limit of a block cannot exceed 8 million Gas Units.\u00a0<\/b>This means that miners can include as many transactions and shares as long as it does not exceed this limit.<\/li>\n<\/ul>\n<div class=\"is-divider divider clearfix\"><\/div>\n<h2><span class=\"ez-toc-section\" id=\"how_to_calculate_ethereum_transaction_fees\"><\/span><b>How to calculate Ethereum transaction fees<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>There are several useful resources to help you calculate the gas prices and fees needed to execute a transaction on Ethereum.<\/p>\n<p>Because of this, when executing a transaction on Ethereum, I recommend that you\u00a0<strong>use a gas calculator available on various platforms.<\/strong><\/p>\n<p>These calculators give you an estimate of the amount of gas your transaction requires.<\/p>\n<ul>\n<li aria-level=\"1\"><a href=\"https:\/\/ethgasstation.info\/\"><b>Ethereum Gas Station<\/b><\/a>\u00a0is one of the most popular and widely used platforms for estimating the right gas price, as it has an easy to use interface and for its accuracy.<\/li>\n<li aria-level=\"1\">Another platform I advise you to use is\u00a0<a href=\"https:\/\/www.gasnow.org\/\">GasNow<\/a>. This platform is based on SparkPool\u2019s pending transaction queue (which covers all transactions in the main network) and\u00a0<strong>calculates commissions based on the pending transactions it has to process in the network<\/strong>.<\/li>\n<li aria-level=\"1\"><a href=\"https:\/\/twitter.com\/EtherFees\"><b>EtherFees<\/b><\/a>\u00a0is nothing more than a Twitter bot that displays the speed, average, low insurance and gas price number needed to confirm your transaction.<\/li>\n<li aria-level=\"1\"><a href=\"https:\/\/etherscan.io\/gastracker\"><b>EtherScan<\/b><\/a>\u00a0provides information on gas prices and transaction confirmation times. Estegas tracker also displays the histogram of the time spent in the transaction pool and the gas price for the last 1000 blocks.<\/li>\n<li aria-level=\"1\"><strong>Ethviewer<\/strong>\u00a0is an interactive transaction viewer that displays the number of transactions, gas prices paid and the amount of ETH in the pool, sorts transactions by gas prices paid and displays each transaction on the Ethereum blockchain live.<\/li>\n<\/ul>\n<p>If you don\u2019t want to use such tools, you can always calculate your own transaction fees by multiplying the current gas price by the current Ethereum gas limit :<\/p>\n<p><b><i>Gas price * Gas cap = Transaction cost<\/i><\/b><\/p>\n<p>As you have seen, Gas in Ethereum is the lifeblood, the fuel of the Ethereum ecosystem and is, without a doubt, a tremendously important innovation in the blockchain community, since it contributes to creating a fairer and more transparent space in proof-of-work blockchain-based mining.<\/p>\n<div id=\"banner-379218311\" class=\"banner has-hover\">\n<div class=\"banner-inner fill\">\n<div class=\"banner-layers container\">\n<div id=\"text-box-1057555747\" class=\"text-box banner-layer x50 md-x50 lg-x50 y50 md-y50 lg-y50 res-text\">\n<div class=\"text dark text-shadow-1\">\n<div class=\"text-inner text-center\">\n<p><strong>On December 1, 2020 Ethereum 2.0 is born, which is characterized by replacing the Proof of Work algorithm with Proof of Stake. This means that there will no longer be miners consuming energy but transaction validators who will get a return for simply blocking an amount of ETH and keeping it over time.<\/strong><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Tiempo de lectura:<\/span> <span class=\"rt-time\"> 6<\/span> <span class=\"rt-label rt-postfix\">minutos<\/span><\/span>If you\u2019ve made it this far, you\u2019ve probably heard of \u2018Ethereum Gas\u2019 and that expression has struck you so much that you\u2019ve decided to investigate its meaning. If you want to know\u00a0what Gas in Ethereum is and what it\u2019s for, read on. Before explaining how gas works in Ethereum, it is important for you to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":8268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[185],"tags":[],"class_list":["post-9201","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blockchain-en"],"_links":{"self":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/9201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/comments?post=9201"}],"version-history":[{"count":3,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/9201\/revisions"}],"predecessor-version":[{"id":24756,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/posts\/9201\/revisions\/24756"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media\/8268"}],"wp:attachment":[{"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/media?parent=9201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/categories?post=9201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bitnovo.com\/blog\/wp-json\/wp\/v2\/tags?post=9201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}