Skip to content

Commit 19f9089

Browse files
authored
feat: SuperchainETHBridge design doc (#217)
1 parent 911eb67 commit 19f9089

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

protocol/superchain-eth-bridge.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Purpose
2+
3+
This document proposes converting `SuperchainWETH` into a dedicated ETH bridge for facilitating `ETH` transfers within the interop cluster - `SuperchainETHBridge`.
4+
5+
# Summary
6+
7+
The `SuperchainWETH` contract will be renamed to `SuperchainETHBridge` and stripped of its `WETH98` and `IERC7802` functionality, retaining only ETH bridging capabilities.
8+
9+
# Problem Statement + Context
10+
11+
`SuperchainWETH` was initially introduced to facilitate `ETH` transfers within the interop cluster ([design doc](./interoperable-ether.md)). Sending `ETH` between chains in the interop cluster required three steps:
12+
1. wrap `ETH` to `SuperchainWETH`
13+
2. send the `SuperchainWETH` to the destination through the `SuperchainTokenBridge`
14+
3. unwrap the `SuperchainWETH` back to `ETH`
15+
16+
To simplify this process, the `SuperchainWETH` contract was updated to support direct ETH bridging through `sendETH` and `relayETH` functions ([design doc](./interoperable-ether-transfers.md)).
17+
18+
With this implementation of `SuperchainWETH`, several issues exist:
19+
20+
- Having two versions of `WETH` (`WETH` and `SuperchainWETH`) creates confusion for developers and users
21+
- Liquidity could become fragmented between `WETH` and `SuperchainWETH` (e.g., through separate DeFi liquidity pools)
22+
- Both tokens share the same symbol, making them difficult to distinguish from a user perspective
23+
- Poor separation of concerns: `SuperchainWETH` acts as both a token and a bridge
24+
- Cross-chain ETH transfer indexing requires tracking events across multiple contracts (`SuperchainTokenBridge` and `SuperchainWETH`)
25+
26+
# Proposed Solution
27+
28+
The solution involves the following changes:
29+
30+
1. Remove the `WETH98` and `IERC7802` extensions from the contract, leaving only `sendETH` and `relayETH` functions.
31+
2. Rename `SuperchainWETH` to `SuperchainETHBridge` to better reflect its primary purpose
32+
33+
## Implementation Details
34+
35+
The simplified contract would look like:
36+
37+
```solidity:contracts/SuperchainETHBridge.sol
38+
// Previous SuperchainWETH contract, stripped down to only ETH bridging functionality
39+
contract SuperchainETHBridge {
40+
function sendETH(address to, uint256 chainId) external payable returns (bytes32 msgHash_) {
41+
// ... existing implementation ...
42+
}
43+
44+
function relayETH(address _from, address _to, uint256 _amount) external {
45+
// ... existing implementation ...
46+
}
47+
}
48+
```
49+
50+
### Advantages
51+
52+
- Clear separation of concerns between `ETH` bridging and wrapped `ETH`
53+
- Simplified developer experience
54+
- Reduced risk of user confusion
55+
56+
# Risks & Uncertainties
57+
58+
- The protocol will not provide a `SuperchainERC20` compatible `WETH` predeploy. Cross-chain `WETH` transfers would require either unwrapping/wrapping `ETH` or relying on third-party `WETH` implementations that support the `SuperchainERC20` interface.
59+
60+
# Alternatives Considered
61+
62+
## Upgrade Existing `WETH` to be a `SuperchainERC20`
63+
64+
### Advantages
65+
- Single representation of `WETH`
66+
67+
### Disadvantages
68+
- Does not solve the confusion around dual bridge/token functionality
69+
- The `WETH` contract is not upgradeable, so this would require manual intervention to upgrade the contract.
70+
71+
# Timeline
72+
73+
The changes should be implemented before interop reaches testnet.

0 commit comments

Comments
 (0)