MergeSwap: the ETH (PoW) <> ETH (PoS) bridge

A quick walkthrough on how to bridge Ether from Proof-of-Work to Proof-of-Stake back-and-forth.

codyx
4 min readSep 18, 2022
mergeswap.xyz

Knowing that the Ethereum merge event was happening soon, we came up with the idea of creating a bridge to “transfer” pre-merge Ether to the new Ethereum mainnet running on Proof-of-Stake.

Marcello Bardus (https://u.today/ethereumpow-ethw-tokens-can-be-bridged-to-pos-chain-heres-how) originally tweeted that intent alongside with a brief technical overview here:

The following is a how-to guide to help you proceed in case you’d like to try the bridge. Please keep in mind that this project is experimental.

Bridging ETH from Ethereum Proof-of-Work (PoW) to Ethereum Proof-of-Stake (PoS)

Diagram illustrating the deposit procedure

Go to this official DApp: https://mergeswap.xyz

  1. Click «Connect Wallet» and select the account you want to deposit Ether (PoW) from.

Note: any Ethereum account holding Ether pre-merge is eligible.

2. Click on the «PoW -> PoS» path.

The DApp will ask to switch to the appropriate network (an Ethereum PoW node we’ve set up that is running geth from github.com/ethereumpow/geth).

The reason why that step is required is that the post-merge RPC used for Ethereum is linked to a Proof-of-Stake node.

3. Select an amount of ETH (PoW) you feel comfortable depositing.

Note: this project hasn’t been audited yet and you must use it at your own risk.

Contracts are available here: github.com/marcellobardus/mergeswap-contracts

4. Click on «Deposit», look at the transaction and confirm it.

The UI will wait for the transaction to be mined and an additional number of blocks (for security reasons).

You will be asked to switch to Ethereum PoS network (Mainnet) to complete the procedure. It is important that you complete the next step briefly afterward as if you wait too long, minting may not be working because of some external synchronization bugs in PoW nodes.

5. Click on «Mint», it will mint all your previously deposited Eth and transfer you the original amount (minus 1% bridge fee) in WrappedEthPow.

6. (Optional) Click «Accept» to add the WrappedEthPow token to your wallet list.

Congratulations, you’re good to go. You can now freely do whatever you want with your WrappedEthPoW on Ethereum Proof-of-Stake!

If you’re interested in trading the token, you can do so using Uniswap pools.

One pool has notably been recently created by someone: https://info.uniswap.org/#/pools/0x8a0f395c59595880f4ceb5d9547678680e39de4e

Bridging back WrappedETHPoW from Ethereum Proof-of-Stake (PoS) to Ethereum Proof-of-Work (PoW)

Diagram illustrating the withdrawal procedure (redeeming the original asset)

To withdraw your Eth from the Ethereum PoW contract, you need to burn your WrappedEthPow tokens on PoS and then redeem the original Eth on PoW.

This may be accomplished by following this procedure:

Go to this official DApp: https://mergeswap.xyz

  1. Click on ‘PoS’ network.

2. Click on the «PoS -> PoW» path.

3. Select the amount to withdraw.

4. Click on “Withdraw” and confirm the transaction. It will burn your WrappedEthPow, wait a bit and ask to switch to Ethereum PoW network to complete the procedure.

Once you’re in the PoW network, make sure that the «PoS -> PoW» path is selected.

5. Click on “Redeem” and confirm the transaction. It will transfer your originally deposited Eth back to you.

--

--

codyx

crypto (blockchain), engineering, psychology, philosophy 🔼 growth mindset