Crypto glossary #3: Transaction fee

Matic Magister
Viberate — Music Data Company
3 min readNov 30, 2017

We’ve reached the final part of our introduction to the crypto world. This article will provide a detailed description of what a transaction fee actually is, who collects it and how it is calculated.

Transaction fee

To do anything on the Ethereum platform, you need to pay for it, and the payment (or fee) is calculated in Ether (ETH). The fee is paid by users sending ETH over the network, and is deducted from their wallet balance. Miners, who mine blocks (confirm transactions) and secure the blockchain, receive the payment. Tx fee (transaction fee) is calculated by multiplying Gas limit and Gas price.

Making sure the transactions go through without any hiccups, we charge 5 VIB for every one of them made from our platform to your preferred wallet. In other words, we add 5 VIB to the total amount of your transfer. The fee will vary depending on the price of our token.

How does it work on the Ethereum network?

Let’s suppose you have a car which consumes 1 liter of gasoline worth $10 per kilometer. If you want to drive that car for 5km, it’ll cost you $50. Similarly, to run a line of code on Ethereum, you burn gas limit, which has a price per unit, called gas price.

  • Car, 10$ (gas price) per kilometer (gas limit)
  • Ethereum, 21Gwei (gas price) per gas (gas limit)

Note: Gwei is a measuring unit of gas price. It represents 1 billionth of an ETH.

The calculation…

The default gas price and gas limit values in MyEtherWallet are: 21Gwei and 21000 gas limit. ETH price is 298$. So let’s do the calculation….

TX fee = Gas price (0.000006258 ETH) x Gas limit (21000) = 0.13$

Gas limit

Usually, when one is talking about “gas” in Ethereum, they are referring to “gas limit”. This simply means some amount of fuel is required to execute that operation or run that particular smart contract code.

Gas is a unit that gets translated further into Ether (ETH) as a cost of performing that action (or work). The requester pays this cost to the miner who actually mines and validates that transaction (or action).

On Ethereum, the gas limit is measured in the unit of “gas”. For instance, if you want to execute 5 lines of code on Ethereum successfully, it will require 5 gas units.

Gas limits are already defined on Ethereum depending upon how much code is needed to be executed on the blockchain for a particular operation.

If you play smart and say that you will feed in less amount of gas to run a particular code/operation, then it will fail and throw an error- “Out of Gas”. So in order to avoid this, you must feed in the right amount of recommended gas for the operation’s or smart contract’s code to get completed successfully.

Rule of thumb: If you want to pay less and are lowering the gas limit below the recommended gas limit, then this will not work. Instead, try lowering the gas price.

Gas price

If you want to pay less for your transaction, you can do so by varying the other variable which also determines the final cost (or Tx fee) of the transaction. This variable is called “gas price”.

But mind you, lowering down the gas price will make the transaction take longer to be mined. This happens because all miners want to mine a transaction that has higher mining reward (i.e. higher Tx fee).

For current average gas prices check out ethgasstation

--

--