You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/stack/interop/superchain-weth.mdx
+44-1Lines changed: 44 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,13 @@ import { InteropCallout } from '@/components/WipCallout'
12
12
13
13
# Interoperable ETH
14
14
15
-
InteroperableETH is implemented using the [`SuperchainWETH`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainWETH.sol) contract, along with [`ETHLiquidity`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/ETHLiquidity.sol), and [`L2ToL2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol) to enable ETH interoperability within the Superchain.
15
+
InteroperableETH is implemented using three contacts:
16
+
17
+
-[`SuperchainWETH`](https://github.com/ethereum-optimism/optimism/blob/develop/contracts-bedrock/src/L2/SuperchainWETH.sol) is the bridge that lets you move ETH from one Superchain blockchain to another.
18
+
-[`ETHLiquidity`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/ETHLiquidity.sol) holds a practically infinite amount of ETH (it starts with 2<sup>248</sup> WEI).
19
+
It is used by `SuperchainWETH` as a liquidity repository to be able to provide ETH on the destination chain.
20
+
-[`L2ToL2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol) is used to [pass messages between different chains](./message-passing).
21
+
16
22
InteroperableETH works by depositing ETH on the source chain's `ETHLiquidity` and withdrawing an equivalent amount on the destination chain.
17
23
This approach addresses issues such as liquidity fragmentation and poor user experiences caused by asset wrapping or reliance on liquidity pools.
18
24
@@ -91,6 +97,43 @@ sequenceDiagram
91
97
7.`SuperchainWETH` uses [`SafeSend`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/universal/SafeSend.sol) to send the ETH.
92
98
This means that even if the destination is a smart contract, its custom logic does not get called, [in contrast to normal ETH transfers](https://docs.base.org/base-learn/docs/address-and-payable/#receiving-ether-with-payable-addresses).
93
99
100
+
101
+
## L1 Treasury
102
+
103
+
All the ETH in circulation on the Superchain (all the ETH except for what is held by `ETHLiquidity`) needs to be backed by real ETH held on L1.
104
+
This is done by the .
105
+
106
+
Here is an example of how this works.
107
+
108
+
| Step | User on L1 | Lockbox | User on chain A | ETHLiquidity on chain A | User on chain B | ETHLiquidity on chain B |
109
+
| -: | -: | -: | -:| -: | -: | -: |
110
+
| 1 | 7 | 200 | 0 | 100000 | 0 | 100000
111
+
| 2 | 4 | 203 | 3 | 100000 | 0 | 100000
112
+
| 3 | 4 | 203 | 2 | 100001 | 0 | 100000
113
+
| 4 | 4 | 203 | 2 | 100001 | 1 | 99999
114
+
| 5 | 4 | 203 | 2 | 100001 | 0 | 99999
115
+
| 6 | 5 | 202 | 2 | 100001 | 0 | 99999
116
+
117
+
1. The initial state. The user has 7 ETH on L1, and nothing on chains A and B.
118
+
119
+
2. The user bridges 3 ETH to chain A.
120
+
The user sends 3 ETH on L1 to the bridge, which is locked in the lockbox.
121
+
The bridge on chain A then mints 3 ETH for the user.
122
+
123
+
3. The user sent the initiating message to `SuperchainWETH` on chain A, along with 1 ETH to bridge to chain B.
124
+
This 1 ETH is sent to `ETHLiquidity` on chain A.
125
+
126
+
4. Somebody (the user, a relayer action on behalf of the user, etc.) sent the corresponding executing message to chain B.
127
+
`SuperchainWETH` transfers 1 ETH from `ETHLiquidity` on chain B to the user.
128
+
129
+
5. The user decides to withdraw 1 ETH from chain B back into L1.
130
+
Normally a user would do this through a third party bridge, which is faster and usually cheaper, but for illustration purposes this user uses the standard OP bridge.
131
+
The user starts with an initiating message on chain B, which burns 1 ETH and sends a message to L1.
132
+
133
+
6. After the week long [challenge period](/connect/resources/glossary#challenge-period), the user finalizes the withdrawal on L1.
134
+
The lock box releases 1 ETH, which is then sent to the user.
135
+
136
+
94
137
## Next steps
95
138
96
139
* Explore [the `SuperchainWETH` specs](https://specs.optimism.io/interop/superchain-weth.html) for in-depth implementation details.
0 commit comments