Skip to content

Commit

Permalink
multi-chain token standard
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege committed Jan 31, 2023
1 parent c9d646c commit 10305c0
Showing 1 changed file with 82 additions and 0 deletions.
82 changes: 82 additions & 0 deletions EIPS/eip-6160.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
eip: 6160
title: Multichain Token Standard
description: An interface for multi-chain native tokens.
author: Seun Lanlege (@seunlanlege), Sam Omidiora (@samparsky)
discussions-to: <URL>
status: Draft
type: Standards Track
category: ERC
created: 2023-01-31
requires: 20, 5679, 5982
---

## Abstract

We extend the standard [`ERC20`](./eip-20.md) interface with new interfaces which will allow provably secure, trustless bridge contracts to mint & burn tokens, enabling a new class of `ERC20` tokens that can be native to multiple chains.

## Motivation

EIP-4844 will set the stage for the Cambrian explosion of L2s on Ethereum. With multiple L2s living on the ethereum blockchain, It therefore becomes necessary to standardize an interface that will allow for native `ERC20` tokens to flow across these L2s, removing the need for wrapped representations of these assets.

Optimisim and Arbitrum, optimistic L2s which are already live on Ethereum today currently have their own custom token interfaces¹ that allow their bridge contracts to mint & burn tokens on L2 & L1. In order to remove the cognitive load on token issuers & developers from extending multiple interface for all the various L2s that will live on Ethereum. It becomes necessary to define a standardized API that all token issuers should implement in order to provide these trustless bridge contracts with the interface needed to transport tokens across these different chains.

## Specification

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

Smart contracts implementing the ERC-6160 standard MUST implement all of the functions in the `ERC6160` interface.

Smart contracts implementing the ERC-6160 standard MUST implement the `ERC-165 supportsInterface` function and MUST return the constant value `true` if *`0x01cbdea7`* is passed through the `interfaceID` argument.

1. Any contract complying with [EIP-20](./eip-20.md) when extended with this EIP, **MUST** implement the following interface:

```solidity
// The EIP-165 identifier of this interface is 0x01cbdea7*
interface IERC6160Ext20 is IERC5679Ext20, IERC_ACL_CORE, ERC165 {}
```

2. Any contract complying with [EIP-721](./eip-721.md) when extended with this EIP, **MUST** implement the following interface:

```solidity
// The EIP-165 identifier of this interface is 0x01cbdea7*
*interface IERC6160Ext721 is IERC5679Ext721, IERC_ACL_CORE, ERC165 {}
```

3. Any contract complying with [EIP-1155](./eip-1155.md) when extended with this EIP, **MUST** implement the following interface:

```solidity
// The EIP-165 identifier of this interface is 0x01cbdea7*
interface IERC6160Ext1155 is IERC5679Ext1155, IERC_ACL_CORE, ERC165 {}
```

4. It is RECOMMENDED for compliant contracts to implement the optional extension `IERC_ACL_GENERAL`.
5. Compliant contracts MAY implement the optional extension `IERC_ACL_METADATA`.

## Rationale

1. We have chosen the EIP-5679 standard to provide the mint & burn interface.
2. We have chosen EIP-5982 to provide the access control interface for trustless bridge contracts to check their permissions to mint & burn `ERC20` tokens.
3. We have chosen NOT to create new events but to require the usage of existing transfer event as required by EIP-20 EIP-721 and EIP-1155 for maximum compatibility.

## Backwards Compatibility

This EIP is designed to be compatible with EIP-20, EIP-721, EIP-1155.

## Security Considerations

This EIP depends on the security and soundness of the underlying bridge contract. This EIP strongly recommends that token issuers permit only trustless, audited bridge contracts with permissions to mint & burn tokens or risk infinte token minting attacks.

## Copyright

Copyright and related rights waived via [CC0](https://eips.ethereum.org/LICENSE).

## References

¹ Arbitrum: [ICustomToken](https://github.com/OffchainLabs/token-bridge-contracts/blob/main/contracts/tokenbridge/ethereum/ICustomToken.sol), [IArbToken](https://github.com/OffchainLabs/token-bridge-contracts/blob/main/contracts/tokenbridge/arbitrum/IArbToken.sol). Optimism: [IL2StandardERC20](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts/contracts/standards/IL2StandardERC20.sol).

## Citation

Please cite this document as:

[Seun Lanlege](https://github.com/seunlanlege), [Sam Omidiora](https://github.com/samparsky), "EIP-6160: Multichain Token Standard," *Ethereum Improvement Proposals*, no. 6160, January 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-6160.

0 comments on commit 10305c0

Please sign in to comment.