What are the types of accounts in Ethereum?

Ethereum is a decentralized peer-to-peer network. The main currency of the network is Ether. This is given to the miners as a reward for the processing power used to mine the block. Ether can be exchanged for some other valuable assets or stored in accounts.

Accounts in Ethereum

Accounts on the Ethereum network differ from traditional accounts. These accounts can be created by anyone. Their main purpose is to hold the Ether and send transactions. The different types of accounts are given below:

  • Externally owned account (EOA)

  • Contract account (CA)

Externally owned account (EOA)

EOA accounts are created by using the public-private keys. These accounts are controlled by a private key. A private keyA 32 bytes (64 hex characters) randomly generated number. is like the pin code of a debit card, without which no one can generate a transaction. A public key’sIt is a number that is derived from ECDSA which is a digital signature algorithm. hash acts as the account number to which Ether can be sent. However, the last 20 bytes of the hash of the public key, also known as the address, are enough to send Ether.

This account also has some other state fields, which make it functional. These fields are explained below:

  • Nonce: This represents the number of transactions initiated by the account.

  • Balance: This represents the balance of the account in Wei.

  • CodeHash: Empty string as EOA does not have any associated code.

  • Storage: Empty string as EOA does not have any data to store.

Contract account (CA)

CA is a special type of account where Ether is owned and controlled by a piece of code known as the smart contract instead of an entity. However, they still rely on EOA to deploy it and execute their functions.

Smart contracts are mainly written in solidity and uploaded on the Ethereum network, which performs certain actions when specific conditions are fulfilled. This account has a unique address to receive Ether. However, it does not need any private key to generate the transactions as it is already deployed and trusted by the network.

This account also has some other state fields, which make it functional. These fields are explained below:

  • Nonce: This represents the number of transactions initiated by the account.

  • Balance: This represents the balance of the account in Wei.

  • CodeHash: The hash of the smart contract code is stored in this field.

  • Storage: This field contains the data of the storage variables within the smart contract.

Note: Wei is a smaller part of Ether. Consider an Ether to be a dollar and Wei a penny. One hundred pennies are equal to a dollar. However, in this case, 101810^{18} Wei equals one Ether.

EOA vs. CA

The differences between the accounts are as follows:


EOA

CA

New Account

A new account can be created by anyone using wallets like MetaMask.

A new contract account can only be created from an EOA or a smart contract already deployed on the network.

Public key

The public key is derived from the ECDSA digital signature algorithm.

No public key.

Address

The address is derived from the last 20 bytes of the hash of the public key.

The address is calculated when the contract is deployed.

Private key

It is randomly generated.

It has no private key.

Note: Read more about Elliptic Curve Digital Signature Algorithm (ECDSA).

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved