What is a blockchain gas fee?
Summary of gas fees
Gas fee is a commonly used term for the cost that certain blockchain protocol users pay to network validators each time they wish to perform a function on the blockchain.
Gas serves as an incentive for network validators to record transactions accurately and behave honestly in the upkeep of the protocol.
While Ethereum and Polygon use the term “gas fees,” other blockchains such as Solana and Bitcoin use the term “transaction fees.” “Gas” comes from the fee’s similarity to the fuel which keeps a vehicle running.
Gas fees often come as a surprise to blockchain users. On non-custodial services, where transactions take place directly on the blockchain, gas fees can be wildly unpredictable from one minute to the next. On a custodial platform — such as Kraken NFT — transactions take place off the blockchain network and unpredictable gas fees are eliminated as long as the NFT stays on the platform.
Blockchain gas fees explained
Network validators, a distributed group of individuals that run a specialized computer program to authenticate blockchain transactions, provide this computing power. Validators purchase, run and maintain their own equipment as they work to ensure the security and accuracy of a blockchain network.
Gas fees play an important role by transferring value from those in need of a blockchain network service to those delivering the computing power needed to execute it. Gas fees incentivize validators to accurately process transactions and uphold the security of the blockchain ledger.
Network incentives, costs and penalties
On proof-of-work (PoW) blockchains such as Ethereum, gas fees are paid by end users to the miners for validating their transactions. Miners compete using specialized computing equipment to generate random codes called hashes. The first miner able to randomly generate a cryptographic hash starting with the same number of zeroes (or more) compared to the “target hash” is declared the winner.
The successful miner can then fill the new block with pending transactions. This earns the miner newly created cryptocurrency distributed from the block reward and any fees attached to those transactions.
Gas fees are also important in blockchain protocols using the proof-of-stake (PoS) consensus mechanism, such as the next evolution of Ethereum, Ethereum 2.0. On these blockchains, gas fees reward validators who first commit a certain amount of cryptocurrency to the network in order to be selected to verify new transactions.
Those who lock away more coins can run more validators, making them more likely to be selected to validate new transactions than those who commit fewer coins. However, some programmatic randomness at the protocol level means this isn’t guaranteed and validators with fewer coins can still be selected to validate transactions and earn the block reward.
Regardless of the consensus algorithm, validating transactions on a blockchain network isn’t free. Costs include specialized computer equipment and the electricity consumed by that equipment, as well as the financial stake locked away by validators operating these machines.
To become a validator on the new proof-of-stake-based Ethereum 2.0 blockchain, individuals must stake a minimum of 32 ETH.
Penalties can also occur for PoS validators who act outside of the rules set by the network. Commonly known as “slashing,” this is designed to deter bad actors and can result in the partial or complete confiscation of a validator’s stake. In extreme cases of malicious behavior, validators can be removed from a network altogether.
The particulars of slashing penalties vary across blockchains and are defined within the protocol’s rules.
By rewarding honest validators with incentives and penalizing dishonest actors, blockchain networks use principles from game theory to effectively and autonomously maintain the integrity of their information. This allows blockchains to use predefined rules to autonomously secure records without the need for intermediary institutions.
How are gas fees calculated and paid?
Gas fees are based on the fundamental economic concept of supply and demand.
In the case of a blockchain, supply is the total computing power of validators on the network and demand is the total computing power required to execute network users’ submitted transactions.
Returning to the car example, supply is the amount of gasoline stored in a gas station’s tanks and demand is the amount of gasoline the station’s customers want to buy. The price of gas is set in order to maximize profits for network validators / miners and users willing to pay more for gas can have their transaction processed sooner.
Gas fees are typically updated in real time based on current network demand. Depending on their needs and means, users can manually adjust their fee offer to choose between faster-but-more-expensive settlement and slower-but-less-expensive settlement.
Prior to Ethereum’s London Upgrade in August 2021, gas was calculated based on two factors:
- Gas price: The price a user elects to pay for each unit of gas. You can think of it as setting the price you’re willing to pay per unit of fuel.
- Gas limit: This is set by the user and determines the maximum amount of gas that can be used to perform a particular function. You can think of this as the maximum number of gallons of fuel a driver is willing to purchase.
Multiplying these two components together, Gas price x Gas limit, resulted in the maximum gas fee a user might pay to execute a transaction.
After the introduction of EIP-1559, which aims to make gas fees more predictable, gas fees are calculated based on a new formula:
Gas limit x (Base Fee + Priority Fee (Tip)).
Rather than users determining the cost of gas fees, the Ethereum network now implements a base fee that automatically adjusts per block depending on user demand, while also outlining the lowest possible price a user must pay to have their transactions processed.
Once a gas fee is paid, the base fee amount of ETH is permanently removed (burned) from circulation. The update also allows users to tip validators (attach a priority fee) at their discretion in order to have their transactions processed quicker.
In a scenario where a user sets the gas limit too high, the network will automatically refund them the difference after their transaction has been processed.
Ethereum’s gas fees are paid in small denominations of the ETH cryptocurrency native to the Ethereum blockchain. These smaller units of ETH are referred to as GWEI, where one GWEI is equal to one billionth of an ETH (or 0.000000001 ETH).
Online tools such as Etherscan’s Ethereum gas tracker allow users to check average Ethereum gas prices at any time to see how much they might need to pay for a given transaction.
A minimum gas limit of 21,000 GWEI is typically required to process transactions on Ethereum. Offering below this amount (or the stated minimum amount required to perform the computation) will result in a failed transaction, though the network validator will still take the fee.
Enjoy zero gas fees for trades on Kraken NFT
Gas fees have created a significant barrier to entry for many blockchain users, but especially NFT collectors.
Kraken NFT users only pay gas fees when moving NFTs on or off the platform. Trades executed on Kraken NFT do not incur an unpredictable gas fee, whether buying or selling.
Eliminating gas fees takes the stress out of trading NFTs, meaning you can build your dream collection without the worry of unexpected costs.
Explore, curate and secure your NFT collection — with zero gas fees — on Kraken NFT marketplace.
Impacts of network activity on gas fees
A network becomes congested as users submit more transactions. As validators have more transactions to process, costs tend to rise.
The opposite is also true: At times when demand for blockchain services slows or the number of available validators increases, the average price of gas tends to fall.
Demand for NFT-based projects such as CryptoKitties, Stoner Cats and Yuga Labs’ Otherdeed for Otherside have driven the price of gas on the Ethereum network to extreme levels in the past. Amid these frenzies, the cost of gas reached beyond $10,000 and far exceeded the cost of the NFTs themselves.
Additionally, these spikes in network activity have caused significant delays in transaction settlement across other types of applications (DeFi, play-to-earn and more) on the network, leaving many questioning if their transactions would ever be processed at all.