5 min read
Ethereum, a decentralized blockchain powered by a permissionless peer-to-peer (P2P) network is one of the most popular and widely used blockchain platforms today. In this guide, you'll learn more about Ethereum and the different types of accounts available, such as externally owned accounts (EOA) and smart contract accounts (SCA).
Let's get started!
What is Ethereum?
Ethereum is an open and public blockchain that anyone can read from or publish data to. It's powered by computers across the globe and allows for the execution of smart contracts via the Ethereum Virtual Machine (EVM). Ether (ETH) is the currency of Ethereum and it is used to pay for transactions costs to keep the network running and can also be used to transfer value from one entity to another.
To learn more about Ethereum and smart contracts, check out these in-depth guides: What is Ethereum? & An Overview of How Smart Contracts Work on Ethereum.
What are Ethereum Accounts?
Ethereum features two distinct types of accounts: externally owned accounts (EOA) and smart contract accounts. Both account types can send and receive Ether (ETH) as well as interact with smart accounts deployed (i.e., published) on the blockchain. Let's dive into each a bit deeper.
Externally Owned Accounts (EOA)
An externally owned account (EOA) is an account controlled by a cryptographic keypair and is most commonly referred to as a wallet. A key pair consists of a public key (a.k.a public address) and a private key. A public key can be compared to an email address; this is something that you may share with others, and don't risk the loss of control of your account. A public key (also known as a public address) is represented by a long string of hexadecimal values such as - 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045. A private key is a longer set of random numerical values and should be kept confidential (this is like your email's password). The private key governs access to the assets and activity linked to your public address and allows you to create valid transactions and submit them to the Ethereum blockchain (transactions are submitted to the mempool).
It doesn't cost anything to generate an externally owned account (e.g., keypair), however, you will need to pay for transaction costs when writing (i.e., changing the state) on the Ethereum blockchain. It's important to note that EOAs do not store data or state; they simply can authorize state changes where they have authority. As such, assets are not directly held within an externally owned account (EOA); instead, they are associated with it through a mapping in the world state of Ethereum.
One limitation of EOAs is that they cannot hold smart contract code logic with which other entities can interact with (we will get into this next).
Smart Contract Accounts (SCA)
Smart contract accounts (SCA) are different than EOAs as they cost transaction fees to be created and do not contain a private key pair. Instead, they contain EVM code and storage. EVM code is arbitrary logic entities can create to introduce simple or complex features. Smart contract accounts are controlled by the EVM code stored within them (not like a private key in an EOA). To summarize, smart contract accounts have the potential to offer more complex features than just sending, receiving, and interacting with other smart contracts as they can contain arbitrary logic (e.g., EVM code, a.k.a smart contract code) themselves.
Below are some examples of what could be coded into a smart contract account. Note that these functionalities at a high level are programmed functions to which you can read and write data/state changes.
- Multi-signature transactions to require signatures from multiple parties before executing transactions
- Scheduled payments to automate recurring payments or subscriptions
- Set spending limits to control fund outflow
- Authorization controls and customized permissions to allow different wallet access/operations
- Conditional transactions based on specific states, such as price thresholds or time-based triggers
- Deployment of smart contracts, enabling modular structures for different types of operations
The functionality of SCAs is only limited by the programming languages used (e.g., Solidity, Vyper) and blockchain capabilities.
To learn more about how Ethereum accounts and transactions interplay, check out this in-depth guide: What are Ethereum Transactions?
|Externally owned account (EOA)
|Smart contract account
|How is this account type generated?
|Off-chain; by hashing the public and private key (see pg. 19)
|On-chain; by submitting a transaction to create a smart contract
|Does it cost to create this account type?
|How is this account type controlled?
|By the private key
|By the EVM code (e.g., arbitrary logic) stored within it
|What can you do with this account type?
|Authorize the sending and receiving of funds and interact with smart contracts
|Everything an EOA can do + introduce smart contract capabilities themselves (e.g., create tokens, relay transfers + more complex features you can program)
|Can the public address be used to identify the account type?
|Yes; by checking the bytecode mapped to the address (via the eth_getCode. If it's empty, it's an EOA
|Yes; if the bytecode is non-empty, its a smart contract
QuickNode and Blockchain
If you have followed along so far, you now better understand the different account types on Ethereum today. Later in your journey, you'll fall into topics like Account Abstraction and tokens like ERC-20 and ERC-721. However for now, let's talk about infrastructure and how that plays a role in blockchain today.
In order for Ethereum to continue functioning, humans (for now 😉) need to run nodes (i.e., hardware and software). There are different types of Ethereum software like Geth and Nethermind. These are open-source programs that anyone can run (with the right hardware). However, many users don't have the hardware, experience or time to manage Ethereum nodes. This is where QuickNode plays a role.
QuickNode runs blockchain nodes (for 25+ different blockchains) and is optimized for latency and redundancy, making it up to 8x faster than competitors and normal users. Other services offered by QuickNode are QuickAlerts and IPFS (and more), which help users and developers interact and build on the blockchain more easily. Create a QuickNode account here.
You can use the QuickNode Compare Tool to benchmark a blockchain node against QuickNode
- How to connect to Ethereum network with Ethers.js
- What is DeFi?
Congrats! You now know more about Ethereum and the different account types and their functionalities. If you have any questions, check out the QuickNode Forum for help. Stay up to date with the latest by following us on Twitter (@QuickNode) or Discord.
We ❤️ Feedback!
Let us know if you have any feedback or requests for new topics. We'd love to hear from you.