Skip to content

Instantly share code, notes, and snippets.

@tucq88
Last active August 24, 2018 03:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tucq88/00c138a7710abf4c6d36d91f354b3abd to your computer and use it in GitHub Desktop.
Save tucq88/00c138a7710abf4c6d36d91f354b3abd to your computer and use it in GitHub Desktop.
Transaction Fee 101

tx-pool-infographic

When you

  • send tokens,
  • interact with a contract,
  • send ETH,
  • or do anything else on the blockchain,

You must PAY for that computation. That payment is calculated in Gas and gas is paid in ETH.

TX fee = gas limit * gas price 

gas limit - amount of gas

  • A higher gas limits mean that more computational work must be done
  • 21,000 is the gas limit for standard transactions
  • 200,000 or more is for smart contract process
  • For accomplish transaction

gas price - cost for a gas unit

  • the amount of ETH you’re willing to pay for every unit of gas
  • 1 ETH = 10^9 GWEI
  • For miner

=> Standard transaction require 21,000 gas limit and you're ok with gas price at 20 GWEI So you have to pay 21,000 * 20 = 42,000 GWEI = 0.00042 ETH for that transaction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment