Table of Contents

What is an address?

An address in blockchain and cryptographic systems is a unique identifier used to send and receive on-chain assets, interact with smart contracts, and engage with decentralized applications (dApps). 

Similar to a bank account number, a blockchain address can be shared publicly to receive transactions. However, unlike a bank account, blockchain addresses operate in a decentralized, trustless system where transactions are immutable and secured by cryptographic principles.

Structure and format of address

The structure of an address varies depending on the blockchain network, but it is generally derived from a public key through cryptographic hashing. In Ethereum and other EVM-compatible blockchains, an address is a 40-character hexadecimal string (160-bit) prefixed by 0x.

Example of an Ethereum address:

0x742d35Cc6634C0532925a3b844Bc454e4438f44e

Bitcoin addresses, on the other hand, use different encoding schemes, such as Base58Check or Bech32, and may start with characters like 1, 3, or bc1.

Example of a Bitcoin address:

bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kygt080

How is an address generated?

Addresses are derived through the following steps:

  1. Key pair generation: A private key and corresponding public key are generated using elliptic curve cryptography (ECC). Bitcoin and Ethereum use the secp256k1 curve for example. This process occurs locally within the wallet software and does not require network connectivity, ensuring that the private key remains secure and known only to the user.
  2. Hashing: In Bitcoin, the public key is hashed using SHA-256, followed by RIPEMD-160, to produce a shorter, fixed-length identifier. In Ethereum, the uncompressed public key undergoes Keccak256 hashing, and the last 20 bytes of the result form the address.
  3. Encoding and checksum: Blockchains use encoding formats and checksum mechanisms to prevent errors when copying or entering addresses. A checksum is a small piece of data added to an address to detect typos and invalid entries. Bitcoin’s Base58Check encoding includes a checksum for error detection. Ethereum addresses do not require a checksum. 

Types of addresses

  • Ethereum addresses: Ethereum addresses are controlled by a private key, allowing users to store assets, send transactions, and interact with smart contracts. They are derived from the account owner’s public key and represented as a 20-byte hexadecimal string. Ethereum addresses are sometimes referred to as “externally owned accounts (EOAs),” “externally owned addresses,” “wallet addresses,” or “EVM wallet addresses.”
  • Contract address: Assigned to smart contracts deployed on the blockchain, contract addresses are immutable once created. They are generated based on the deployer’s address and nonce using the CREATE or CREATE2 opcode. Contract addresses cannot sign transactions but can execute functions when called by EOAs or other contracts.
  • Multi-sig address: A multi-signature (multi-sig) address is created when setting up a multi-signature wallet. Unlike a regular Ethereum or Bitcoin address, it does not correspond to a single private key but instead requires multiple authorized signers to approve transactions before they are executed. This type of address is commonly used for treasury management, DAO governance, and enhanced security.
  • Vanity address: Custom-generated addresses with recognizable prefixes, created using brute-force computation. They offer personalized identifiers but provide no additional security benefits.
  • Pay-to-Public-Key-Hash (P2PKH) address: P2PKH addresses, or legacy addresses, are Bitcoin’s original address format. These addresses start with '1' and contain 26 to 35 alphanumeric characters. An example is 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa. They were widely used in Bitcoin’s early years and remain compatible with all Bitcoin wallets and networks.
  • Bech32 address: Bech32 addresses were introduced with Bitcoin’s Segregated Witness (SegWit) transaction change, which separates the witness data (transaction signatures and scripts) from the transaction data (inputs and outputs). Bech32 addresses improve transaction efficiency and reduce fees. They start with 'bc1' and use a compact encoding, making them longer than traditional addresses. An example is bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kygt080
  • Pay-to-Script-Hash (P2SH) address: P2SH addresses are Segregated Witness (SegWit) compatible (Bitcoin) and allow transactions to be sent to script hashes to enable multi-signature wallets and time-locked contracts. They start with '3' and have a similar length to P2PKH addresses. An example is 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy
  • Taproot (P2TR) address: Taproot addresses, introduced in Bitcoin’s Taproot upgrade, enhance privacy and smart contract functionality. They start with 'bc1p' and use Bech32m encoding. An example is bc1p5cyxnuxmeuwuvkwfem96llyxfqvrcx6p8h2h5w

What are addresses used for?

  • Receiving and sending assets: Users can send and receive tokens by sharing their addresses.
  • Transaction verification: Blockchain explorers such as Etherscan, Blockscout, and Blockchair allow users to track transactions and check balances associated with an address.
  • Interacting with smart contracts: Addresses can interact with smart contracts in dApps to perform DeFi activities, NFT minting, and other on-chain operations.

Address vs. public key vs. private key vs. account

  • Address: A hashed representation of the public key, used to send and receive tokens and serve as an on-chain identity.
  • Public key: A cryptographic key derived from a private key, used for signature verification.
  • Private key: A secret key that provides full control over an address and its associated funds. It is used to sign transactions and generate the corresponding public key. Losing the private key without a backup (e.g., seed phrase) results in loss of control over the associated address and assets. 
  • Account: A broader concept that includes the address, public key, private key, balance, nonce, and other associated data.

Conclusion

Blockchain addresses are essential for sending and receiving tokens, interacting with smart contracts, and participating in decentralized applications (dApps). Their structure and security mechanisms vary by blockchain, but all rely on cryptographic principles to ensure integrity and ownership. Proper management of private keys and awareness of security risks are essential for safe and effective use of blockchain addresses.