Lithium v2 Public Release

HYDRANET
HYDRANET
Published in
5 min readSep 16, 2024

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.

Multi-hop transactions

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.

With multi-hop, it’s enough to open one state channel with a well-connected off-chain node, which can route payments to others, instead of using direct channels with each participant.

Sending a multi-hop transaction

There are essentially two primary ways of testing Lithium’s multi-hop functionality:

  1. Using a friend’s open state channel with inbound liquidity.
  2. Setting up two testnet wallets to transact between them.

This guide will focus on the second approach — setting up two testnet wallets.

1) 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:

  • Receive → Receive on-chain → Copy the address

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.

2) Open and fund state channels

To open and fund a state channel, go to the Wallet tab and follow these steps:

  • Transfer → Transfer to off-chain → Enter the amount (e.g., 10 USDC) → Next → Transfer to off-chain

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:

3) Increasing your inbound liquidity

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:

  • Hub: 0x8529c8cdf6304f7d095047e24fc3310f427c3990

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.

4) Sending a multi-hop transaction

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:

  • Send → Send off-chain → Via address → Enter the recipient’s address (your second wallet) → Enter the amount → Next → Send

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.

5) Closing your channels

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:

  • Transfer → Transfer to on-chain → Set the amount (maximum) → Next → Transfer to on-chain

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

  • Testnet faucet: 0x89504f83737EDe2a6886439E6d4eF25Fc7e3A487

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!

To stay updated or ask any questions you may have: Join us on Discord and follow us on Twitter to stay up-to-date with our latest news and developments.

Make sure to check out our website: https://hydranet.ai

--

--