Gas & Transaction Fees
Why transactions cost money
Every action on a blockchain — a transfer, a swap, a deposit — has to be processed and stored by thousands of independent computers (nodes) that keep the network running. Gas is the fee that compensates the network for that computation and storage. Without it, anyone could spam the network with free, endless transactions.
Gas, in plain terms
- Gas units measure how much computational work a transaction requires. A simple transfer costs less gas than a complex swap across multiple pools.
- Gas price is what you're willing to pay per unit, usually set by current network demand.
- Total fee is roughly
gas units × gas price, paid in the network's native token (ETH on Ethereum, MATIC on Polygon, and so on).
Why fees change so much
Gas prices float with demand, similar to surge pricing. When lots of people are trying to transact at once, they bid gas prices up to get included sooner. That's also why the same action can cost very different amounts depending on the network and the time of day — and why some chains (rollups like Optimism, Arbitrum, or Base) exist specifically to process transactions more cheaply while still settling back to Ethereum.
Where this shows up in your wallet
Before you confirm most transactions, your wallet estimates the gas cost and shows it to you — this is your chance to catch something unexpectedly expensive before it's final. Failed transactions can still cost gas, since the network did work even if the outcome you wanted didn't happen, which is part of why testing on lower-stakes networks first is a common practice.