Transaction And Gas Fees

Transaction And Gas Fees

Learn about Gas like never before!

Cat typing GM on Laptop

Spamming GM to every reader, folks!

Welcome to the in-depth article on the topic of GAS.

We will elaborate on the topic of Transaction Fees, the components of GAS, the breakdown of the Transaction Details page and much more…

So, Buckle up as we go into the world of Web3.

Buckle Up Meme GIF

👁‍🗨 Overview

So, when you will have a transaction on any blockchain whether it is Ethereum, Solana, Berachain, ZK, SUI, or any other blockchain, you will encounter this details page on its Block Explorer.

For this explanation purpose, we will use Sepolia Etherscan.

Etherscan Transaction Detail page

This is known as the Transaction Details page, which is always shown on the Block Explorer of a chain.

After seeing this page for the 1st time, you may think:

What the hell is that? GIF

Don’t stress out after seeing that because we are about to break down every detail out of it.

Sweaty face gif

Whenever a transaction is made on a blockchain, it has a unique Transaction Hash ID, which is given to every single transaction made on any blockchain. That transaction ID can be pasted on a block explorer to get the Transaction Details of that particular Txn.

Now, let’s break down each section of this page

🧐 Breakdown of Transaction

Transaction Fees Section of a Transaction

This is the first part of a Transaction Detail page, it shows all the important details that anyone can check to verify the Status, Hash, Block Confirmation, Time of Execution, Wallet Addresses of Sender and Receiver, Transacted Value, Fees Associated and Gas Price.

  1. Transaction Hash: It is a unique ID for each transaction.

    Transaction Hash

  2. Status: It shows the current state of the Transaction.

    The status could be any of the following:

    1. Pending

    2. Indexing

    3. Success

    4. Cancelled

    5. Failed

    6. Executed

      Status

  3. Block: It shows the number of blocks in which the transaction is recorded. &

    Block confirmations indicate how many blocks have been added since the transaction was produced.

    Block Confirmations: These are the number of blocks which have been mined or validated which have been confirmed to contain your transaction. The more confirmations the more sure we can be of the transaction's validity.

    Block

  4. Timestamp: It records the time the txn was executed and displays the time lapsed since then.

    Timestamp

  5. Wallet Addresses: It stores the wallet addresses associated with this txn.

    Wallet Addresses

💵 Transaction Fees Section

After the above details, we get to the most important section, which shows the amount transferred from one wallet to another.

Each transaction is carried out or executed by various node operators which are known as Miners or Validators.

Gas Section for a TXN

  1. Value: It is the number of Crypto tokens transacted between two parties.

  2. Transaction Fees: This is the amount paid to the block producer for processing the transaction.

    This is calculated as

    Transaction Fees = Gas Usage by Txn * Gas Price in ETH

    Where Gas Usage represents the computational units required to perform the work and Gas Price is comprised of Base Fee and Priority Fee.

  3. Gas Price: The cost per unit of gas specified for the transaction, in Ether and Gwei.

    Where,

    Wei: 1,000,000,000 Wei = 1 Gwei (Gigawei)

    Gwei: 1,000,000,000 Gwei = 1 ETH

    Gwei: It is the representation of a very very small amount of ether spend in form of gas.

    The more the gas we pay, more the miners earn from the txn.

⛽ Let’s Understand “Gas”

What is Gas?

It is the computational measurement of how complex the txn is.

Gas Bill meme

This Gas is paid to the Miners or Validators who execute and verify the transaction as a Node Operator.

⚙ Components of Gas

Gas Fees Snapshot from a txn

In Ethereum, according to EIP 1559 (Ethereum Improvement Proposal 1559), every txn on Ethereum has a few attributes associated with it.

  1. Gas Limit: This is the maximum amount of gas allowed for the transaction. This can be set by the user prior to sending a transaction. It is the amount of gas supplied for this txn to happen.

  2. Usage by Txn: The amount of Gas used by this txn alone is Usage by Txn.

  3. Gas Fees: It consist of 3 attributes

    1. Base Fee: It is the minimum gas price spend on a transaction.

    2. Max Gas Fee: This is the maximum gas fees that we are willing to pay for this txn.

    3. Max Priority Fee: This is Max Fees + Tip that we are willing to pay for this txn to execute. This Tip is given to a Miner as a incentive. This incentivizes the inclusion of our transaction within a block.

  4. Burnt & Txn Savings Fees: This fee is burnt as per the EIP-1559. Burning serves to remove the value from circulation, combating inflation on the protocol.

    This Burnt Gas is calculated by taking the

    Base Fees (in Gwei) * Gas Used = Burnt Gas (in ETH)

    Some amount of gas fee is went to Miners.

    This Miner’s reward is calculated by

    Transaction Fees - Burnt Gas (in ETH) = Miner’s Earning

The more people send transactions at the same time, the more expensive gas fee prices are!

The fee is dynamic, under EIP-1559, if a block is more than 50% full, then Base Gas Fee is increased for the next block. Likewise, if a block is less then 50% full, the fee decreases. This serves to balance network demand and capacity.

To learn more about the EIP - 1559 Proposal, You can watch the following video:

With this, you have successfully learned about Gas and Transaction Fee, so now onwards when you will see this transaction details page, you will be able to understand every single attribute which will make you a better Web3 enthustaist and Developer.

Congratations on learning some new details!
See you in the next article. Till then Dance and enjoy the day! 😇

Video gif. A sloth is moving towards us and doing the shuffle in the aisle of a grocery store. He's dancing remarkably fast and well for a sloth.