We are excited to announce that Lithium v2 is now available on the public testnet wallet! This release allows everyone to explore and test Lithium’s multi-hop functionality. To get started, follow the links below to access the Hydranet testnet wallet and request testnet funds. If you encounter any issues or have feedback, please reach out to us on the Hydranet Discord. Your input is invaluable!
This article will guide you step-by-step through conducting multi-hop transactions using Hydranet. It’s important to note that off-chain payments require the recipient to have inbound liquidity, which is something to consider during this process. In the near future, inbound liquidity will be managed automatically by the Channel Rental Manager, which will soon be available to the closed beta testnet group.
Before we dive into the guide, let’s take a moment to understand what multi-hop transactions are. A multi-hop transaction involves routing your payment through one or more intermediary off-chain nodes to reach the intended recipient. This method of payment routing is crucial in off-chain networks as it enables users to maintain just a few state channels with well-connected routing nodes, rather than opening multiple channels with each payment recipient.
There are essentially two primary ways of testing Lithium’s multi-hop functionality:
This guide will focus on the second approach — setting up two testnet wallets.
Begin by setting up two new Hydranet testnet wallets. To avoid any potential interference between the two wallets, it’s advisable to use two different browsers or, even better, two different devices. Once your wallets are set up and synced, head over to the Hydranet Discord and request testnet funds from the faucet.
To reveal your EVM deposit address, navigate to the Wallet tab, select the asset you want to receive, and click:
Keep in mind that you’ll need ETH to pay for gas when managing your state channels. Unless you plan to test multi-hop transactions using ETH, don’t forget to request ETH from the faucet as well.
To open and fund a state channel, go to the Wallet tab and follow these steps:
If you’re depositing USDC, you might need to set an allowance for the Lithium contract to spend the USDC in your wallet. Setting a higher allowance initially can save you from having to repeat this step in the future.
Repeat this process on your second wallet. Both of your wallets should now have one state channel open with the Hydranet Hub. Your Channels tab should look similar to this:
One of the simplest ways to increase your inbound liquidity is by spending your outbound liquidity. To do so, send an off-chain payment from one of your wallets to the Hydranet Hub. This transaction will rebalance your state channel: while your outbound liquidity decreases, the Hub’s outbound liquidity increases, which effectively boosts your inbound liquidity. The Hub’s address is:
Once one of your wallets has sufficient inbound liquidity, it will be ready to receive off-chain payments using the Hydranet Hub as an intermediary node. You can check the details of your state channel to confirm the updated liquidity status, which should look similar to this:
As you may notice, your Can send balance has decreased to 0 while your Can receive balance has increased.
Now that your setup is complete — you have two wallets, one with inbound liquidity and the other with outbound liquidity — you’re ready to send an off-chain payment between your two wallets.
On your wallet with outbound liquidity, on the Wallet tab, click:
You’ll notice that the transactions are instant, reflecting the efficiency of off-chain transactions. You may also notice a small fee deducted from your payment. This is the routing fee charged by the Hub for processing and routing your off-chain payment. In the example below, 5 USDC was sent from the wallet with outbound liquidity to the wallet with inbound liquidity. The wallet with inbound liquidity received all of the 5 USDC, but the wallet with outbound liquidity sent an extra 0.005 USDC to the Hub.
When you’re done sending transactions, you can withdraw your funds from your state channels. To do so, go to the Wallet tab and click:
If you had inbound liquidity, your state channel will remain open, though it can no longer be used to send payments — only to receive them. Such a channel will look similar to the channel visualized in step 3.
When you’re done testing, please return any testnet funds to Hydranet’s testnet faucet again
If you encounter any issues along the way or want to leave any feedback, please reach out on Hydranet’s Discord, either in the public testnet channel or by opening a support ticket. Thank you for contributing to Hydranet!