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