Skip to content

Replace erc20/ Prefix to erc20: in Native ERC20 Coin Denoms #61

@zsystm

Description

@zsystm

Background

  1. IBC v2 does not allow / in the base denomination.

    IBC version 2 introduces a restriction that disallows slashes (/) in base denominations. As a r esult, any denom containing / cannot be transferred using the IBC v2 router.

  2. Native ERC20 coins currently use the erc20/ prefix, making them incompatible with IBC v2.

    • What is a native ERC20 coin?

      A native ERC20 coin is a Cosmos bank coin that represents an existing ERC20 token contract. It is created when a governance proposal registers a token pair between the ERC20 contract and a new bank denom (which starts with erc20/).

      This regsitration sets the contract owner to OWNER_EXTERNAL, since the ERC20 contract was already deployed by an EoA or CA(not the module itself).

    • Why do we pair an existing ERC20 with a bank denom?

      Because IBC works only with coins stored in the Cosmos bank module, not EVM state. So, in order to send ERC20 tokens (stored in EVM) from a Cosmos EVM-based chain to another chain via IBC, we must first convert them a bank-native coin.

    • When is the erc20/ prefix added?

      • It’s added when a token pair is manually registered via governance through the RegisterERC20 flow, which internally triggers:
        1. registerERC20
        2. CreateCoinMetadata
        3. CreateDenom
          resulting in a denom like erc20/0x…
    • What is an ERC20 token with OWNER_MODULE?

      This represents the “Single Token Representation V2” model. In this case, when a native coin from an external chain is received through IBC, the chain automatically:

      • Deploys an ERC20 contract
      • Adds it to the active precompile list

      This allows the coin to behave like a native bank coin in the EVM envrionment without requiring manual wrapping/unwrapping.

Discussion Points

  1. Remove the /erc20 prefix
    • Pros
      1. Full IBC v2 Compatibility: No slash in the denom → Can transfer via IBC v2.
      2. Simplified Denom Handling – We eliminate the special-case prefix logic.
    • Cons
      1. Migration needed if chain:
        1. Uses the erc20 module in cosmos/evm or evmos/os, and
        • Already have native ERC20 coins (with the erc20/ prefix) in its state.
      2. If any chain in production meets these conditions, a uprade handler logic must be added for migrating states.
  2. Keep the prefix and continue supporting IBC v1
    • Pros
      1. No Immediate Changes required – Zero migration or code modifications.
    • Cons
      1. Cannot send erc20/ tokens via IBC v2.
      2. Forces indefinite reliance on IBC v1, even if/when it becomes deprecated.

Internal Discussion & Additional Considerations

Recently, two main opinions emerged within our team:

  • Opinion 1
    Even if IBC v1 deprecation seems unlikely or very far off, if/when it actually happens, all tokens using the erc20/… prefix (potentially scattered across multiple chains) would need to coordinate a simultaneous upgrade. This could create a huge migration task for every chain involved. Therefore, removing the prefix now (even if some chains already use it) might be better in the long run, avoiding future technical debt.

  • Opinion 2
    It might be best to gather more information before deciding:

    • Are there actually any chains that depend on erc20/0x... prefixed coins in production?
    • How likely is it that IBC v1 will be deprecated soon?

    If usage is practically nonexistent (or no real user scenario), removing the prefix is simple. If there are many chains actively using it, perhaps continuing to rely on IBC v1 is acceptable, at least for now. The only downside is not being able to interoperate with IBC v2-only chains.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions