Transactions

Learn the different types of Ethereum transactions, their structure, and how to create them.

The Ethereum Virtual Machine (EVM) does not run on its own—everything always starts with an EOA sending a transaction. Transactions are signed messages transmitted to the Ethereum network and are the only things that can change the world state. Only EOAs can initiate a transaction by signing a particular kind of message and sending it to a network node.

There are four types of transactions:

  • Regular: A cryptocurrency transfer from one account to another.

  • Contract deployment: A special transaction used to upload a smart contract code into the world state.

  • Contract execution: A transaction used to execute the code of a deployed smart contract.

  • Internal: Smart contracts can not initiate transactions, but when their execution is triggered (by an execution transaction), they can run other smart contracts by so-called internal transactions.

The London upgrade

In August 2021, The Ethereum London upgrade in changed the way transaction fees are calculated. The upgrade was introduced to address the scalability and fee market pressure of the Ethereum blockchain. Specifically, it realized a new fee market structure to replace the previous gas price auction mechanism.

Before the upgrade, the total transaction fee was calculated as:

After the upgrade, a single base fee is set by the protocol and adjusted periodically. The base fee changes according to the current network demand, which was intended to help reduce network congestion.

A sender can add a tip to the base fee. The tip is an incentive for the validator prioritize the transaction and for this reason, the tip is called a priority fee. The higher the tip, the more likely a transaction will be included in the block. The fee is now calculated as follows:

Finally, the base fee is burned rather than sent to validators (this is part of the burning process of Ethereum triple halving). Only the tip is used as a reward.

Burning the base fee simply means the act of sending Ethers to a wallet address that can not be accessed by anyone (typically to the 0x0000000000000000000000000000000000000000 address). ...