Skip to content
BeginnerLearn the steps

How to check a gas estimate

Author
CRYPTO PORT Editorial
Published
Updated
Reading time
5 min

In short

Gas cost is the work a transaction requires multiplied by the price you pay per unit of it. Your wallet shows an estimate before submission, so check the breakdown and the ceiling there before signing. Prices rise with congestion, so simply postponing anything that is not urgent lowers what you pay.

Key points

  • Gas cost is work multiplied by unit price — heavier operations cost more
  • The estimate is a prediction; the actual cost moves with congestion
  • Setting the ceiling too low makes it fail, and consumed gas may not come back
  • Fees are paid in that chain's own native currency

Definition

Reading, before you submit, the wallet's projection of the fee you will pay to have a transaction processed on chain.

Start with the mechanism. A block can only process so much, and many transactions compete for that space. How heavy a transaction is depends on what it does — a plain transfer is light, calling a contract is heavier. What you pay is that weight times a unit price, and because the price responds to demand, the same operation costs differently at different times. 'What is gas' covers the background.

The wallet produces an estimate before you send. Typically you get options along the lines of recommended, slower and faster, with the faster ones carrying a higher unit price. For anything not urgent the slower setting is fine, and during heavy congestion simply waiting is more effective. Conversely, when confirmation speed genuinely matters — trading while prices move — paying more is a reasonable call.

Some apps let you open advanced settings and set your own ceiling on the unit price or on how much gas may be consumed. The trap is setting the gas limit below what the operation needs: processing halts, the transaction fails, and the gas consumed up to that point may not be returned. You end up paying for a failure while trying to save. Until you understand the mechanics, leave the automatic estimate alone.

If the estimate looks abnormally high, question the transaction itself rather than the fee. An enormous figure for what should be a simple transfer, or a failure to estimate at all, can signal that the operation being called is not what you assume. With dApp-initiated actions especially, that is worth stopping for.

No figures are given here, because unit prices move constantly and differ by orders of magnitude between chains. If you want a sense of current levels, look at what the explorer for your chain publishes. In practice the most useful habit is simply keeping a little extra fee currency on hand beyond whatever you intend to send.

Watch out for

  • · Fees are paid in the chain's native currency; holding only tokens leaves you unable to send
  • · Setting the gas limit too low can mean the transaction fails and the consumed gas is not returned
  • · An unnaturally high estimate is a reason to stop and question the transaction, not to sign it

Frequently asked questions

  • The transaction failed but I was still charged. Why?

    The fee pays for the attempt to process, regardless of whether it succeeded. If computation ran partway, that work is charged. Common causes of failure are too low a gas limit, or executing when the conditions the contract requires are not met.

Related coins

Read next

Crypto quizzes

Answer a few questions and get your result instantly.

Start