Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Address Standard (Bech32)

Anton Trunov edited this page Sep 9, 2022 · 1 revision

Zilliqa Address Standard

Introduction

Abstract

This post is meant to be an informative post detailing the address standard adopted by the Zilliqa blockchain. This document provides the concise details of the bech32 address format customised for the Zilliqa protocol.

Motivation

Due to EIP-55 being not widely adopted by wallets and exchanges, the 20-bytes base16 checksum variation used by Zilliqa protocol to prevent the loss of funds sent to an Ethereum address is not viable.

Hence, Zilliqa shall adopt a variation of the bech32 format on the wallets/SDKs level in order to prevent Users from sending ERC20 ZIL tokens from their Ethereum wallets (i.e. MyCrypto/MyEtherWallet) to a native ZIL address and vice versa.

Please note that the native protocol will still utilise the 20-bytes base16 checksum on the backend. This is a cosmetic change of the 20-bytes base16 checksum address to bech32 format on the wallets/SDKs level only. It will only be visible to end-users.

Examples

All examples below use the public key 039fbf7df13d0b6798fa16a79daabb97d4424062d2f8bd4e9a7c7851e732a25e1d:

  • Mainnet legacy base16 checksummed address: 0x7Aa7eA9f4534d8D70224b9c2FB165242F321F12b
  • Mainnet bech32 checksummed address: zil102n74869xnvdwq3yh8p0k9jjgtejruft268tg8
  • Testnet bech32 checksummed address: zil102n74869xnvdwq3yh8p0k9jjgtejruft268tg8

Specification

Please refer to bip-0173 for more details of the bech32 technical specification.

A Zilliqa bech32 checksummed address consists of the following aspects:

Human-readable prefix separator bech32 formatted address checksum
Example 1 zil 1 02n74869xnvdwq3yh8p0k9jjgtejruft 268tg8
Example 2 zil 1 48fy8yjxn6jf5w36kqc7x73qd3ufuu24 a4u8t9
Example 3 zil 1 fdv7u7rll9epgcqv9xxh9lhwq427nsql 58qcs9
  • Do note that the human-readable prefix for Zilliqa mainnet is zil, and the human-readable prefix for Zilliqa Developer testnet is also zil.
  • Do also note that the last six characters of the data part form a checksum and contain no information.

Recommended implementation

In order to support both bech32 (DEFAULT) and legacy base16 (OPTIONAL) address formats, we recommend to refer to the code snippet below in order to perform a sanity check with the utility tools provided by our official zilliqa-js SDK:

  private normaliseAddress(address: string) {
    if (validation.isBech32(address)) {
      return fromBech32Address(address);
    }

    if (isValidChecksumAddress(address)) {
      return address;
    }

    throw new Error('Address format is invalid');
  }

Current Adoption

The lists below will be updated over time as adoption of bech32 checksummed format increases:

For Wallets

Wallet Support bech32 checksummed addresses Support legacy base16 checksummed address
Moonlet ✔️ ✔️
ZilPay ✔️ ✔️
Zillet ✔️ ✔️
Trust Wallet ✔️ -
Math Wallet ✔️ -
ZHIP ✔️
xZIL ✔️ -

For Exchanges

Exchanges Support bech32 checksummed addresses Support legacy base16 checksummed address
Binance ✔️ -
Kucoin ✔️ -
Upbit ✔️ -
Coinhako ✔️ ✔️
Coinone ✔️ -
Huobi ✔️ -
OKEx ✔️ -
Gate.io ✔️ -
CoinEx ✔️ -

For Explorers

Viewblock explorer will be supporting both the new bech32 and legacy base16 checksummed in the search bar in order to ease the transition to bech32 checksummed addresses for all Users. A tooltip will also be available for Users to convert between the two address formats temporarily.

Clone this wiki locally