Identity on the Ethereum Blockchain
Learn to distinguish between Externally-Owned Accounts (EOA) and contract accounts on the Ethereum blockchain, and learn about identity verification with tokens.
Two types of accounts on Ethereum
The Ethereum blockchain records all Ethereum accounts and their balances. These accounts can send transactions on the Ethereum network.
Ethereum accounts can either be user-controlled or deployed as smart contracts:
User-controlled accounts, known as Externally-Owned Accounts (EOA), are controlled by a human with private keys.
On the other hand, smart contracts are deployed to the network and controlled by their Solidity source code. However, they can allow ownership by an EOA who would have the equivalent of admin privileges.
Both EOA and contract accounts have the ability to send, receive, and hold ETH and tokens, as well as interact with deployed smart contracts. However, there are key differences between EOA and contract accounts. Creating an EOA costs nothing, whereas deploying a contract, thus creating a contract account, has a cost because it uses network storage.
Moreover, only EOA can initiate transactions. Transactions between EOA can only consist in sending ETH or tokens. Transactions from an EOA to a contract account trigger Solidity code, which can execute many different actions, such as transferring tokens, calling a function in a smart contract, or even creating a new contract.
Contract accounts can only send transactions in response to receiving a transaction from an EOA. They can never initiate transactions by themselves, including calling their own functions.
Public-key cryptography
EOAs are usually operated through a wallet, such as MetaMask, Rainbow, or Trust. However, the term wallet is a misnomer; these applications aren't what actually holds an account's balance, nor are they what controls access to it, they are just interfaces. The balance is recorded on the Ethereum blockchain and is "held" there, and what controls an EOA is its private key.
In fact, an EOA is nothing but a cryptographic pair of keys:
A private key is a unique, random string of 64 hexadecimal characters generated at the EOA's creation. It's also common to encode a private key as a mnemonic sentence of common words. In both forms, the private key should never be shared with anyone, as it would simply mean giving away control over our Ethereum account.
The public key is meant to be shared, as the name indicates. It's generated from the private key using elliptic curve multiplication, which is irreversible. So it's possible to get the public key from the private key, but the other way around is practically impossible.
Get hands-on with 1400+ tech skills courses.