60262186
Lok Sze Decoration Engineering Limited
Flat C7, 5/F, Tung Lee Factory Building, 9 Lai Yip Street, Kwun Tong, Kowloon

  • 中文 (香港)
  • English
  • Ethereum: Difference between Public Bitcoin Address and Hash 160 Address?

    Ethereum: Difference Between Public Bitcoin Address and Hash 160 Address

    When working with Ethereum, you may come across two addresses that look similar at first glance: the Public Bitcoin Address (PBA) and the Hash 160 Address. While they may look identical, there are key differences between these two addresses.

    Public Bitcoin Address (PBA)

    A PBA is a unique identifier for each public address on the Ethereum network. It is a string of characters that represents a specific Ethereum account. When you receive Ether (ETH) or other ERC-20 tokens from another Ethereum user, their PBA will be sent to your Ethereum wallet as proof of ownership.

    Here are some reasons why it is called a “Bitcoin Address”:

    • Unique: Each PBA is unique and cannot be reused.
    • Hashed version: The first three characters (4 hexadecimal digits) are a hash of the account balance before fees are added. This ensures that the same address can never receive Ether or other tokens again.
    • Domain Name: In some cases, it is called a “Domain Name” because it looks like a domain name.

    Hash 160 Address

    Ethereum: Difference between Public Bitcoin Address and Hash 160 Address?

    A Hash 160 address, on the other hand, is another way to represent a public Ethereum address. It is similar to a PBA, but uses a different format:

    • Four Hexadecimal Digits: The first four characters (4 hexadecimal digits) are a hash of the account balance before fees are added.
    • Hash 160: This hash is more collision-resistant and is often referred to as a “hash 160”.

    Key Differences

    So why do we have both a PBA and a hash 160 address? Here are some key differences:

    • Purpose: The main purpose of a PBA is to serve as a unique identifier for an Ethereum account. The Hash 160 address serves a similar purpose, but with added security features.
    • Security: The Hash 160 Address has additional security features, such as collision resistance and increased durability compared to PBA.
    • Compatibility: The Hash 160 Address is compatible with both the mainnet and testnet Ethereum networks.

    When to use each address

    To illustrate the difference:

    • Use PBA when:

    + You are receiving Ether or other ERC-20 tokens from another user as proof of ownership.

    + You want to represent an account on the Ethereum network in a simple, human-readable format.

    • Use a Hash 160 address when:

    + You need to store and retrieve accounts securely, with additional protection against collisions.

    + You are working with legacy or older versions of blockchains that do not support PBA.

    In summary, while both PBA and Hash 160 Address are used to represent public Ethereum addresses, they serve different purposes and offer additional security features. Understanding the differences between these two addresses will help you navigate the world of Ethereum more effectively.