How to use SafeBridge the SafeCoin — Ethereum bridge

Martin
5 min readFeb 12, 2022

Wormhole, a famous cross-chain crypto bridge between Solana, Ethereum, Avalanche, and others, has recently been compromised, leading a hacker to drain roughly $320 million in Wrapped Ethereum (80,000 $WETH) out of the protocol. WETH in Wormhole is backed 1:1 by WETH Ethereum stored in the Wormhole smart contract. The reason the hacker was able to exploit the wormhole bridge in the first place was due to some serious miscommunication between the Wormhole and Solana developers regarding the security of specific functions in the bridge contract. This allowed the hacker to mint roughly 120,000 WETH on Solana and then bridged the WETH back to Ethereum, draining almost all WETH deposited into the Wormhole bridge.

SafeBridge, a wormhole fork created by the SafeCoin developers, Believes that such an exploit should have never been possible in the first place if the Wormhole developers had added additional audit checks in the bridge process.

SafeBridge added additional balance audits after every significant event in the bridge process to ensure that every wrapped token is backed 1:1 by the underlying asset. Because of this, the 320 Million dollar exploit could never have happened as the hacker would have never been able to mint the additional 120,000 $WETH because the additional security mechanism would have intervened before the hacker was able to mint the WETH.

How to bridge Ethereum Tokens to SafeCoin with SafeBridge

To bridge Ethereum ERC-20 tokens to SafeCoin SPL, you need an Ethereum wallet and a SafeCoin wallet.

SafeBridge is currently deployed on testnet, and because of that, only Metamask and SafeCoinWallet are supported. If you have not yet set up your SafeCoinWallet you can find my guide here.

Before starting the bridging process, we will need some Goerli testnet ETH and some SafeCoin testnet coins to pay gas fees.

To get some free testnet ETH, you can use the Goerli Testnet faucet here. To get SafeCoin testnet coins, switch the wallet to the testnet and click on the Request Airdrop button.

Now that we have some Testnet ETH and SAFE, we can start the bridging process by going to testnet.safebridge.org/#/transfer.

For this example, we will be bridging ETH over From Ethereum to SafeCoin, but the process is the same for other tokens and for bridging from SafeCoin to Ethereum.

To start connect your MetaMask to SafeBridge, Your wallet might ask you to switch the network to Goerli testnet if you are not already on that network.

After connecting our wallet we can select the asset we want to bridge over by pressing on select token and selecting the token we want to bridge over.

Now that we have selected our token, it is time to input the amount we want to send and click on next.

Now that we have entered the amount that we want to bridge over, we can connect our SafeCoinWallet by clicking on connect. A popup will open asking you to connect your wallet

Now that your SafeCoinWallet is connected to SafeBridge, click on create associated token. Your SafeCoinWallet will open, asking you to approve the creation of the SafeCoin SPL token address in your wallet. After the associated token is created, click on Next.

Now that the associated token address has been created, it is time to send the tokens from ETH to the bridge. To do this, click on transfer, then Confirm

Next, Your Metamask will ask you to confirm the transaction click on Confirm, and now we will have to wait for 15 blockchain confirmations before we can claim our tokens on SafeCoin.

After the 15 blockchain confirmations, we can claim our tokens on SafeCoin as SafeCoin SPL tokens by clicking on redeem and confirming the transactions on the SafeCoinWallet. Note that there will be multiple transactions that you need to confirm.

Now that you have redeemed your tokens, you have successfully completed the bridging process from Ethereum to SafeCoin. Feel free to experiment with bridging to and from SafeCoin, and if you experience any problems during the briding process, feel free to ask the SafeCoin team on Discord or Telegram.

If you have found this article helpful, please consider donating and staking to my validator. Otherwise, consider reading one of my other articles.

SAFE Donation Address: 3aHEKicGmWiTgcNifFkJjpJ3BCxgf5AqFnJrJfYqJUax

SafeCoin validator ID: 9UzheMmVr1eLAjFiwaYftTNrC8JTGSJKi7SBiCwfgC7H

SafeCoin Validator Name: “Martin

--

--

Martin

Hi I am Martin, I am a student form the Netherlands who loves to talk and write about Crypto.