A transaction in Ethereum is a user-initiated operation that can involve transferring ETH, running a smart contract, or deploying a new contract. Each transaction changes the state of the network and requires a fee (gas).
In Ethereum, transactions can be simple transfers of ETH between addresses, calls to smart contract functions, or deployment of new contracts. All of them are recorded in the blockchain and change the state of the network.
After sending, the transaction goes to the mempool — a list of unconfirmed transactions. Validators select transactions from it, taking into account the commission, and include them in a new block. After adding to the block, the transaction is considered confirmed.
Transactions are confirmed by validators — network participants who have staked ETH. They form blocks, add transactions to them, and sign them, thus completing their processing.
The transaction includes the sender and recipient address, the amount of the transfer in ETH, the gas limit, the gas price, the nonce counter, and the digital signature. When interacting with a smart contract, input data is also added to it.
Nonce is a sequence number of a transaction from a specific address. It is used to determine the sequence of transactions and prevent them from being sent twice.
The key elements of a transaction are the sender and recipient addresses, the ETH amount, gas parameters (limit and price), nonce, and digital signature. If the transaction accesses a smart contract, it contains additional data.
Confirmation time is usually between 15 seconds and several minutes. It depends on the current network load and the amount of commission the sender is willing to pay.
Layer 2 transactions are executed outside the main Ethereum blockchain but are later committed to it. They are used to reduce fees and speed up transactions while maintaining the security of the underlying network.
Gas determines the amount of computation required to complete a transaction. The user pays for it in ETH, and validators receive this fee as a reward for processing transactions.