ETHEREUM · READING THREAD

The pieces behind an Ethereum transaction.

Follow Ethereum from smart contracts and the EVM to gas, ERC-20 token interfaces and proof-of-stake consensus.

A WORKED LESSON

What an Ethereum token-transfer receipt can tell you.

A wallet may show both a token amount and an ETH fee for one action. Follow an imaginary ERC-20 transfer to see why. Ethereum supplies the shared execution environment, a smart contract holds the token's rules, the EVM runs them, gas measures work, and proof of stake helps the network agree on the resulting history.

The token is a contract's accounting system

An ERC-20 token uses a standard interface for operations such as reading balances and requesting transfers. Its balance is distinct from an account's native ETH balance. The token's name, symbol and displayed decimals help a wallet present amounts, but they do not establish which contract it is. Different contracts can reuse the same labels.

In this example, a user requests that the token contract transfer five display units to another account. The transaction targets that contract and carries the requested function and arguments. This is different from simply sending native ETH. The ERC-20 interface does not promise a stable price, honest administration or that every token implements identical restrictions.

Execution and consensus answer different questions

The EVM defines how Ethereum executes contract instructions and updates state. Nodes evaluating the same valid inputs under the same rules must arrive at the same result. The smart contract checks its own conditions, such as whether the sender has enough token units and whether transfers are permitted.

Ethereum's proof-of-stake system assigns validators roles in proposing and attesting to blocks. This helps establish the accepted ordering and, through checkpoint votes, finality. Validators accepting a transaction does not mean they have audited the token's business, approved its price or guaranteed that the recipient is the intended person. Contract execution and agreement about history are different layers of the explanation.

Read the receipt rather than the button label

Gas measures resource use. A gas limit caps how much the transaction may consume; gas used is what execution actually consumed. For an ordinary execution transaction, its execution fee is gas used multiplied by the effective price per gas. On Ethereum mainnet, the base-fee part is burned and the priority-fee part goes to the block's fee recipient.

An included transaction that reverts can still consume gas while undoing its application state changes. A successful transaction status establishes that execution did not revert; for a token transfer, inspect the actual contract and resulting balance changes or relevant logs too. Some nonstandard token behavior can make a wallet's summary misleading.

WORK IT THROUGH

Separate the five tokens from the execution fee

Assume this fictional call uses 50,000 gas and the receipt reports an effective gas price of 8 gwei. One gwei is one billionth of an ETH. The execution fee is therefore 400,000 gwei, or 0.0004 ETH. If the effective price comprises a 6 gwei base fee and a 2 gwei priority fee, the split is 0.0003 ETH burned and 0.0001 ETH paid as the priority component.

The five transferred token units are a separate quantity. This is not a claim that ERC-20 transfers always use 50,000 gas: contract code, state and transaction details affect consumption. Check the network as well; a rollup can have additional fee components and its own receipt presentation.

Separate the five tokens from the execution fee
Receipt fieldMeaning in this example
Gas used50,000 resource units
Effective gas price8 gwei per unit
Execution fee50,000 × 8 gwei = 0.0004 ETH

Check your understanding

Does a reverted transfer mean the sender paid no network fee?

No. If the transaction was included and executed before reverting, consumed gas is still charged. The application state changes can be reversed while the execution fee remains payable.

Check the primary sources

These references explain the rules behind the lesson. The examples above are fictional teaching scenarios written for this dictionary.

Ethereum foundations

Six words. One connected thread.

Start at the beginning, or pick up where you left off. Each definition leads to the next word in this thread.

Open your first word to start this thread.

Start this thread
  1. Ethereum

    A blockchain that runs programmable accounts and applications, with ether as its native asset.

  2. Smart contract

    A program on a blockchain that executes defined rules when it is invoked.

  3. EVM

    The Ethereum Virtual Machine, which executes Ethereum contract bytecode according to shared rules.

  4. Gas

    The unit Ethereum uses to measure the computation and other resources a transaction consumes.

  5. ERC-20

    An Ethereum interface standard for fungible tokens, including balances, transfers and spending allowances.

  6. Proof of stake

    A consensus approach that uses committed assets to help select validators and hold them accountable.

Reading progress is saved in this browser only. Opening a word marks it as visited.

Explore all reading threads
PASS IT TO THE GROUP CHAT

Share a definition