Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EIP: L2 Aliasing of EVM-based Addresses #6735

Merged
merged 38 commits into from Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9e14704
Initial submission for EVM-based L2 address aliasing
Therecanbeonlyone1969 Mar 20, 2023
964c038
minor edits
Therecanbeonlyone1969 Mar 20, 2023
65f6bea
Changed eip file name capitalization
Therecanbeonlyone1969 Mar 20, 2023
338f0d1
Update EIPS/eip-xxxx.md
Therecanbeonlyone1969 Mar 21, 2023
78aecc1
Fix some issues
Pandapip1 Mar 22, 2023
d96f2e0
added copyright and rationale sections and updated eip # in files and…
Therecanbeonlyone1969 Mar 22, 2023
11d5a87
fixing cli errors
Therecanbeonlyone1969 Mar 22, 2023
4d83dd9
fix cli error
Therecanbeonlyone1969 Mar 22, 2023
ec2baff
fixing cli errors
Therecanbeonlyone1969 Mar 22, 2023
db187e9
Update EIPS/eip-000000.md
Therecanbeonlyone1969 Mar 26, 2023
b5a4380
Update EIPS/eip-000000.md
Therecanbeonlyone1969 Mar 26, 2023
7c948e5
Filename, paths and folder name updates to PR number
Therecanbeonlyone1969 Mar 26, 2023
ba39b1c
fixing cli error
Therecanbeonlyone1969 Mar 26, 2023
ec65b49
fixing markdown linter errors
Therecanbeonlyone1969 Apr 18, 2023
bd50fcd
Merge remote-tracking branch 'upstream/master' into patch-5
Therecanbeonlyone1969 Apr 18, 2023
6b85473
fixing 3 markdown linter errors
Therecanbeonlyone1969 Apr 18, 2023
eb8e812
Merge branch 'master' into patch-5
Therecanbeonlyone1969 May 2, 2023
70d0702
Commit from EIP-Bot
eth-bot May 2, 2023
905e52a
Merge branch 'eipbot/6735' into patch-5
eth-bot May 2, 2023
7172b41
unexplained change in EIP number from 6735 to text fixed
Therecanbeonlyone1969 May 2, 2023
f8247c3
Merge branch 'master' into patch-5
eth-bot May 2, 2023
2d68cbd
Commit from EIP-Bot
eth-bot May 2, 2023
e4188eb
Merge branch 'eipbot/6735' into patch-5
eth-bot May 2, 2023
4269e34
correcting unexplained file name change and eip number change
Therecanbeonlyone1969 May 2, 2023
f449ecd
Merge branch 'master' into patch-5
eth-bot May 2, 2023
ab9782d
Commit from EIP-Bot
eth-bot May 2, 2023
4376ddf
Merge branch 'eipbot/6735' into patch-5
eth-bot May 2, 2023
c780a8b
fixing unexplained naming errors
Therecanbeonlyone1969 May 2, 2023
88e9221
Merge branch 'master' into patch-5
eth-bot May 2, 2023
2151c34
Commit from EIP-Bot
eth-bot May 2, 2023
4744f06
Merge branch 'eipbot/6735' into patch-5
eth-bot May 2, 2023
4270443
Merge branch 'master' into patch-5
Therecanbeonlyone1969 May 2, 2023
df50bef
fixing unexplained file naming and EIP number error
Therecanbeonlyone1969 May 2, 2023
97d4988
Merge branch 'master' into patch-5
Therecanbeonlyone1969 Jun 7, 2023
efd2bf5
update based on feedback to PR #6734
Therecanbeonlyone1969 Jun 27, 2023
6bf579a
fixing cli issue
Therecanbeonlyone1969 Jun 27, 2023
5eae364
typo in eip link
Therecanbeonlyone1969 Jun 27, 2023
3c1c7d9
Updates based on request by @SamWilsn
Therecanbeonlyone1969 Jul 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
189 changes: 189 additions & 0 deletions EIPS/eip-6735.md
@@ -0,0 +1,189 @@
---
eip: 6735
title: L2 Aliasing of EVM-based Addresses
description: Identify and translate EVM-based addresses from different Layer 1, Layer 2, or Sidechains
author: Kelvin Fichter (@smartcontracts), Andreas Freund (@Therecanbeonlyone1969)
discussions-to: https://ethereum-magicians.org/t/l2-aliasing-of-evm-based-addresses-from-the-eea-oasis-community-projects-l2-standards-working-group/13093
status: Draft
type: Standards Track
category: ERC
created: 2022-03-20
requires: 55
---

## Abstract

The document describes the minimal set of business and technical prerequisites, functional and non-functional requirements for Aliasing of EVM based Addresses that when implemented ensures that two or more Layer 1, Layer 2, or Sidechains can identify and translate EVM based addresses from different Layer 1, Layer 2, or Sidechains.
Therecanbeonlyone1969 marked this conversation as resolved.
Show resolved Hide resolved

## Motivation

The members of the L2 WG of the EEA Communities Project managed by OASIS have recognized that the ability to deterministically derive addresses of a digital asset or an externally owned account (EOA) in EVM based execution frameworks for L1s, L2s, Sidechains based on an origin chain of an asset or EOA, known as address aliasing, simplifies interoperability between EVM based L1s, L2s, and Sidechains because:

* It allows messages from chain A (source chain) to unambiguously address asset A (smart contract) or EOA on chain Y (target chain), if asset A or EOA exists on Chain X and on Chain Y.
* It allows a user to deterministically verify the source chain of a message, and, if required, directly verify the origin chain of asset A or EOA and its state on its origin chain utilizing a canonical token list of the (message) source chain.

The ability to unambiguously, and deterministically, relate an address for a digital asset (smart contract) or an externally owned account (EOA) between EVM based L1s, L2s, and Sidechains where this digital asset or EOA exists, also known as address aliasing, is critical prerequisite for interoperability between EVM based L1s, L2s, and Sidechains. However, there is currently no way to do so in a standardized way -- imagine every internet service provider were to define its own IP addresses.

Hence, the L2 WG of the EEA Communities Project managed by OASIS, an open-source initiative, intends for this document to establish an unambiguous and deterministic standard for EVM based address aliasing based on the concept of root → leaf where an address alias is derived based on the address on the origin chain and an offset which is an immutable characteristic of the origin chain.

See Figure 1 for the conceptual root → leaf design with offset.

![Fig1](../assets/eip-6735/address-aliasing-root-leaf-design.png)

Figure 1: Root → Leaf address aliasing concept using an chain immanent characteristics from L1 to L2 and L3 and back.

Alternative Figure 1 Description: The figure describes conceptually how (interoperability) messages from source to target chain utilize address aliasing. At the bottom an EVM based L1 is uni-directionally connected to three EVM based L2s -- A, B, and C -- each with an alias of L1 address + L1 Offset. In addition, A is uni-directionally connected to B with an alias of L1 address + L1 offset + A offset. B is uni-directionally connected to an EVM-based Layer 3 or L3 with an alias of L1 address + L1 offset + B offset signaling that the address is anchored on L1 via the L2 B. And finally D is uni-directionally connected to C via the alias L1 address + L1 offset + B offset plus D offset indicating the asset chain of custody from L1 to B to D to C.

To further clarify the connections between the different possible paths an asset can take from an L1 to different L2/L3s and the `relativeAddress` of that asset, we visually highlight in red the path from the EVM based L1 to the B L2, to the D L3, and finally to the C L2.

![Fig2](../assets/eip-6735/visual-Highlight-Path-Red-evm-based-aliasing..png)

Figure 2: Visually highlighted path in red from the EVM based L1 to the B L2, to the D L3, and finally to the C L2.

Alternative Figure 1 Description: The figure is the same as Figure 1. However, the uni-directional connections between the EVM based L1 to the L2 B, to the L3 D, and finally to the L2 C are highlighted in red.

Note, that address aliasing between non-EVM and EVM-based L1s, L2s, and Sidechains, and between non-EVM-based L1s, L2s, and Sidechains is out of scope of this document.

## Specification

### Typographical Convention: Requirement Ids

A requirement is uniquely identified by a unique ID composed of its requirement level followed by a requirement number, as per convention **[RequirementLevelRequirementNumber]**.
There are four requirement levels that are coded in requirement ids as per below convention:

**[R]** - The requirement level for requirements which IDs start with the letter _R_ is to be interpreted as **MUST** as described in [RFC2119](https://www.rfc-editor.org/rfc/rfc2119). \
**[D]** - The requirement level for requirements which IDs start with the letter _D_ is to be interpreted as **SHOULD** as described in [RFC2119](https://www.rfc-editor.org/rfc/rfc2119). \
**[O]** - The requirement level for requirements which IDs start with the letter _O_ is to be interpreted as **MAY** as described in [RFC2119](https://www.rfc-editor.org/rfc/rfc2119).

Note that requirements are uniquely numbered in ascending order within each requirement level.

Example : It should be read that [R1] is an absolute requirement of the specification whereas [D1] is a recommendation and [O1] is truly optional.

The requirements below are only valid for EVM based L1s, L2, or Sidechains. Address aliasing for non-EVM systems is out of scope of this document.

<a name="r1"> **[R1]** </a>

Check failure on line 64 in EIPS/eip-6735.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Inline HTML [Element: a]

EIPS/eip-6735.md:64:1 MD033/no-inline-html Inline HTML [Element: a]
An address alias -- `addressAlias` -- to be used between Chain A and Chain B MUST be constructed as follows:
`addressAlias (Chain A) = offsetAlias (for Chain A) relativeAddress (on Chain A) offsetAlias (for Chain A)`

[[R1]](#r1) testability: `addressAlias` can be parsed and split using existing open source packages and the result compared to known `addressAlias` and `relativeAddress` used in the construction.

<a name="r2"> **[R2]** </a>

Check failure on line 70 in EIPS/eip-6735.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Inline HTML [Element: a]

EIPS/eip-6735.md:70:1 MD033/no-inline-html Inline HTML [Element: a]
The `offsetAlias` of a chain MUST be `0xchainId00000000000000000000000000000000chainId`

[[R2]](#r2) testability: `offsetAlias` can be parsed and split using existing open source packages and the result compared to known `chainId` used in the construction.

<a name="r3"> **[R3]** </a>

Check failure on line 75 in EIPS/eip-6735.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Inline HTML [Element: a]

EIPS/eip-6735.md:75:1 MD033/no-inline-html Inline HTML [Element: a]
The `chainId` used in the `offsetAlias` MUST NOT be zero (0)

[[R3]](#r3) testability: A `chainId` is a numerical value and can be compared to `0`.

<a name="r4"> **[R4]** </a>

Check failure on line 80 in EIPS/eip-6735.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Inline HTML [Element: a]

EIPS/eip-6735.md:80:1 MD033/no-inline-html Inline HTML [Element: a]
The `chainId` used in the `offsetAlias` MUST be 8 bytes.

[[R4]](#r4) testability: The length of the `chainId` string can be converted to bytes and then compared to `8`.

<a name="r5"> **[R5]** </a>

Check failure on line 85 in EIPS/eip-6735.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Inline HTML [Element: a]

EIPS/eip-6735.md:85:1 MD033/no-inline-html Inline HTML [Element: a]
In case the `chainId` has less than 16 digits the `chainId` MUST be padded with zeros to 16 digits.

For example the `chainId` of Polygon PoS is `137`, with the current list of EVM based `chainId`s to be found at chainlist.org, and its `offsetAlias` is `0x0000000000000137000000000000000000000000000000000000000000000137`.

[[R5]](#r5) testability: `chainId` can be parsed and split using existing open source packages and the result compared to known `chainId` used in the construction. Subsequently the number of zeros used in the padding can be computed and compared to the expected number of zeros for the padding.

<a name="r6"> **[R6]** </a>

Check failure on line 92 in EIPS/eip-6735.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Inline HTML [Element: a]

EIPS/eip-6735.md:92:1 MD033/no-inline-html Inline HTML [Element: a]
The `offsetAlias`for Ethereum Mainnet as the primary anchor of EVM based chains MUST be `0x1111000000000000000000000000000000001111` due to current adoption of this offset by existing L2 solutions.

An example of address alias for the USDC asset would be `addressAlias = 0x1111A0b86991c6218b36c1d19D4a2e9Eb0cE3606eB481111`

[[R6]](#r6) testability: This requirement is a special case of [[R1]](#r1). Hence, it is testable.

<a name="r7"> **[R7]** </a>

Check failure on line 99 in EIPS/eip-6735.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Inline HTML [Element: a]

EIPS/eip-6735.md:99:1 MD033/no-inline-html Inline HTML [Element: a]
The `relativeAddress` of an Externally Owned Account (EOA) or Smart Contract on a chain MUST either be the smart contract or EOA address of the origin chain or a `relativeAddress` of an EOA or Smart Contract from another chain.

An example of the former instance would be the relative address of wrapped USDC, `relativeAddress = 0x1111A0b86991c6218b36c1d19D4a2e9Eb0cE3606eB481111`, and an example of the latter would be the relative address of wrapped USDC on Polygon, `relativeAddress = 0x00000000000001371111A0b86991c6218b36c1d19D4a2e9Eb0cE3606eB4811110000000000000137`.

Finally, an example of an address alias for a message to another L1, L2, or Sidechain for wrapped USDC from Ethereum on Arbitrum would be:

```
addressAlias = 0x00000000000421611111A0b86991c6218b36c1d19D4a2e9Eb0cE3606eB4811110000000000042161
```

[[R7]](#r7) testability: Since this document is dealing with EVM-based systems with multiple live implementations, there are multiple known methods of how to verify if an address belongs to an EOA or a smart contract.

<a name="r8"> **[R8]** </a>

Check failure on line 112 in EIPS/eip-6735.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Inline HTML [Element: a]

EIPS/eip-6735.md:112:1 MD033/no-inline-html Inline HTML [Element: a]
The order of the `offsetAlias`es in an `addressAlias` MUST be ordered from the `offSetAlias` of the root chain bracketing the `relativeAddress` on the root chain through the ordered sequence of `offsetAlias`es of the chains on which the digital asset exists.

For example, a valid `addressAlias` of an asset on chain A bridged to chain B and subsequently to chain C and that is to be bridged to yet another chain from chain C would be:

```
addressAlias = chainId(C) chainId(B) chainId(A) relativeAddress chainId(A) chainId(B) chainId(C)
```

However, the reverse order is invalid:

```
addressAlias = chainId(A) chainId(B) chainId(C) relativeAddress chainId(C) chainId(B) chainId(A)
```

[[R8]](#r8) testability: Since [[R1]](#r1) is testable and since [[R8]](#r8) is an order rule for the construction in [[R1]](#r1), which can be tested by applying logic operations on the output of [[R1]](#r1) tests, [[R8]](#r8) is testable.

Note, that a proof that a given order is provably correct is beyond the scope of this document.

### Conformance

This section describes the conformance clauses and tests required to achieve an implementation that is provably conformant with the requirements in this document.

#### Conformance Targets

This document does not yet define a standardized set of test-fixtures with test inputs for all MUST, SHOULD, and MAY requirements with conditional MUST or SHOULD requirements.

A standardized set of test-fixtures with test inputs for all MUST, SHOULD, and MAY requirements with conditional MUST or SHOULD requirements is intended to be published with the next version of the standard.

#### Conformance Levels

This section specifies the conformance levels of this standard. The conformance levels offer implementers several levels of conformance. These can be used to establish competitive differentiation.

This document defines the conformance levels of EVM based Address Aliasing as follows:

* **Level 1:** All MUST requirements are fulfilled by a specific implementation as proven by a test report that proves in an easily understandable manner the implementation's conformance with each requirement based on implementation-specific test-fixtures with implementation-specific test-fixture inputs.
* **Level 2:** All MUST and SHOULD requirements are fulfilled by a specific implementation as proven by a test report that proves in an easily understandable manner the implementation's conformance with each requirement based on implementation-specific test-fixtures with implementation-specific test-fixture inputs.
* **Level 3:** All MUST, SHOULD, and MAY requirements with conditional MUST or SHOULD requirements are fulfilled by a specific implementation as proven by a test report that proves in an easily understandable manner the implementation's conformance with each requirement based on implementation-specific test-fixtures with implementation-specific test-fixture inputs.

<a name="d1"> **[D1]** </a>

Check failure on line 151 in EIPS/eip-6735.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Inline HTML [Element: a]

EIPS/eip-6735.md:151:1 MD033/no-inline-html Inline HTML [Element: a]
A claim that a canonical token list implementation conforms to this specification SHOULD describe a testing procedure carried out for each requirement to which conformance is claimed, that justifies the claim with respect to that requirement.

[[D1]](#d1) testability: Since each of the non-conformance-target requirements in this documents is testable, so must be the totality of the requirements in this document. Therefore, conformance tests for all requirements can exist, and can be described as required in [[D1]](#d1).

<a name="r9"> **[R9]** </a>

Check failure on line 156 in EIPS/eip-6735.md

View workflow job for this annotation

GitHub Actions / Markdown Linter

Inline HTML [Element: a]

EIPS/eip-6735.md:156:1 MD033/no-inline-html Inline HTML [Element: a]
A claim that a canonical token list implementation conforms to this specification at **Level 2** or higher MUST describe the testing procedure carried out for each requirement at **Level 2** or higher, that justifies the claim to that requirement.

[[R9]](#r9) testability: Since each of the non-conformance-target requirements in this documents is testable, so must be the totality of the requirements in this document. Therefore, conformance tests for all requirements can exist, be described, be built and implemented and results can be recorded as required in [[R9]](#r9).

## Rationale

The standard follows an already existing approach for address aliasing from Ethereum (L1) to EVM-based L2s such as Arbitrum and Optimism and between L2s, and extends and generalizes it to allow aliasing across any type of EVM-based network irrespective of the network type -- L1, L2 or higher layer networks.

## Security Considerations

### Data Privacy

The standard does not set any requirements for compliance to jurisdiction legislation/regulations. It is the responsibility of the implementer to comply with applicable data privacy laws.

### Production Readiness

The standard does not set any requirements for the use of specific applications/tools/libraries etc. The implementer should perform due diligence when selecting specific applications/tools/libraries.

There are security considerations as to the Ethereum-type addresses used in the construction of the `relativeAddress`.

If the Ethereum-type address used in the `relativeAddress` is supposed to be an EOA, the target system/recipient should validate that the `codehash` of the source account is `NULL` such that no malicious code can be executed surreptitiously in an asset transfer.

If the Ethereum-type address used in the `relativeAddress` is supposed to be a smart contract account representing an asset, the target system/recipient should validate that the `codehash` of the source account matches the `codehash` of the published smart contract solidity code to ensure that the source smart contract behaves as expected.

Lastly, it is recommended that as part of the `relativeAddress` validation the target system performs an address checksum validation as defined in [ERC-55](./eip-55.md).

### Internationalization and Localization

Given the non-language specific features of EVM-based address aliasing, there are no internationalization/localization considerations.

## Copyright

Copyright and related rights waived via [CC0](../LICENSE.md).
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.