-
Notifications
You must be signed in to change notification settings - Fork 265
Superchain Interop-Compatible Tokens #1419
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
254276f
Initial commit
krofax caed322
updated title
krofax fcc8911
Improved docs
krofax 5770840
updated the docs
krofax 92503d9
remove bold syntax
krofax cebb17b
updated header
krofax 09fcf17
Update token-compatible.mdx
zainbacchus 7632bf6
Update token-compatible.mdx
zainbacchus 54eea11
Update token-compatible.mdx
zainbacchus 4ba2bd7
Update token-compatible.mdx
zainbacchus e2da225
Update token-compatible.mdx
zainbacchus 03cefee
Update token-compatible.mdx
zainbacchus fbe1548
Update token-compatible.mdx
zainbacchus 24afc8c
Update token-compatible.mdx
zainbacchus 5a32025
Update token-compatible.mdx
zainbacchus d937309
Update token-compatible.mdx
zainbacchus 0facea5
Update token-compatible.mdx
zainbacchus fc01c90
Update token-compatible.mdx
zainbacchus 7fde1e8
Update _meta.json
zainbacchus 96e9894
Update interop.mdx
zainbacchus b5d187d
Update _meta.json
zainbacchus 2f60bd5
Update token-compatible.mdx
zainbacchus 0ab687a
Update token-compatible.mdx
zainbacchus d96d630
Update token-compatible.mdx
zainbacchus 83868b7
fix lint
krofax e51372d
update breadcrumbs
krofax e5f9723
updated branch
krofax 788e36b
add personas
krofax File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
--- | ||
title: Superchain interop compatible tokens | ||
lang: en-US | ||
description: Learn how different tokens can use Superchain interop to benefit from secure, low-latency, cross-chain composability. | ||
topic: Superchain Interoperability | ||
personas: ["Developer", "Architect"] | ||
categories: ["Interoperability", "Token"] | ||
content_type: guide | ||
--- | ||
|
||
import { Callout } from 'nextra/components' | ||
import { InteropCallout } from '@/components/WipCallout' | ||
|
||
<InteropCallout /> | ||
|
||
# Superchain interop compatible tokens | ||
|
||
Superchain interop enables **trust-minimized, 1-block latency cross-chain composability** on the [Superchain interop cluster](/stack/interop/explainer#superchain-interop-cluster). | ||
The recommended approach for giving tokens Superchain interop capabilities is using [SuperchainERC20](/stack/interop/superchain-erc20), but there are other options depending on your needs. | ||
|
||
## How to enable cross-chain token interoperability | ||
|
||
Compared to traditional ERC-20 tokens deployments on a single blockchain, cross-chain tokens can move between different blockchains through giving `crosschainMint` and `crosschainBurn` permissions to a verification mechanism (such as a bridge protocol) that validates when tokens should be burned on one chain and minted on another. | ||
|
||
For example when transferring a `SuperchainERC20` between chains in the Superchain interop cluster, the Superchain interop protocol ensures the tokens are burned on the source chain before authorizing the corresponding mint on the destination chain. | ||
|
||
When enabling cross-chain functionality for your token, it is essential to evaluate the security, cost, and latency of the respective verification mechanism. | ||
|
||
|
||
## Why use Superchain interop to enable cross-chain token interoperability | ||
|
||
Apps built with Superchain interop can essentially teleport tokens from one blockchain to another, providing users with a secure, low-latency, and capitally-efficient way to transact on the Superchain. | ||
|
||
3rd party interop solutions for L2s often wait for Ethereum finalization (15min+) when transferring tokens from an L2 to mitigate the double spend problem. However, that solution results in high latency and poor user experience. Superchain interop is [reorg aware](./reorg) - this means users can transfer assets across chains in the Superchain with 1-block latency, and should a reorg happen, either both the source and destination transactions would remain, or both of them would revert. In every case, there is no window of opportunity to double spend. Low latency interop that mitigates the double spend problem is now possible with Superchain interop. | ||
|
||
## SuperchainERC20 | ||
|
||
`SuperchainERC20` is a simple and trust-minimized way to enable token interoperability within the Superchain. You can learn more about `SuperchainERC20` [here](/stack/interop/superchain-erc20). | ||
|
||
* **Security:** Fault Proofs secure Superchain interop end to end. No third-party dependencies to enable token interoperability. | ||
* **Latency:** 1-block latency within the Superchain interop cluster. | ||
* **Cost:** Gas on source chain and destination chain. | ||
* **Cross-chain address:** Deterministic, no token registry required. | ||
* **Supported ecosystem:** Superchain interop cluster. | ||
|
||
|
||
## Considerations when using other token implementations | ||
|
||
While the `SuperchainERC20` is a trust-minimized way to enable for giving your token Superchain interop capabilities, other token implementations can also benefit from Superchain interop. If you choose a token standard other than SuperchainERC20 here are a few things to consider: | ||
|
||
#### ERC-7802 | ||
[`ERC-7802`](https://ethereum-magicians.org/t/erc-7802-crosschain-token-interface/21508) is a minimal cross-chain mint/burn interface designed to establish a common standard across the EVM ecosystem for tokens to communicate cross-chain. Adding this interface to your token ensures downstream integrators can easily support your token. | ||
|
||
#### SuperchainTokenBridge and L2ToL2CrossDomainMessenger | ||
Tokens can benefit from Superchain interop by either giving cross-chain mint/burn permissions to the `SuperchainTokenBridge` or the `L2ToL2CrossDomainMessenger`. | ||
|
||
The [`SuperchainTokenBridge`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainTokenBridge.sol) is an abstraction built on top of the [`L2ToL2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol) that facilitates token bridging using Superchain interop, but requires the token address be deterministic across chains. | ||
|
||
Alternatively, you can build a custom bridge using the `L2ToL2CrossDomainMessenger` to facilitate cross-chain mint/burns that **does not** require a deterministic address across chains but does require the token issuer to manage a token registry per chain. | ||
|
||
#### Weakest link scenario | ||
|
||
If you allowlist both Superchain interop and a third-party verification mechanism, your token's security is only as strong as the weakest verification mechanism. | ||
|
||
## Alternative token implementations | ||
|
||
### xERC20 (ERC-7281) | ||
|
||
xERC20 tokens are crosschain ERC-20 which can be transferred across chains by allowing the token owner to approve which bridges can mint/burn their token and the ability to set rate limits per bridge. You can learn more about xERC20 and Superchain interop [here](https://github.com/ethereum-optimism/design-docs/pull/203). | ||
|
||
* **Security:** Variable due to weakest-link scenario based on allowlisted verification mechanisms. | ||
* **Latency:** 1-block latency in the Superchain. Outside the Superchain, latency is variable based on allowlisted verification mechanism. | ||
* **Cost:** Variable based on allowlisted verification mechanisms. | ||
* **Cross-chain address:** Deterministic or requires cross-chain registry per deployment. | ||
* **Supported ecosystem:** EVM | ||
|
||
### OFT | ||
|
||
OFT is a token standard used to send, receive, and compose tokens across chains LayerZero supports. More information will be added about how OFTs can benefit from Superchain interop at a later date. | ||
|
||
* **Security:** Variable due to weakest-link scenario based on allowlisted verification mechanisms. | ||
* **Latency:** 1-block latency within the Superchain. Outside the Superchain, latency is variable based on allowlisted verification (DVN) mechanism. | ||
* **Cost:** Variable based on allowlisted verification mechanisms. | ||
* **Cross-chain address:** Requires cross-chain registry per deployment. | ||
* **Supported ecosystem:** EVM, Solana, MoveVM | ||
|
||
### NTT | ||
|
||
NTT is a token standard used to send, receive, and compose tokens across chains Wormhole supports. More information will be added about how NTTs can benefit from Superchain interop at a later date. | ||
|
||
* **Security:** Variable due to weakest-link scenario based on allowlisted verification mechanisms. | ||
* **Latency:** 1-block latency within the Superchain. Outside the Superchain, latency is variable based on allowlisted verification (transceiver) mechanism. | ||
* **Cost:** Variable based on allowlisted verification mechanisms. | ||
* **Cross-chain address:** Requires cross-chain registry per deployment. | ||
* **Supported ecosystem:** EVM, Solana, MoveVM | ||
|
||
|
||
## Key takeaways | ||
|
||
* `SuperchainERC20` is a simple and trust-minimized way for token issuers to make their token available across the Superchain interop cluster. | ||
* Token issuers can use other token standards (xERC20, OFT, NTT) and give `crosschainMint` and `crosschainBurn` permissions to the `SuperchainTokenBridge` or `L2ToL2CrossDomainMessenger` to benefit from Superchain interop. | ||
* Token issuers should include a `ERC-7802` interface on their token to simplify downstream integrations. | ||
|
||
## Next steps | ||
|
||
* Build a [revolutionary app](/app-developers/get-started) that uses multiple blockchains within the Superchain | ||
* Deploy a [SuperchainERC20](/stack/interop/tutorials/deploy-superchain-erc20) to the Superchain | ||
* [Learn more about SuperchainERC20](/stack/interop/superchain-erc20) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.