
A gas fee is the amount you pay to have your transaction included in a block and executed by the network. Every operation on a smart contract consumes a specific amount of gas—a unit of computational work. The total fee is gas used multiplied by the gas price you are willing to pay, which is set in the network's native token (ETH on Ethereum, MATIC on Polygon, and so on).
Gas fees fluctuate constantly because block space is limited. When demand for transactions exceeds supply—during a popular NFT mint, a market crash, or a major DeFi event—gas prices spike as users bid against each other to get included first. When the network is quiet, fees collapse. The mempool is where this auction visibly plays out in real time.
Different operations cost different amounts. A simple ETH transfer costs around 21,000 gas. A token swap on a DEX might use 150,000 to 300,000 gas. A complex multi-step DeFi transaction can run into the millions. Layer 2 rollups like Arbitrum and Optimism dramatically reduce these costs by batching transactions and posting them to Ethereum, which is why most active users now spend the bulk of their time on L2s.