Reverse Resolution in off-chain settings

What are the use-cases for chain-specific names?

Use(1) — For an EOA, this is the same address reversing to different names depending on the chain: 1 → raffy.eth vs 42161 → raffy.arb. A use-case might be having a different display name on a gamer chain. However, apps shouldn’t display raffy.arb unless addr(evm(42161)) == EOA, right?

I’m not sure there’s anything else?

For the opposite case, eg. non-create2 deployments, you’d have different addresses that want to have same identity, but this is already supported.

Use(2) — For that situation, you might want both deployments to have identical reverse mappings:

  • chain 1: reverse(A) → {1 → A, 2 → B}
  • chain 2: reverse(B) → {1 → A, 2 → B}

Note that reverse names aren’t really input by users.

The advantage of {addr}.{chain}.reverse is that {chain}.reverse can be catch-all wildcard. But any on-chain record for this is a separate registry entry. This name is also non-trivial to synthesize in Solidity.

Advantages of a potential new interface: name(node, chain) returns (string) would be:

  • {addr}.addr.reverse can still be the universal convention on all chains
    • And should be native if possible
  • Trivial to query: name(node, block.chainid)
  • only need 1 registry entry
  • EOA’s can use either:
    1. an updated PR which answers the same name for any chain by default
    2. a new lightweight EOANameResolver which has setName(name) and setName(name, chain) and answers name(node) and name(node, chain) using either the chain-specific name or the default name as a fallback.
  • You could still have a {chain}.reverse wildcard that just returns the result of name("{addr}.addr.reverse", chain) but this would just be a nerdy convenience.
  • A single on-chain record can go offchain resolve("{addr}.addr.reverse", name(_, chain)) and lookup a database of (addr, chain)name
  • You can detect for this with EIP-165.

Potentially, this should be name(node, coin).

Also it should be stated somewhere that reverse names must normalize, but they don’t need to be normalized, proper names like FirstLast.eth and PlaceLocation.eth and 4️⃣.eth should be encouraged.