Glossary index › G

Gas

Gas is the fee paid to process a transaction on a blockchain network like Ethereum - not to be confused with natural gas, the physical commodity traded alongside oil and gold; this is an entirely different, blockchain-specific concept. Every action on a blockchain, from sending cryptocurrency to interacting with a smart contract (like swapping tokens on a decentralized exchange or minting an NFT), requires computers around the world to do actual computational work to process and verify it, and gas is the price paid for that work. It's typically paid in the network's own native token - on Ethereum, in fractions of ether called gwei, where one gwei is one-billionth of an ETH.

How Gas Fees Actually Work

A simple transaction, like sending ETH from one wallet to another, requires relatively little computation and uses a fixed, small amount of gas - commonly around 21,000 "gas units." A more complex transaction, such as swapping one token for another through a decentralized exchange, requires far more computational steps and can use several times that amount. The total fee is the amount of gas used multiplied by the current gas price, and that price is not fixed - it works like an auction. When many people are trying to transact at the same time, they effectively bid against each other by offering to pay a higher gas price to get their transaction processed sooner, and the network prioritizes the highest bidders. This is why gas fees can spike dramatically during periods of high network activity, such as a popular NFT launch or a sudden burst of trading during a sharp price move.

What decides how many units an action consumes is worth knowing, because it explains why costs differ so much between things that look similar. The protocol charges per operation, and the expensive operations are the ones that write data the whole network must store forever: changing a stored value costs orders of magnitude more than performing arithmetic, and creating a new entry costs more than updating an existing one. This is why approving a token for the first time costs more than the trade that follows it, why a swap routed through several pools costs more than a direct one, and why clearing an old approval can actually refund part of the fee: deleting stored data frees space the network no longer has to keep.

Why This Matters in Practice for a Trader

The single most important practical fact for a beginner: gas must be paid to the network itself, not to a broker or exchange, and - critically - it generally has to be paid even if the transaction ultimately fails. If a smart contract interaction runs out of the gas the sender was willing to pay before it finishes executing, the transaction reverts and does nothing, but the gas already consumed doing the partial computation is still gone. This trips up a lot of beginners who assume a failed transaction costs nothing, the same way a cancelled stock order costs nothing.

A concrete example makes the mechanics clear. Suppose a simple ETH transfer uses 21,000 gas units, the current gas price is 30 gwei, and ETH is trading at $2,500. The fee is 21,000 × 30 gwei = 630,000 gwei = 0.00063 ETH, or roughly $1.58. If network activity suddenly surges - say, because of a major token launch - and the gas price jumps to 200 gwei, that exact same transfer now costs 21,000 × 200 gwei = 0.0042 ETH, about $10.50. The transaction itself didn't change at all; only network demand did, and the cost went up more than sixfold.

How This Differs From Fees on Other Markets

This is a genuinely crypto-specific mechanic with no true equivalent on forex, stocks, or commodities. A forex broker's spread or commission and a stock exchange's trading fee are set by the broker or exchange and are broadly predictable in advance; gas is set by the collective behavior of everyone else using the network at that exact moment, which means the same action can cost very different amounts an hour apart. The closest - but still much milder - parallel on traditional markets is slippage during unusually high trading volume, where an order might fill at a slightly worse price than expected; gas fee spikes on a congested blockchain can be an order of magnitude more dramatic than that. Two related terms are covered separately: the gas limit, which is the maximum amount of computation a transaction is authorised to consume, and the gas price, which is what is paid per unit of it. The fee described here is simply the two multiplied together.

The most useful thing a user can do about fees is choose when and where to transact, because the same action has no fixed price. Demand follows a daily and weekly rhythm, so the identical transfer can cost a fraction of its peak price a few hours later, and wallets and block explorers publish the current level so the wait can be judged rather than guessed. Beyond timing, the larger saving is moving the activity off the base chain entirely: the rollup networks settle to Ethereum while doing the computation elsewhere, and routine transfers and swaps there cost cents rather than dollars.

The other habit worth building is treating a failed transaction as a cost rather than a non-event. Because the computation performed before a failure is charged for, a user who repeatedly resubmits a transaction that keeps reverting is paying each time for nothing. The common causes are a slippage tolerance set too tight for how fast the market is moving, an allowance that has not been granted to the contract, and an estimate made before conditions changed. Each is visible in the simulation most wallets now run before submission, and reading that preview is the cheapest protection available against a fee paid for an outcome that never arrives.

What is gas in crypto? The fee paid to have a transaction processed on a blockchain such as Ethereum. It has nothing to do with natural gas, the physical commodity, despite the shared word.
What is it paying for? Computation. Every action, from sending coins to running a smart contract, makes computers across the network do measurable work, and gas is the price of that work, paid in the network's own token.
What is a gwei? The unit gas prices are quoted in: one billionth of an ether. Quoting fees in whole ether would mean a string of zeros, so the smaller unit is used instead.
How is the total fee calculated? Gas used multiplied by the price per unit. A simple transfer uses a fixed 21,000 units, while a swap on a decentralised exchange takes several times that because it triggers far more steps.
Why do fees spike? Because the price per unit is set by an auction rather than a tariff. When many people want to transact at once they bid against each other for inclusion, so the same action can cost several times more an hour later.
Can you show that? A transfer using 21,000 units at 30 gwei costs 0.00063 ETH, about 1.60 dollars with ether near 2,500. If demand pushes the price to 200 gwei, the identical transfer costs 0.0042 ETH, about 10.50, with nothing about the transaction changed.
Do I pay if the transaction fails? Usually yes, and this catches beginners badly. If a contract call runs out of the gas allowed, it reverts and achieves nothing, but the computation already performed has been paid for and is not refunded.
Can I do anything about the cost? Three things: wait, since prices fall when demand does and are usually lowest in quiet hours; avoid transacting during a launch or a sharp market move; and use a layer-2 network, where the same action often costs cents.
Who receives the fee? The network, not a broker or an exchange. Since 2021 the bulk of it, the base fee, is destroyed rather than paid to anyone, with only the tip going to the validator that includes the transaction.
Is there an equivalent in other markets? Nothing close. A broker's spread or an exchange fee is set in advance and known; this is set by everyone else's behaviour at that moment, which makes it far less predictable than any traditional trading cost.

By InsiderTicker Editorial Team · Last updated

All news on Crypto →