QTube LearnEthereum and scaling Beginner
Gas fees
Resource metering exists so that execution cannot loop forever, storage cannot grow without cost, and block space is rationed when demand is high. Ethereum’s main unit is gas. The user sets a **gas limit**. The EVM reports **gas used**. Since the London upgrade in August 2021 (EIP-1559), a protocol **base fee** is burned and a **priority fee** (tip) goes to the block producer — today a proof-of-stake validator, not a miner. Failed execution can still consume gas because the work was still done. Solana charges a base fee per signature plus an optional compute-unit priority fee. Bitcoin fees are mostly a function of transaction weight and the fee rate the sender offers. “Gas” is Ethereum vocabulary, not a universal name.
In brief
Resource metering exists so that execution cannot loop forever, storage cannot grow without cost, and block space is rationed when demand is high. Ethereum’s main unit is gas. The user sets a gas limit. The EVM reports gas used. Since the London upgrade in August 2021 (EIP-1559), a protocol base fee is burned and a priority fee (tip) goes to the block producer — today a proof-of-stake validator, not a miner. Failed execution can still consume gas because the work was still done. Solana charges a base fee per signature plus an optional compute-unit priority fee. Bitcoin fees are mostly a function of transaction weight and the fee rate the sender offers. “Gas” is Ethereum vocabulary, not a universal name.
Why metering exists
On replicated execution chains such as Ethereum, validating nodes replay the operations that update shared state. Without a price or protocol limit on those operations, a hostile or buggy program could:
- spin in a loop until the machine stalls;
- write huge amounts of state that every node must store;
- flood the network with transactions that cost almost nothing to send and a lot to check.
ethereum.org’s gas documentation puts it directly: each transaction requires computational resources, and those resources have to be paid for so the network is not vulnerable to spam and cannot get stuck in infinite loops. Once a transaction is included and executes, it charges a fee whether execution succeeds or fails; a transaction rejected before inclusion consumes no gas.
Metering is therefore not a tax on “using crypto.” It is how a replicated computer bounds work. The same problem appears under other names: Bitcoin’s block weight and fee rate, Solana’s compute units and signature fee, and various “gas” clones on EVM-compatible chains. The idea is shared; the implementation is not.
Ethereum gas as the main example
On Ethereum, gas is the unit of computational effort. Each opcode and each byte of calldata has a cost in gas. The fee a sender actually pays is:
gas used × effective price per gas
Fees are paid in ether (ETH), usually quoted in gwei (10⁹ wei). Wei is the smallest ETH unit. ETH is the native asset, not an ERC-20 token.
A simple transfer of ETH from an ordinary key-controlled account has a classic intrinsic cost of 21,000 gas. Contract calls cost more because they execute more operations and may write storage. Newer account behavior and transaction types can change the picture; 21,000 is the textbook number for that simple transfer, not a universal transaction cost.
Gas limit and gas used
The gas limit is the sender’s ceiling for that transaction: the maximum gas they are willing to consume. Wallets usually estimate it. If the limit is below what execution needs, the call fails. ethereum.org distinguishes two failure modes:
- If the limit is so low that the transaction is invalid before inclusion (for example, 20,000 on a 21,000-gas transfer), it can be rejected without being included and without consuming gas.
- If a transaction is included and then runs out of gas halfway through a contract, the EVM reverts state changes, but all gas provided is still consumed for the work performed.
On a successful call, unused gas is not charged. Any amount reserved up front beyond gas actually used at the effective price is returned to the sender.
Gas used is the measured consumption after execution. That is what appears on a block explorer. It is not the same as the limit.
Why a failed call can still cost money
Nodes had to run the code to discover that it failed. If failure were free, an attacker could force everyone to do expensive work at no cost. So revert-on-error undoes the contract’s state changes; it does not undo the fact that the work happened. The sender pays for that work.
EIP-1559: base fee, tip and burn
Until August 2021, Ethereum used a first-price auction: senders bid a single gas price, and block producers preferred higher bids. EIP-1559, authored by Vitalik Buterin, Eric Conner and others, and activated in the London upgrade, replaced that as the main mechanism.
The specification is in the EIP itself:
- Each block has a protocol base fee per gas. It moves up or down from the previous block according to how much gas the parent used compared with a target (the gas limit divided by an elasticity multiplier of 2). If the parent was above target, the base fee rises, by at most 12.5% for a full block. If below, it falls. The change is deterministic. Wallets can predict the next block’s maximum base fee.
- The base fee is burned. It is not paid to the block producer. Burning it removes the producer’s incentive to manipulate the fee in order to collect it, and it means the network fee must be paid in ETH.
- Transactions specify a max priority fee per gas (the tip) and a max fee per gas (a cap that must cover base fee plus tip). The sender pays the base fee of the including block, plus a priority fee capped so that base + tip does not exceed the max fee.
- The producer receives only the priority fee (times gas used). After The Merge (15 September 2022) that producer is a proof-of-stake validator, not a proof-of-work miner. The EIP text still says “miner”; the mechanism did not change when consensus did.
ethereum.org’s current gas page uses the same split: units of gas used × (base fee + priority fee). In their walkthrough, a 21,000-gas transfer with a 10 gwei base fee and a 2 gwei tip costs 252,000 gwei. The recipient gets the ETH; the validator gets the tip; the base fee disappears.
A transaction that pays only the base fee is valid but unattractive, because the validator’s extra revenue from including it is zero. Tips exist so that producers prefer full blocks and so that urgent senders can bid for position.
Users may set maxFeePerGas. If the cap is above base + tip, the extra is not charged. If the cap is below the current base fee, the transaction will not be included until the base fee falls.
Block size and demand
EIP-1559 sets the target gas usage at half the current block gas limit, so a block can use up to twice the target. The protocol aims for an average at the target by raising the base fee when blocks are above target and lowering it when they are below. Persistent congestion therefore shows up as a higher base fee, not only as a longer wait. Transient bursts can fill the extra capacity for a few blocks.
The gas limit itself can move slowly by validator signalling and by network upgrades. It is not a user-chosen number.
Why fee levels vary
Fees move because block space is scarce and demand is not constant.
- More users competing for the next block raise tips and, if blocks stay full, the base fee.
- A complicated contract call uses more gas than a simple transfer, so the same price per gas costs more ETH.
- Token approvals, NFT mints, DEX swaps and contract deployments are different workloads.
- Activity on popular applications can fill blocks even if “sending ETH” looks cheap in isolation.
High fees are not evidence that someone is “stealing gas.” They are a price. They are also a reason many users move activity to rollups and other systems that post compressed data back to Ethereum rather than executing every step on the base layer. That is a scaling choice, not a claim that gas disappeared.
“Gas” is not a universal word
Do not treat Ethereum’s vocabulary as the industry standard.
Solana: signatures and compute units
Solana official docs describe two fee parts, both paid in SOL (lamports):
- A base fee of 5,000 lamports per signature. It compensates validators for verifying signatures. Half is burned; half goes to the validator.
- An optional prioritization fee:
ceil(compute_unit_price × compute_unit_limit / 1,000,000)lamports, paid entirely to the validator, to make the current leader more likely to schedule the transaction.
Compute units (CUs) meter execution. Defaults include 200,000 CUs per ordinary instruction and a maximum of 1,400,000 CUs per transaction. That is a budget, analogous to a gas limit, not a gas price. There is no EIP-1559-style base fee that moves every block on the same formula.
Bitcoin: weight and fee rate
Bitcoin does not use gas. A transaction fee is the difference between input amounts and output amounts, claimed by the miner who includes the transaction. Since SegWit, BIP-141 defines transaction weight and virtual size: virtual size is weight divided by four, rounded up. Wallets and fee markets commonly express the offered fee rate in satoshis per virtual byte (sat/vB), so a larger transaction generally needs a larger absolute fee at the same rate. Miners choose which valid transactions to include, and greater competition for limited block weight tends to raise clearing fee rates.
There is no burned base fee in the Bitcoin protocol, and there is no EVM. Paying a Bitcoin fee is not “buying gas.”
Other networks
Many EVM-compatible chains copied Ethereum’s gas accounting, sometimes with different limits, tokens and whether a base fee is burned. Non-EVM chains invent their own meters. If a wallet says “gas” on a non-Ethereum network, check whether it means Ethereum-style gas or is loosely labeling “network fee.”
Who receives the fee today
On Ethereum after The Merge, validators propose blocks and receive the priority fee (and consensus-layer rewards). They do not receive the base fee. Describing Ethereum fees as “you pay miners” is outdated.
On Bitcoin, miners receive fees plus the block subsidy. On Solana, validators receive half the base fee and all of the priority fee. The economic role is similar — pay the people who produce and check blocks — but the split, the asset, and the unit of work differ.
What this article is not saying
A fee is not investment advice and not a prediction of future ETH supply. Burning the base fee affects issuance math; it is not a reason to buy or sell anything. Cheap fees on another chain are not proof of a better design; they can also mean spare capacity, different security assumptions, or a different user set.
Sources & further reading
-
Gas and fees
Primary · Documentation
Gas as a unit of effort; fee paid on failure; gwei; 21,000-gas simple transfer; base fee, priority fee, max fee; unused-gas refund; out-of-gas still consumes the limit; London / EIP-1559 overview.
-
EIP-1559: Fee market change for ETH 1.0 chain
Primary · Improvement proposal
Primary specification: burned base fee, priority fee, max fee, elasticity multiplier, 12.5% bound, producer receives only the tip.
-
Fees
Primary · Documentation
5,000 lamports per signature; 50% burn / 50% validator; prioritization fee formula; compute-unit defaults and 1,400,000 CU transaction cap.
-
Transactions
Primary · Documentation
Bitcoin fees as input-minus-output, based on signed transaction size / demand for block space; miner chooses what to accept.
-
BIP 141: Segregated Witness (Consensus layer)
Primary · Improvement proposal
Primary specification for transaction weight and virtual transaction size.
-
send (29.0.0 RPC)
Primary · Documentation
Current wallet RPC documentation showing fee rates specified in sat/vB and transaction inputs estimated in weight units.
-
Scaling
Primary · Documentation
High base-layer fees as a reason for rollups and other off-chain execution; L2 as a fee-reduction path, not a rename of gas.
-
The Merge
Primary · Documentation
15 September 2022 transition to proof of stake; validators propose blocks; The Merge did not change fee-market mechanics or capacity.