-
Notifications
You must be signed in to change notification settings - Fork 264
superchainERC20 #986
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
superchainERC20 #986
Changes from all commits
cf86012
e44762f
62ff856
0f91eef
bc80ac7
61bfd9c
54fc6fb
8287dd0
e01bb0d
5c5e674
dbd4d20
be2f0af
30252e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"compatibility": "Solidity Compatibility", | ||
"system-contracts": "System Contracts", | ||
"optimization": "Cost Optimization" | ||
"optimization": "Cost Optimization", | ||
"superchain-erc20": "SuperchainERC20 Token Standard" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
--- | ||
|
||
import SuperchainERC20 from '@/pages/stack/protocol/interop/superchain-erc20.mdx' | ||
|
||
<SuperchainERC20 /> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"explainer": "Interop Explainer", | ||
"cross-chain-message": "Anatomy of Cross-Chain Message", | ||
"supersim": "Supersim Multichain Development Environment" | ||
"supersim": "Supersim Multichain Development Environment", | ||
"superchain-erc20": "SuperchainERC20 Token Standard" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
title: SuperchainERC20 Token Standard | ||
lang: en-US | ||
description: Learn basic details about the SuperchainERC20 token standard. | ||
--- | ||
|
||
import { Callout } from 'nextra/components' | ||
|
||
# SuperchainERC20 Token Standard | ||
|
||
<Callout> | ||
Interop is currently in active development and not yet ready for production use. The information provided here may change. Check back regularly for the most up-to-date information. | ||
</Callout> | ||
|
||
`SuperchainERC20` is a token standard designed to enable asset interoperability in the Superchain. | ||
Asset interoperability allows for tokens to securely move across chains without asset wrapping or liquidity pools for maximal capital efficiency, thus unifying liquidity and simplifying the user experience. | ||
|
||
Additional features: | ||
|
||
* **Simplified deployments**: Provides a consistent, unified standard for tokens across all Superchain-compatible networks and a common crosschain interface for the EVM ecosystem at large. | ||
* **Permissionless propagation**: Easily clone an existing token contract to a new OP Stack chain using `create2` without requiring the original owner, which enables movement of assets to the new chain once Interop goes live. Importantly, permissionless propagation retains the integrity of the original owner on the contract and preserves security but proliferates the contract's availability to new chains. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The standard itself does not enforce any deployment method. A token can be deployed using CREATE or an EOA as deployer, so posterior deployments might result in a different address. |
||
* **Ethereum-aligned**: Intentionally designed to be generic and supported as an Ethereum-wide standard (RIP coming soon). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: RIP is probably gonna be an ERC |
||
|
||
## How it works | ||
|
||
`SuperchainERC20` token standard facilitates secure token transfers between chains in the Superchain networks via native burning and minting. | ||
|
||
* **Token Burning**: Initiating message where token is **burned** on the source chain. A user initiates a transfer of token from one blockchain to another and specifies the recipient wallet address on the destination chain. A specified amount of token is burned on the source chain. | ||
* **Token Minting**: Executing message where token is **minted** on the destination chain. The specified amount of token is minted on the destination chain directly to the recipient wallet address. | ||
|
||
```mermaid | ||
sequenceDiagram | ||
box rgba(255, 4, 32, 0.1) ChainA | ||
participant User-op | ||
participant SuperchainERC20-op | ||
participant SuperchainERC20Bridge-op | ||
end | ||
box rgba(248, 61, 213, 0.1) ChainB | ||
participant SuperchainERC20Bridge-uni | ||
participant SuperchainERC20-uni | ||
participant User-uni | ||
end | ||
|
||
|
||
User-op->>SuperchainERC20-op: Initiate token transfer | ||
SuperchainERC20-op->>SuperchainERC20Bridge-op: Bridge to Uni | ||
SuperchainERC20Bridge-op->>SuperchainERC20-op: Burn tokens | ||
SuperchainERC20Bridge-op-->>SuperchainERC20Bridge-op: Emit cross-chain event | ||
SuperchainERC20Bridge-uni-->>SuperchainERC20Bridge-uni: Validates message | ||
SuperchainERC20Bridge-uni-->>SuperchainERC20-uni: Mint tokens | ||
SuperchainERC20-uni->>User-uni: User receives tokens | ||
``` | ||
|
||
This diagram illustrates the process where tokens are burned on the source chain and minted on the destination chain, enabling seamless cross-chain transfers without the need for asset wrapping or liquidity pools. | ||
|
||
## Major components | ||
|
||
* **Token Contract**: implements the `SuperchainERC20` standard with bridging functionality. | ||
* **Factory Predeploy**: uses a `create2`-based factory for deploying `SuperchainERC20` tokens consistently across chains. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not enforced in the token standard. The |
||
* **Bridging Functions**: using methods like `sendERC20` and `relayERC20` for cross-chain transfers. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can mention these live in the Bridge contract, and not in the token itself |
||
|
||
## Comparison to other standards | ||
|
||
`SuperchainERC20` differs from other token standards in its focus and implementation: | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* `SuperchainERC20` has minimal differentiation from a standard ERC20 deployment, only requiring a minimal crosschain mint/burn interface, which aims to be a common pattern for the EVM ecosystem (RIP coming soon). | ||
* `SuperchainERC20` shares trust assumptions across all chains in the Superchain, such that custom assumptions around security and latency are not required to account for when executing transfers. | ||
|
||
<Callout type="info"> | ||
Projects moving from other token standards may need to adapt to the `SuperchainERC20` specification. | ||
</Callout> | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Implementation details | ||
|
||
Application developers must do two things to make their tokens `SuperchainERC20` compatible. Doing this setup now ensures that tokens can benefit from Interop once the Interop upgrade happens. | ||
|
||
1. Permission only `SuperchainERC20Bridge` to call `crosschainMint` and `crosschainBurn`. | ||
2. Deployment at same address on every chain in the Superchain using `create2` function. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: did you mean the |
||
|
||
For now, application developers should view `SuperchainERC20`as standard ERC20 tokens with additional built-in functions that allow cross-chain asset movement that will be enabled once Interop goes live. | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<Callout type="warning"> | ||
To enable asset interoperability, `SuperchainERC20` token must give access to the address where the future `SuperchainERC20Bridge` will live. | ||
</Callout> | ||
|
||
## Next steps | ||
|
||
* Explore the [SuperchainERC20 specifications](https://specs.optimism.io/interop/token-bridging.html) for in-depth implementation details. | ||
* Watch the [Superchain interop design video walkthrough](https://www.youtube.com/watch?v=FKc5RgjtGes) for a visual explanation of the concepts. | ||
* Review the [Superchain Interop Explainer](explainer) for answers to common questions about interoperability. |
Uh oh!
There was an error while loading. Please reload this page.