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
+28-22Lines changed: 28 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,15 +12,15 @@ import { InteropCallout } from '@/components/WipCallout'
12
12
13
13
# Interoperable ETH
14
14
15
-
InteroperableETH is implemented using three contracts:
15
+
InteroperableETH enables seamless ETH transfers across Superchain blockchains. It is implemented using three key contracts:
16
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), which serves as a liquidity provider for ETH transfers.
19
-
It is used by `SuperchainWETH` as a liquidity repository to be able to provide ETH on the destination chain when transferring.
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).
17
+
*[`SuperchainWETH`](https://github.com/ethereum-optimism/optimism/blob/develop/contracts-bedrock/src/L2/SuperchainWETH.sol): A bridge contract that facilitates ETH transfers between Superchain blockchains.
18
+
*[`ETHLiquidity`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/ETHLiquidity.sol): A liquidity provider for ETH transfers.
19
+
`SuperchainWETH`uses this contract as a liquidity repository to ensure ETH availability on the destination chain.
20
+
*[`L2ToL2CrossDomainMessenger`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/L2ToL2CrossDomainMessenger.sol): A messaging contract that [facilitates cross-chain communication](/message-passing).
21
21
22
-
InteroperableETH works by depositing ETH on the source chain's `ETHLiquidity`and withdrawing an equivalent amount on the destination chain.
23
-
This approach addresses issues such as liquidity fragmentation and poor user experiences caused by asset wrapping or reliance on liquidity pools.
22
+
InteroperableETH deposits ETH into the `ETHLiquidity` contract on the source chainand withdraws an equivalent amount on the destination chain.
23
+
This mechanism improves capital efficiency and eliminates liquidity fragmentation and poor user experiences caused by asset wrapping or reliance on liquidity pools.
24
24
25
25
## Features and benefits
26
26
@@ -74,33 +74,39 @@ sequenceDiagram
74
74
1. The user (or a contract operating on a user's behalf) calls `SuperchainWETH.sendETH` with a destination address and a chainId.
75
75
This call should have an attached amount of ETH.
76
76
77
-
2.`SuperchainWETH`sends the amount of ETH to `ETHLiquidity`, removing it from circulation on the source chain.
77
+
2.`SuperchainWETH`transfers the specified ETH amount to `ETHLiquidity`, removing it from circulation on the source chain.
78
78
79
-
3.`SuperchainWETH` on the source chain sends a [`relayETH`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainWETH.sol#L125-L145)call to the `SuperchainWETH` on the destination chain using [`L2ToL2CrossDomainMessenger`](./message-passing).
79
+
3.`SuperchainWETH` on the source chain sends a [`relayETH`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/L2/SuperchainWETH.sol#L125-L145)message to `SuperchainWETH` on the destination chain using the [`L2ToL2CrossDomainMessenger`](/message-passing).
80
80
81
81
#### Executing message
82
82
83
-
4.Some offchain entity submits a transaction with the executing message.
84
-
Any address can submit such a transaction, but it has to have ETH on the destination chain to do so.
85
-
We expect that usually this will be a relayer rather than the user because the user won't have ETH on the destination chain yet.
83
+
4.An off-chain entity submits a transaction to execute the message.
84
+
Any address can submit this transaction, but it must have ETH on the destination chain.
85
+
Typically, a relayer submits the transaction, since the user does not yet have ETH on the destination chain.
86
86
87
-
5.`L2ToL2CrossDomainMessenger` on the destination chain calls `SuperchainWETH` with the source of the ETH, the destination address, and the amount.
87
+
5.`L2ToL2CrossDomainMessenger` on the destination chain calls `SuperchainWETH` with the following details:
88
88
89
-
`SuperchainWETH` runs several sanity checks:
89
+
* Source of the ETH
90
+
* Destination address
91
+
* Amount of ETH
90
92
91
-
* The `relayETH` call has to come directly from `L2ToL2CrossDomainMessenger`.
92
-
* The interop message has to have been sent by `SuperchainWETH`
93
+
`SuperchainWETH` performs several sanity checks:
93
94
94
-
6.`SuperchainWETH` withdraws the requested amount of ETH from `ETHLiquidity`.
95
-
It is the only contract allowed to withdraw from `ETHLiquidity`, which adds to the ETH in circulation on the destination chain.
95
+
* The `relayETH` call must originate from `L2ToL2CrossDomainMessenger`.
96
+
* The interop message must have been sent by `SuperchainWETH`
96
97
97
-
7.`SuperchainWETH` uses [`SafeSend`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/universal/SafeSend.sol) to send the ETH.
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).
98
+
6.`SuperchainWETH` withdraws the specified amount of ETH from `ETHLiquidity`.
99
+
Only `SuperchainWETH` can withdraw from `ETHLiquidity`, ensuring that the ETH is correctly reintroduced into circulation on the destination chain.
100
+
101
+
7.`SuperchainWETH` uses [`SafeSend`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/universal/SafeSend.sol) to send ETH.
102
+
This ensures that even if the destination is a smart contract, its custom logic is not executed.
103
+
This behavior differs from [standard ETH transfers](https://docs.base.org/base-learn/docs/address-and-payable/#receiving-ether-with-payable-addresses), where smart contracts can trigger custom logic upon receiving ETH.
99
104
100
105
## L1 Treasury
101
106
102
-
Every ETH in circulation on the Superchain (all the ETH except for those held by `ETHLiquidity`) needs to be backed by ETH held on L1.
103
-
This is done using a lockbox contract on L1 that holds all the ETH ever bridged to [chains in the Superchain interop cluster](explainer#superchain-interop-cluster) and not yet withdrawn.
107
+
Every ETH in circulation on the Superchain—excluding ETH held by `ETHLiquidity`—must be backed by ETH on L1.
108
+
109
+
This is enforced by a lockbox contract on L1, which holds all ETH bridged to [Superchain interop cluster chains](https://github.com/ethereum-optimism/docs/pull/1297/explainer#superchain-interop-cluster) that has not yet been withdrawn.
104
110
New ETH can only be minted on L2 when it is locked on L1, and it is burned on L2 before it can be released from the lockbox.
0 commit comments