veramolabs / did-eth

evolution of did:ethr
Apache License 2.0
14 stars 8 forks source link

DID:Eth Method Specific Identifier #27

Closed Reccetech closed 1 year ago

Reccetech commented 1 year ago

The existing DID:Ethr Method Specific Identifier specification is here

In order to support a multichain world I suggest the following for the DID:Eth identifier syntax:

  1. did:eth followed by a CAIP-10 address. For EVM networks EIP155+ChainID would most likely be the dominant address type used. This follows the DID:PKH Identifer scheme as seen here Some examples:

    • Ethereum: did:eth:eip155:1:0xb9c5714089478a327f09197987f16f9e5d936e8a
    • Polygon: did:eth:eip155:137:0x4e90e8a8191c1c23a24a598c3ab4fb47ce926ff5
    • Hedera: did:eth:eip155:296:0xa0ae58da58dfa46fa55c3b86545e7065f90ff011
  2. We do not support a "default" scheme if a CAIP-10 address is not properly specified (DID:Ethr supported a default to Ethereum mainnet).

  3. We do not support other address types not supported by CAIP10

Feedback appreciated.

nickreynolds commented 1 year ago

I'm kind of conflicted on this one. It does seem like it would make development slightly easier when it's standardized like this, but from a UX perspective, I think it's nice to be able to omit certain fields and assume some defaults. Can you expand on the potential harm in assuming "eip155" if nothing in that field is present? Or assuming "eip155:1" if neither field is present?

@mirceanis would this also prevent us from using public key hex as identifier? CAIP-10 is only for addresses right?

@Reccetech would something like did:eth:hedera:mainnet:0.0.1234567890-zbhlt be supported? That's CAIP-10, right?

Reccetech commented 1 year ago

As you suggest you would have to also assume an EIP155 chaincode as default - which like did:ethr could be ethereum mainnet. I think it made perfect sense for did:ethr to default to mainnet - because it was built for only Ethereum.

But did:eth is targeting a multichain EVM world. So to enter controversial territory - I think if we look at the history of DIDs - very few of them were actually anchored on Ethereum mainnet as it was and still is expensive. So my suggestion would be that if/when did:eth gains traction we'll see a healthy proportion and maybe even the majority of the DIDs on L2s/EVM chains like polygon, avalanche, cardano, hedera. So in this world it makes little sense to assume a default of Ethereum mainnet - unless it's just to give ethereum a privileged position in the DID method (which might make sense if we get development funding from Ethereum foundation). But if we want to keep things even steven then I think it's better to just instill best practices that the full CAIP10 address be used at all times - no shortcuts allowed. To your second question - yes did:eth:hedera:mainnet:0.0.1234567890-zbhlt could be used as its CAIP-10 compliant.