Skip to content

Commit

Permalink
fix: updating specs to support for interop entrypoint redesign (#429)
Browse files Browse the repository at this point in the history
Co-authored-by: Skeletor Spaceman <[email protected]>
  • Loading branch information
0xng and skeletor-spaceman authored Oct 15, 2024
1 parent 80338ad commit c6903a3
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions specs/interop/superchain-weth.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
- [Invariants](#invariants)
- [`deposit`](#deposit)
- [`withdraw`](#withdraw)
- [`sendERC20`](#senderc20)
- [`sendERC20To`](#senderc20to)
- [`relayERC20`](#relayerc20)
- [`crosschainBurn`](#crosschainburn)
- [`crosschainMint`](#crosschainmint)
- [ETHLiquidity](#ethliquidity)
- [Invariants](#invariants-1)
- [Global Invariants](#global-invariants)
Expand All @@ -25,6 +24,8 @@

Superchain WETH is a version of the standard WETH contract that allows ETH to be interoperable across the Superchain.
Superchain WETH treats ETH as an ERC-20 token for interoperability and avoids native ETH support.
Superchain WETH integrates with the [SuperchainTokenBridge](./predeploys.md#superchainerc20bridge) as its entrypoint
for interopable actions.
Superchain WETH also introduces a liquidity contract used to provide liquidity for native ETH across chains.

## Motivation and Constraints
Expand Down Expand Up @@ -67,31 +68,24 @@ but does not preclude a protocol-layer solution as long as we minimize implement

- Reverts if triggered on a chain that does not use ETH as a native token.

#### `sendERC20`
#### `crosschainBurn`

- Reverts if called by any address other than the `SuperchainTokenBridge`.
- Reverts if attempting to send more than the sender's available balance.
- Reduce's the sender's balance by the sent amount.
- Emits a transfer event from sender to null address for the sent amount.
- Emits a `SendERC20` event.
- Burns liquidity by sending the sent amount of ETH into the `ETHLiquidity` contract if native token is ETH.
- Must not revert.
- Sends a message to `SuperchainWETH` on the recipient chain finalizing a send of WETH.
- Must not revert.

#### `sendERC20To`

- All invariants of `sendERC20`.
- Message sent to `SuperchainWETH` on recipient chain includes `to` address as recipient.
- Emits a `CrosschainBurnt` event.

#### `relayERC20`
#### `crosschainMint`

- Reverts if called by any address other than the `L2ToL2CrossDomainMessenger`.
- Reverts if `crossDomainMessageSender` is not the `SuperchainWETH` contract.
- Reverts if called by any address other than the `SuperchainTokenBridge`.
- Mints liquidity from the `ETHLiquidity` contract if native token is ETH.
- Must not revert.
- Increases the recipient's balance by the sent amount.
- Emits a transfer event from null address to recipient for the sent amount.
- Emits a `RelayERC0` event.
- Emits a `CrosschainMinted` event.

## ETHLiquidity

Expand Down

0 comments on commit c6903a3

Please sign in to comment.