It helps to split the fee in two. Gas <em>units</em> describe the work itself and depend on what the transaction does, so they barely change from one day to the next. The gas <em>price</em> is what you offer per unit, and it moves constantly. Your fee is roughly the units used multiplied by the price you agreed to pay.
The price moves because block space is scarce. Pending transactions wait in a queue, and block producers generally include the ones offering more. When a popular mint or a violent market move floods the queue, everybody bids up at once and ordinary transfers get expensive. When things go quiet, the same transfer is cheap. Live conditions are worth checking before you press send, which is what our <a href="/tools/gas-tracker/">gas tracker</a> is for.
A few mechanics catch people out. A gas limit that is too low means the transaction runs out of work partway and fails, and the work already done is still charged, so you pay for nothing. Underpaying on price can leave a transaction stuck in the queue for hours. Estimates shown in a wallet are estimates, not quotes, and they can be stale by the time you confirm. Our <a href="/toolkit/how-to-estimate-a-network-fee/">fee estimation guide</a> walks through reading them.
Finally, fees are not the same everywhere. <a href="/glossary/layer-2/">Layer-2</a> networks batch many transactions together before settling to the chain beneath, and other chains price block space differently again. Cheaper is not automatically better: different networks make different trade-offs on security, decentralisation and how quickly a transaction is truly final.
How Crypto Transactions and Fees Work
Key takeaways
- You pay for computation attempted, not computation completed, so a failed transaction still costs a fee.
- Gas units come from what the transaction does; the volatile part of your fee is the price per unit.
- The wallet's suggested fee is a moving estimate, so re-check it if you have left the confirmation screen open.
Gas — frequently asked questions
Why did my transaction fail and still charge me?
Because validators performed work before the transaction ran out of gas or hit a condition the contract rejected. That work has to be paid for regardless of the outcome, otherwise the network could be spammed with deliberately failing transactions for free. Raising the gas limit, or fixing the underlying problem such as a missing token approval, usually prevents a repeat.
Can I speed up a transaction that is stuck?
Often, yes. Most wallets offer a speed-up option that rebroadcasts the same transaction with a higher fee, or a cancel option that replaces it with an empty transaction using the same nonce. Both cost money and neither is guaranteed. If the queue is simply very busy, waiting is sometimes the cheapest route, since fees fall back when demand eases.
New to crypto, or filling in the gaps? Work through the essentials in Learn, browse every term A–Z, or see live prices for the coins these concepts power.