How Ethereum Manages Accounts

decorative line

How to build Ethereum blockchain applications


If you are new to the blockchain technology, taking our Introduction to Blockchain Technology self-paced course is highly recommended. Also, for a comprehensive coverage of blockchain development in Ethereum or mastering Solidity programming, taking our below self paced courses is highly recommended:


In our previous series, we covered the following articles:

In this article, we learn how accounts are created and managed in Ethereum.

Ethereum Account

As we discussed earlier, instead of the UTXO model, Ethereum manages accounts and transactions differently than Bitcoin. In Ethereum, it introduces the world state concept, the collection of all accounts on the blockchain network. World state presents the global state of the Ethereum network, which is constantly updated following any transaction execution. It is a kind of a global database, which is replicated to all Ethereum nodes behind the scene.

Like your bank account, an Ethereum account is used for holding ethers and transacting with each other. It has a 20-byte cryptographic address, an account balance, and state transitions between accounts. The address identifies the owner of the account.
In addition to the address, an Ethereum account contains four fields:

  • Nonce: A counter used to identify distinct transactions
  • Balance: The account's current ether balance
  • Contract code: Optional cryptographic hash code pointing to smart code associated with the contract creation
  • Storage: Optional cryptographic hash code pointing to the account's storage

The following diagram further illustrates the structure of an Ethereum account:

Ethereum blockchain

In Ethereum, a transaction is a state transition of account from one state to another, which is initiated by an external entity. All transactions, whether it is ether movement from one account to another or smart contract code execution, will be collated into a block. Also, the resulting account states and transaction receipts are added to the block too. The new block will be mined by the blockchain network and added to the blockchain. Data in the blockchain is stored in supporting storage, usually a database. Depending on the Ethereum client implementation, it may be stored into a different type of database. For example, the Geth implementation uses Google LevelDB as the underlying database implementation for the global state, as shown here:

Ethereum blockchain


          We will get into different types of accounts in the next section.

Two types of accounts

Accounts play an essential role in Ethereum. Ethereum introduces two types of accounts:

  • One is the Externally Owned Account (EOA), which is used for ether transfer and is controlled by private keys. There is no code associated with EOA.
  • Another one is a Contract Account (CA), which is used for contract creation and smart code execution. The EVM activates and executes the smart contract code logic whenever the contract account receives a message. Beyond normal operations, it may read from and write to internal storage or invoke smart contracts on the other contracts.

They are both state objects; an EOA has a balance, and a CA has both a balance and storage. Without CAs, Ethereum would be limited to the mere transfer of value between accounts, as with Bitcoin.

Externally owned account

Just like your personal or business account in a financial institute, an EOA is associated with an external entity as an owner who has an interest in the account or has ownership of the underlying cryptoassets. Every EOA has a pair of cryptographic keys. It is controlled by the owner's private key. The owner uses its private key to digitally sign all transactions so that the EVM can securely validate the identity of the senders. In the world state, the account is linked to a public address, which is generated based on the owner's public key. We will talk about the address in detail in the Address and walletarticle, as part of the discussion about the Ethereum wallet.

The following diagram shows the structure of the EOA:

Ethereum blockchain

As shown here, EOA has a balance associated the address, mainly used for ether transfer.

Contract account

A CA, or a contract, has an ether balance and associated code, which is linked to the smart contract code in an EVM. It may have optional storage, which is pointing to EVM storage. A state change in a contract account may involve an update of the ether balance, the associated data in the storage, or both. A contract account has an associated address too, which is calculated using the Keccak-256 hash function, based on the address of its creator (sender) and the nonce:

Ethereum blockchain

The associated smart contract code is executed when it is triggered by transactions or messages received from other contracts. Once a new block is added to the blockchain, all participating nodes will execute the contract code again as part of the block verification process.


Next Article

In our next article (How Ethereum Manages Transactions), we discuss how transactions are processed and managed in Ethereum.

This article is written in collaboration with Brian Wu who is a leading author of “Learn Ethereum: Build your own decentralized applications with Ethereum and smart contracts” book. He has written 7 books on blockchain development.


Free Webinars on Blockchain

Here is the list of our free webinars that are highly recommended:

Free Courses

Here is the list of our 10 free self-paced courses that are highly recommended:

Self-Paced Blockchain Courses

If you like to learn more about Hyperledger Fabric, Hyperledger Sawtooth, Ethereum or Corda, taking the following self-paced classes is highly recommended:

  1. Intro to Blockchain Technology
  2. Blockchain Management in Hyperledger for System Admins
  3. Hyperledger Fabric for Developers
  4. Intro to Blockchain Cybersecurity
  5. Learn Solidity Programming by Examples
  6. Introduction to Ethereum Blockchain Development
  7. Learn Blockchain Dev with Corda R3
  8. Intro to Hyperledger Sawtooth for System Admins

Live Blockchain Courses

If you want to master Hyperledger Fabric, Ethereum or Corda, taking the following live classes is highly recommended:


Articles and Tutorials on Blockchain Technology

If you like to learn more about blockchain technology and how it works, reading the following articles is highly recommended:

Articles and Tutorials on Ethereum and Solidity

If you like to learn more about blockchain development in Ethereum with Solidity, reading the following articles and tutorials is highly recommended:

Articles and Tutorials on Hyperledger Family

If you like to learn more about blockchain development with Hyperledger, reading the following articles and tutorials is highly recommended:

Articles and Tutorials on R3 Corda

If you like to learn more about blockchain development on Corda , reading the following articles and tutorials is highly recommended:

Articles and Tutorials on Other Blockchain Platforms

If you like to learn more about blockchain development in other platforms, reading the following articles and tutorials is highly recommended:

Private Custom Tutoring

decorative line

We offer private custom tutoring classes both online and in DC, MD and VA for almost all of our courses or bootcamps. Give us a call or email us to discuss your needs.

$90 Regular

$50 Limited Offer