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:
- Externally Owned Accounts (EOA) – Controlled by anyone with a private key.
- Contract Accounts – Smart contracts deployed to the network, governed by code. Learn more about smart contracts.
Both account types can:
- Receive, hold, and send ETH/tokens.
- Interact with deployed smart contracts.
Key Differences
| Externally Owned Accounts | Contract 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:
Nonce:
- For EOAs: Tracks sent transactions.
- For contracts: Tracks created contracts.
- Prevents replay attacks.
Balance:
- Wei (1 ETH = 1e18 Wei) held by the address.
CodeHash:
- EVM code hash (empty for EOAs).
StorageRoot:
- Merkle Patricia Trie root hash of stored data.
👉 Explore Ethereum’s architecture in detail
Externally Owned Accounts (EOAs)
Key Pairs
- Private Key: 64-character hex string (e.g.,
ffffffff...). Used to sign transactions. - Public Key: Derived via elliptic-curve cryptography.
- Address: Last 20 bytes of the Keccak-256 hash of the public key (e.g.,
0x5e978...).
Account Creation
Example using Clef (Geth’s signing tool):
clef newaccount --keystore
# Output: Address 0x5e97870f263700f46aa00d967821199b9bc5a120🔑 Security Note: Never expose your private key.
Contract Accounts
- Address: Generated during deployment (e.g.,
0x06012c...). - Nonce-Dependent: Address derives from creator’s address and nonce.
Validator Keys (BLS)
Introduced with Ethereum’s transition to Proof-of-Stake (PoS):
- Enables efficient signature aggregation.
- Lowers minimum staking requirements.
Learn about validator keys.
Accounts vs. Wallets
- Account: The on-chain entity (EOA or contract).
- Wallet: An interface to interact with accounts (e.g., MetaMask).
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.