Skip to content

Commit

Permalink
[EIP-3770] Chain-specific addresses (ethereum#3770)
Browse files Browse the repository at this point in the history
* EIP for chain-specific addresses

* Rename eip-20-token-standard.md to eip-###.md

* Rename eip-###.md to eip-20-token-standard.md

* Rename eip-draft_chain-specific-addresses.md to eip-###.md

* Add CAIP reference

* Update file name

* Update eip-3770.md

* Implement lightclient's feedback

* Create new

* Add image

* remove file

* Update image link

* remove excess spacing

* Fix author field in preamble

Co-authored-by: lightclient <[email protected]>
  • Loading branch information
lukasschor and lightclient authored Nov 16, 2021
1 parent 0b7b81e commit 493d70b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions EIPS/eip-3770.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
eip: 3770
title: Chain-specific addresses
description: A standard for displaying CAIP-10 account identifiers in a human readable format
author: Lukas Schor (@lukasschor), Richard Meissner (@rmeissner), Pedro Gomes (@pedrouid), ligi <[email protected]>
discussions-to: https://ethereum-magicians.org/t/chain-specific-addresses/6449
status: Draft
type: Standards Track
category: ERC
created: 2021-08-26
---

## Abstract
This EIP introduced a new address standard to be adapted by wallets and dApps to display chain-specific addresses by mapping human-readable names to [CAIP-3](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-3.md) blockchain IDs.

## Motivation
The need for this EIP emerges from the increasing adoption of non-Ethereum Mainnet chains that use the Ethereum Virtual Machine (EVM). In this context, addresses become ambiguous, as the same address may refer to an EOA on chain X or a smart contract on chain Y. This will eventually lead to Ethereum users losing funds due to human error. For example, users sending funds to a smart contract wallet address which was not deployed on a particular chain.

[CAIP-10](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md) introduces an account identifier that encodes a [CAIP-2](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md) blockchain ID as part of the address. For EVM-based chains, these blockchain IDs are defined in CAIP-3 and leverage [EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md) chainIDs. However, CAIP-10 targets developers, not end-users. These account identifiers are not meant to be displayed to users in dApps or wallets, and they were optimized for developer interoperability, rather than human readability.

To solve the initial problem of user-facing addresses being ambiguous in a multichain context, we need to extend CAIP-10 with a user-facing format of displaying these account identifiers.

## Specification
This EIP extends CAIP-10 with a standard for mapping EVM-based blockchain IDs (CAIP-3) to a human-readable blockchain short name, as defined in [ethereum-lists/chains](https://github.com/ethereum-lists/chains).

### Syntax
A chain-specific address is prefixed with a chain shortName, separated with a colon sign (:).

Chain-specific address = "`shortName`" "`:`" "`address`"
- `shortName` = STRING
- `address` = STRING

### Semantics
`shortName` is mandatory and MUST be a valid short name from [ethereum-lists/chains](https://github.com/ethereum-lists/chains)

`address` is mandatory and MUST be a EIP-55 compatible hexadecimal address

### Examples
![Chain-specific addresses](../assets/eip-3770/EIP-3770-examples.png "Examples of chain-specific addresses")

### Resolution Method
Chain-specific addresses are resolved to CAIP-10 account identifiers using [ethereum-lists/chains](https://github.com/ethereum-lists/chains):

| EIP-3770 chain-specific address | CAIP-10 account identifier |
| ------------- |:-------------:|
| eth:0x0DA0C3e52C977Ed3cBc641fF02DD271c3ED55aFe | eip155:1:0x0DA0C3e52C977Ed3cBc641fF02DD271c3ED55aFe|
| ovm:0x0DA0C3e52C977Ed3cBc641fF02DD271c3ED55aFe | eip155:10:0x0DA0C3e52C977Ed3cBc641fF02DD271c3ED55aFe |
| poly:0x0DA0C3e52C977Ed3cBc641fF02DD271c3ED55aFe | eip155:137:0x0DA0C3e52C977Ed3cBc641fF02DD271c3ED55aFe |

## Rationale
CAIP-10 account identifiers are not suitable for user-facing addresses that are chain-specific as they are non-human-readable. However, CAIP-10 identifiers are still the preferred option for development purposes, as they are ecosystem-agnostic and work best with chain-splits. As a result, this EIP aims to bridge the benefits of human-readable chain identifiers with the benefits of CAIP-10.

## Copyright
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
Binary file added assets/eip-3770/EIP-3770-examples.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 493d70b

Please sign in to comment.