Understanding gas fees on the blockchain

Gas fees, also known simply as “gas,” are transaction fees on a blockchain network. They are required to perform any operation, including transferring cryptocurrencies, minting NFTs, or executing smart contracts on the blockchain. Think of gas as the fuel that powers each action on the blockchain. Without gas, no transaction can take place.
Gas fees serve multiple purposes on the blockchain. One crucial role is incentivizing validators. On the blockchain, validators—software programs or machines operated by humans—are responsible for verifying the accuracy of transactions and then adding them to the blockchain. They also play an essential role in preventing any single entity from controlling the network, ensuring trustless operation, and ensuring consensus among participants. Gas fees reward validators for this work, as they receive these fees as part of their compensation. Gas can also deter spam attacks by adding fees to each transaction. This is because malicious actors would not likely want to flood a network with transactions if there is an associated cost, meaning these fees can also contribute to network security.
How Do Gas Fees Work on Ethereum?
Different blockchain networks have different mechanisms around their gas prices. The exact mechanism of gas fees can vary by blockchain, but here’s a simplified example using the Ethereum network:
Gas Units and Gas Price: Each transaction operation—like transferring tokens or executing a smart contract—requires a certain amount of computational work, measured in gas units. Users specify how much they’re willing to pay per gas unit (the gas price), which is usually measured in "gwei" (giga-wei, or a small unit of Ether).
Calculating the Total Fee: The total transaction fee is the product of the gas units needed and the gas price. For instance, if a transaction requires 30,000 gas units and the user is willing to pay 15 gwei per unit, the total fee would be 450,000 gwei, or 0.00045 ETH.
Dynamic Adjustments: Ethereum and many other blockchains use dynamic fee models, where gas fees fluctuate based on network activity. High demand often results in higher gas prices as more users compete for block space.
How Do Gas Fees Work on Arbitrum?
Gas fees on Arbitrum are a fraction of Ethereum’s. This is because Arbitrum uses a technology called rollups, which aggregates multiple transactions into a single batch. Transactions are processed offchain, with only the proofs and calldata stored onchain. This batch is then submitted to the Ethereum mainnet, reducing Ethereum's computational and storage load. Gas fees on Arbitrum are comprised of the following factors:
Execution Costs: Transactions on Arbitrum require computation and storage. These operations are handled on Arbitrum nodes, and fees are paid in ETH. The costs are much lower than Ethereum’s mainnet because Arbitrum handles transactions offchain.
Layer-1 Data Costs: Arbitrum submits data back to Ethereum to ensure the transactions are secure and decentralized. These costs are associated with recording rollup data on the Ethereum mainnet and are shared among all transactions in a batch.
Gas fees are essential to blockchain networks, ensuring their functionality and security. While high fees can be a challenge, blockchain developers are continuing to innovate in ways that can make the technology more efficient and affordable.