Accelxr

Posted on Sep 21, 2021Read on Mirror.xyz

Tutorial: How to Send Funds Using Hop

What is Hop? 🐇

Hop is a scalable token bridge protocol for Ethereum’s layer-2 ecosystem. The protocol uses a special intermediary asset called an hToken to quickly move funds from one network to another. These hTokens are automatically swapped for their corresponding assets through the Hop Protocol interface, resulting in a rather seamless experience for transporting assets between networks. 

Currently, Hop supports sending USDC, USDT, and MATIC across the Mainnet, Polygon, xDai, Optimisim, and Arbitrum networks. Hop also plans to add even more assets in the future, including ETH, WBTC, and DAI, making it an extremely versatile cross-chain solution to the increasingly fragmented world of layer 2s. 

How to Send Funds Using Hop Tutorial 💱

For this tutorial, you will need:

  • A web3 wallet (e.g. Metamask)
  • USDC, USDT, or MATIC tokens you would like to transfer
  • The native gas payment token of the chain you are transferring from (e.g. MATIC if transferring from the Polygon network).
    • Note: you will want to make sure you have the native gas token of the chain you are transferring to as well. For example, if you transfer USDC from Arbitrum to Optimism but don’t own any ETH on Optimism, you won’t be able to do anything with the USDC once it is there. It’s not necessary for the tutorial, but it’s still important to know.

First, head to https://hop.exchange/ and click ‘Use Hop’ in the center of the page. In the upper right corner you will see a button to connect your wallet. Go ahead and do so now. 

At the time of writing, you can send USDC, USDT, and MATIC between Mainnet, Polygon, xDai, Optimism, and Arbitrum. Make sure you are on the ‘Send’ tab and click the dropdown next to Send to select which asset you would like to transfer. 

Then, select the network and enter the amount in the ‘From’ and ‘To’ fields.

In the example below, I am sending 500 USDC from Polygon, and I will receive 495 USDC on Optimism after fees. 

After verifying the details, hit ‘Approve’ and confirm the transaction in your web3 wallet. This will provide Hop with the ability to spend your tokens. 

Once approved, you’ll now be able to send your token between networks. Double check the estimated amount received after fees and click ‘Send’ if everything looks correct.

Confirm ‘Send’ one more time and approve the transaction in your wallet. 

Transfer times vary depending on which networks you are transferring between. As a general rule of thumb, L1 to L2 transactions take the same amount of time as using the native bridge. From L2 to L1 or between L2 transactions will typically be completed in however many blocks it takes to be considered final on the sending chain. Here are some example times:

Deposits from L1

  • Ethereum -> xDai: ∼5 minutes
  • Ethereum -> Polygon: ∼8 minutes

Withdrawals from xDai

  • xDAI -> Ethereum: ∼2 minutes (12 blocks)
  • xDAI -> Polygon: ∼2 minutes (12 blocks)

Withdrawals from Polygon

  • Polygon-> Ethereum: ∼4.5 minutes ( 124 blocks)
  • Polygon-> xDai: ∼4.5 minutes ( 124 blocks)

Congratulations! 🎈

You have now transferred assets between networks. Your funds will show up after a few minutes on the new network in whatever currency you sent (e.g. if you sent USDC from Polygon to Optimism, you will receive USDC on Optimism after a few minutes).

Layer 2s, sidechains, and other scaling solutions will continue to be expanded in the near term, growing the Ethereum network beyond its present-day capabilities, but thankfully our multi-chain world does not need to be fractured. Instead, protocols like Hop will allow us to seamlessly move assets between chains without ever having to wait extended periods of time or hassle with bridging back down to Mainnet just to transfer between layer 2s.