Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines CAIP-350, which proposes converting between address formats and chain identifiers used by different blockchains.

This explanation translates, summarizes, and expands on the following specification.

For other EIPs, BIPs, SLIPs, and CAIPs, see https://cardene.dev/proposals.

Overview

CAIP-350 defines how namespace-specific address formats and network identifiers can be converted into the Interoperable Address format defined by ERC-7930.

ERC-7930 provides a self-describing representation of an address and chain identifier. It includes metadata about the chain and address type, reducing the need to exchange additional information separately.

CAIP-350 adds a mechanism to the CASA system for registering chain-specific serialization rules as namespace profiles, allowing present and future chains to conform to a common interoperable address format.

Motivation

CAIP-2 and CAIP-10 represent chain and address information as text, which presents several limitations.

For CAIP-2, see the following article.

CAIP-2 Explained: Identifying Different Blockchains

For CAIP-10, see the following article.

CAIP-10 Explained: A Common Format for Blockchain Accounts

First, binary representations may be preferable for on-chain use, but the existing specifications do not provide them. Second, CAIP-10 is textual, so the same account can have multiple representations, potentially creating duplicate entries when used as dictionary keys.

Third, limits intended to preserve readability can require omitting semantic information that wallets may retrieve separately but smart contracts cannot necessarily access. Finally, textual encoding introduces overhead and is less efficient relative to the amount of information represented.

CAIP-350 addresses these issues by providing a common, efficient address representation while accounting for chain-specific requirements.

Specification

CAIP-350 defines deterministic and unambiguous conversions between formats within each blockchain namespace. There are four principal pairs:

  1. The chain's conventional textual address representation and the Interoperable Name format described in ERC-7930.
  2. The conventional textual representation of a chain reference and the corresponding interoperable textual representation.
  3. An ERC-7930 Interoperable Address representing the chain reference and its corresponding Interoperable Name.
  4. For every address format supported by the chain, the ERC-7930 Interoperable Address and its corresponding Interoperable Name.

Each namespace must also assign a unique two-byte sequence that does not conflict with previously defined values. This is used for the ERC-7930 chainType property.

These rules must be documented in a CAIP-350 profile to maximize interoperability and enable review. The Namespaces registry provides a profile template.

Additional Considerations

CAIP-350 is defined separately because incorporating every chain-specific rule into ERC-7930 and treating it as a continuously updated Living ERC would be inappropriate. Living specifications are rare in Ethereum; the original article identifies EIP-1 as an example.

ERC-7930 can establish a stable format while allowing chain-specific serialization rules to be defined separately as needed. If all rules were incorporated into ERC-7930, its authors would bear the specification and editorial burden. CASA instead allows participants in individual ecosystems to define their namespace profiles, distributing the work more efficiently.

Security

Depending on a chain's characteristics, a CAIP-350 profile may be unable to guarantee canonicity: the property that a given address always has the same representation.

Systems relying on canonical representations may behave unexpectedly if this guarantee does not hold. Profiles that cannot ensure canonicity must disclose this in their Extra Considerations section.

Backward Compatibility

CAIP-350 emphasizes compatibility with CAIP-2 and CAIP-10, but conversions are not always straightforward.

The first category is conversions that are possible but difficult. They may require additional resources and be impractical for clients with network or storage constraints. An example is converting a Solana chain reference containing a truncated genesis block hash in CAIP-2 to its complete CAIP-350 representation. Supporting such conversions is recommended, but clients that cannot perform them may still conform.

The second category is impossible conversions. An extremely large EVM chain ID may fit CAIP-350 but exceed CAIP-2's length constraints. Similarly, a chain defined only in CAIP-10 without a chainType cannot be serialized into CAIP-350.

Client libraries should distinguish these cases and return different errors.

Citation

Copyright and related rights waived via CC0.

Conclusion

CAIP-350 establishes chain-specific conversion profiles for interoperable addresses and chain identifiers across blockchain ecosystems.

Further reading and author links:

https://chaldene.net/