Understanding Ethereum: EVM, Blocks, Gas, Accounts, and Transactions

Kelvin AjayiKelvin Ajayi
5 min read

Ethereum is more than just a digital currency. It's a platform that lets anyone build decentralized applications (dApps) and smart contracts. If you’re new to Ethereum, understanding the essentials EVM, blocks, gas, accounts, and transactions will help you make sense of how it all works under the hood.

1. Ethereum Virtual Machine (EVM)

The Ethereum Virtual Machine (EVM) is like Ethereum’s global computer. Every node (computer) on the Ethereum network runs the EVM so all smart contracts and applications behave the same way everywhere.

  • Smart Contracts: Small programs written in languages like Solidity, compiled into bytecode that the EVM can run.

  • Deterministic: Every node gets the same result from running the same contract with the same input.

  • Turing Complete: The EVM can execute any computation, as long as there’s enough gas.

2. Blocks

A block is like a page in Ethereum’s public ledger. Each block contains a group of transactions, a timestamp, a link to the previous block (via its hash), and other metadata. Blocks are chained together, making history secure and tamper-proof.

  • What’s Inside a Block?

    • List of transactions (payments, contract calls)

    • Hash of the previous block (keeps blocks chained)

    • Timestamp and block number

    • Nonce (used in consensus)

    • Block’s own hash

  • Why Blocks Matter:
    They make it easy to track, verify, and secure all activity on Ethereum.

3. Gas

Gas is the fuel for computation on Ethereum. Every time you want to send ETH or run a smart contract, you pay a little gas. This helps prevent spam and ensures that people don’t overload the network with heavy computations.

  • How Gas Works:

    • Each operation (like adding numbers, storing data) costs some gas.

    • You set a gas limit (max units to use) and gas price (how much ETH you’ll pay per unit).

    • Gas fees go to validators computers that process transactions and add new blocks.

    • If you use less gas than your limit, you get the unused part refunded.

4. Accounts (EOA & Contract Accounts)

An Ethereum account is an entity that can hold and send ETH and interact with contracts. There are two types:

Externally Owned Accounts (EOAs)

  • Controlled by private keys (like your wallet app).

  • No cost to create.

  • Can start transactions (like paying or using dApps).

  • Made up of a public/private key pair:

    • Private key: Kept secret lets you control the account.

    • Public key: Used to make your address, visible to everyone.

  • Address example:
    0x5e97870f263700f46aa00d967821199b9bc5a120

  • Security Tip: If you lose your private key, you lose your funds forever.

Contract Accounts

  • Controlled by code (smart contracts).

  • Cost ETH to create (because code is stored on the network).

  • Can’t start transactions by themselves they only respond to incoming transactions.

  • No private keys.

  • Address example:
    0x06012c8cf97bead5deae237070f9587f8e7a266d

What’s Inside an Account?

Every account (EOA or contract) has:

  • Nonce: Number of transactions sent (used to prevent duplicates).

  • Balance: ETH amount (in wei, the smallest unit of ETH).

  • CodeHash: For contracts, a fingerprint of their code.

  • StorageRoot: For contracts, a summary of their saved data.

How Are Accounts Created?

  • A new EOA is created by generating a random private key. The address is derived from this key using elliptic curve cryptography.

  • Contract accounts are created when a contract is deployed to the network, and their address is based on the creator's address and nonce.

Wallets vs. Accounts

  • A wallet is an app or tool that helps you use and manage your accounts. The account is your identity on Ethereum, the wallet is your interface to it.

5. Transactions

A transaction is the main way to interact with Ethereum. It’s a signed message from an EOA that can move ETH, deploy contracts, or interact with contracts.

How Transactions Work

  1. Create: The sender forms a transaction, signs it with their private key.

  2. Broadcast: The transaction is sent to the Ethereum network.

  3. Validation: Nodes check its validity (signature, nonce, balance).

  4. Mempool: It waits in a “waiting area” before being picked by a validator.

  5. Block Inclusion: A validator includes it in a new block.

  6. Finalization: Once enough blocks are built on top, it’s considered confirmed.

What’s in a Transaction?

  • From: Sender’s address (must be an EOA)

  • To: Recipient address (can be an EOA or contract)

  • Value: Amount of ETH to transfer (in wei)

  • Nonce: Counter of how many transactions the sender has made

  • Gas limit & gas price: How much computation you’ll allow and how much you’re willing to pay per unit

  • Data: Optional used for contract calls or code deployment

  • Signature: Proves the transaction really comes from the sender

Types of Transactions

  • ETH transfer: Sending ETH to someone else

  • Contract deployment: Creating a new smart contract (no “to” address)

  • Contract interaction: Calling functions on a smart contract (includes a data field)

Example

Sending ETH to a friend:

  • You use your wallet to create a transaction.

  • You sign it with your private key.

  • The transaction is broadcast to the network.

  • It waits in the mempool.

  • A validator puts it in a block.

  • Once confirmed, your friend gets the ETH.

Summary Table

ConceptWhat it isKey Details
EVMEthereum's decentralized computerRuns all smart contracts and logic
BlockA group of transactionsChained together, secures history
Gas"Fuel" for computationPrevents spam, pays validators
AccountEntity with ETH & addressEOAs (user-controlled) or contract accounts
TransactionSigned message to change stateSends ETH, deploys or interacts with contracts

Security Tips

  • Never share your private key! Anyone with it can spend your funds.

  • Always back up your wallet’s recovery phrase.

  • Double-check addresses before sending ETH.

In short:
Understanding EVM, blocks, gas, accounts, and transactions will help you use Ethereum with confidence whether you’re sending ETH, exploring dApps, or building the future of Web3!

Learn More

1
Subscribe to my newsletter

Read articles from Kelvin Ajayi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Kelvin Ajayi
Kelvin Ajayi