-
Notifications
You must be signed in to change notification settings - Fork 265
superchain-weth #1043
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
superchain-weth #1043
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ac6c0e5
superchain-weth
cpengilly e643ab4
Update superchain-weth.mdx
cpengilly 6e69010
fix lint issues
krofax 4d87f5c
fix lint spelling issues
krofax 10bf138
Merge branch 'main' into interop-eth
cpengilly 32e63d4
Merge branch 'main' into interop-eth
cpengilly d653ee1
address comments
cpengilly 9cffc2e
Update superchain-weth.mdx
cpengilly 2370c7d
Update superchain-weth.mdx
cpengilly fb49963
Update superchain-weth.mdx
cpengilly e43dd95
Update superchain-weth.mdx
cpengilly b8dd458
Update words.txt
cpengilly 0224894
language updates
cpengilly 20a61c8
relocate superchaintokenbridge callout
cpengilly 499d55d
Apply suggestions from code review
cpengilly 8455b38
Merge branch 'main' into interop-eth
cpengilly a582c95
Merge branch 'main' into interop-eth
cpengilly 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
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,86 @@ | ||
--- | ||
title: SuperchainWETH (Interoperable ETH) | ||
lang: en-US | ||
description: Learn basic details about SuperchainWETH or Interoperable ETH. | ||
--- | ||
|
||
import { Callout } from 'nextra/components' | ||
|
||
# SuperchainWETH (Interoperable ETH) | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<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> | ||
|
||
Superchain WETH or Interoperable ETH is a specialized version of the standard WETH (Wrapped Ether) contract designed to enable seamless movement of ETH across the Superchain. It addresses the liquidity constraints and usability issues that arise when transferring ETH between different chains. | ||
|
||
## Features and benefits | ||
|
||
* Enables seamless ETH transfers across different chains in the Superchain | ||
* Maintains fungibility of ETH across the Superchain | ||
* Provides liquidity for cross-chain transactions | ||
* Improves user experience by abstracting complex bridging processes | ||
|
||
<Callout> | ||
The `SuperchainTokenBridge` can only rebalance assets across chains. It cannot mint or increase/decrease the total circulating supply. | ||
</Callout> | ||
|
||
## How it works | ||
|
||
Currently, L2-to-L2 ETH transfers between two interoperable chains require four separate transactions: | ||
|
||
1. Wrap `ETH` to `SuperchainWETH`. | ||
2. Call `SuperchainTokenBridge#SendERC20` to burn `SuperchainWETH` on source chain and relay a message to the destination chain that mints `SuperchainWETH` to the recipient (`crosschainBurn` is used). | ||
3. Execute the message on the destination chain, triggering `SuperchainTokenBridge#RelayERC20` to mint `SuperchainWETH` to the recipient (`crosschainMint` is used). If the destination is a non-custom gas token chain, ETH is sourced from the `ETHLiquidity` contract. | ||
4. Unwrap the received `SuperchainWETH` to `ETH`. | ||
|
||
<Callout type="info"> | ||
cpengilly marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Abstraction is a possible future consideration to reduce this process to two transactions, which can be followed in the [design docs](https://github.com/ethereum-optimism/design-docs/pull/146/files). | ||
</Callout> | ||
|
||
```mermaid | ||
sequenceDiagram | ||
participant User | ||
participant Source Chain | ||
participant Cross-Chain Messenger | ||
participant Destination Chain | ||
|
||
User->>Source Chain: 1. Wrap ETH to SuperchainWETH | ||
Source Chain->>Cross-Chain Messenger: 2. Burn SuperchainWETH and relay message | ||
Cross-Chain Messenger->>Destination Chain: 3. Mint SuperchainWETH to recipient | ||
User->>Destination Chain: 4. Unwrap SuperchainWETH to ETH | ||
``` | ||
_Figure 1: Superchain WETH transfer process between two interoperable L2 chains._ | ||
|
||
<Callout type="warning"> | ||
`crosschainBurn` and `crosschainMint`can only be called by the `SuperchainTokenBridge`. | ||
</Callout> | ||
|
||
## Major components | ||
|
||
### `SuperchainWETH` contract | ||
|
||
This contract implements the core functionality for wrapping, unwrapping, and cross-chain transfer of ETH. It integrates with the `SuperchainTokenBridge` for interoperable actions. | ||
|
||
* Contract address: `0x4200000000000000000000000000000000000024` | ||
|
||
### `ETHLiquidity` contract | ||
|
||
A predeploy contract with a large pool of ETH that provides liquidity for cross-chain transfers. It allows "burning" and "minting" of ETH for cross-chain transfers. ETH is associated with bridge ETH from the L1 lockbox, making ETH available to interop chains through a shared lockbox rather than fragmented amongst the existing portal contracts. | ||
|
||
* Contract address: `0x4200000000000000000000000000000000000025` | ||
|
||
### `L2ToL2CrossDomainMessenger` contract | ||
|
||
This predeploy contract facilitates general message passing between different chains in the Superchain. It also securely transfers ERC20 tokens between L2 chains. | ||
|
||
* Contract address: `0x4200000000000000000000000000000000000023` | ||
|
||
<Callout type="info"> | ||
`SuperchainWETH` implements strict access controls to ensure security (e.g., only `SuperchainWETH` can call `ETHLiquidity` functions). | ||
</Callout> | ||
|
||
## Next steps | ||
|
||
* Explore the [`SuperchainWETH`](https://specs.optimism.io/interop/superchain-weth.html) specs for in-depth implementation details. | ||
* Review the [Superchain Interop Explainer](explainer) for answers to common questions about interoperability. |
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
Oops, something went wrong.
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.