Ethereum Accounts: A Comprehensive Guide

·

Introduction

An Ethereum account is an entity with an Ether (ETH) balance capable of sending transactions on the Ethereum network. Accounts can be controlled by users or deployed as smart contracts.


Prerequisites

To better understand this guide, we recommend reading our Introduction to Ethereum.


Types of Ethereum Accounts

Ethereum features two account types:

  1. Externally Owned Accounts (EOA) – Controlled by anyone with a private key.
  2. Contract Accounts – Smart contracts deployed to the network, governed by code. Learn more about smart contracts.

Both account types can:

Key Differences

Externally Owned AccountsContract Accounts
Free to create.Creation costs gas (network storage).
Can initiate transactions.Only transact when receiving a call.
Limited to ETH/token transfers.Execute complex code (e.g., create contracts).
Governed by public/private key pairs.Controlled by smart contract logic.

Anatomy of an Ethereum Account

All Ethereum accounts contain four fields:

  1. Nonce:

    • For EOAs: Tracks sent transactions.
    • For contracts: Tracks created contracts.
    • Prevents replay attacks.
  2. Balance:

    • Wei (1 ETH = 1e18 Wei) held by the address.
  3. CodeHash:

    • EVM code hash (empty for EOAs).
  4. StorageRoot:

    • Merkle Patricia Trie root hash of stored data.

👉 Explore Ethereum’s architecture in detail


Externally Owned Accounts (EOAs)

Key Pairs

Account Creation

Example using Clef (Geth’s signing tool):

clef newaccount --keystore
# Output: Address 0x5e97870f263700f46aa00d967821199b9bc5a120

🔑 Security Note: Never expose your private key.


Contract Accounts


Validator Keys (BLS)

Introduced with Ethereum’s transition to Proof-of-Stake (PoS):


Accounts vs. Wallets


FAQs

1. Can I recover a lost private key?

No. Losing a private key means losing access to funds. Always back up securely.

2. Are contract addresses case-sensitive?

Yes. Ethereum addresses are hex-encoded (case-insensitive in practice but follow checksum standards).

3. What’s the cost to create a contract account?

Gas fees vary based on contract complexity and network conditions.

4. How do EOAs differ from Bitcoin addresses?

EOAs support smart contract interactions; Bitcoin addresses are for simple transfers.

5. Can I change a contract’s address?

No. Contract addresses are immutable post-deployment.

6. What’s the role of nonce in EOAs?

Nonces ensure transaction order and prevent replay attacks.


Further Reading

👉 Master Ethereum with advanced tutorials