Alpha Guides

Off-chain swaps

Welcome to the future of trading! This guide introduces our highly anticipated off-chain swaps - accessible directly from your web browser, anytime and anywhere. With this functionality, you can seamlessly trade BTC for ETH or USDC, with more tokens to come, in seconds and free of network fees. Enjoy the speed and convenience of a centralized exchange while maintaining complete control over your funds. 

What to expect in the Alpha release

The Alpha release focuses on ensuring stable and reliable swaps. During this phase, we’ll use the SimpleSwap UI, a user interface similar to traditional decentralized exchanges. Think Uniswap. The SimpleSwap UI is intended to automate the entire trading process, from opening to closing of state channels. However, at this stage, state channels need to be set up manually before the trade. The automated management of state channels will be added in future updates as we work towards a robust and user-friendly experience of our platform.

Prepare for a swap

Given the above, prepare your Hydranet wallet for a swap by:

  1. Set up your wallet
    If needed, follow the instructions in this guide to configure your wallet.
  2. Fund your state channels
    Ensure your state channels have both outbound and inbound liquidity, as outlined in this guide. Once funded, wait until all channels display an ACTIVE status.

Here’s an example of what your channels could look like when you are ready for trading, with USDC, ETH, and BTC state channels with inbound (Can Receive) and outbound (Can Send) liquidity:

offChainSwaps_stateChannels.png

Perform a swap

Once your wallet and state channels are ready, trading on Hydranet is easy! 

  1. Access the SimpleSwap UI
    Navigate to the Swap page on the left-hand menu. 
  2. Execute Your Swap
    Select your desired trading pair and amounts, and initiate the swap by clicking Swap. The following trading pairs will be available, you can choose freely among them:
    • BTC/ETH
    • BTC/USDC
    • ETH/USDC
  3. Verify Balances
    After each swap (or session of swaps), your wallet and state channels balances should update accordingly. For instance, trading USDC to BTC should reflect a decrease in USDC outbound liquidity but an increase in USDC inbound liquidity, and v.v. for BTC. 

offChainSwaps_Swap.png

While this guide covers a nominal swap case, we encourage you to not only test the nominal, but also push the boundaries and experiment with different scenarios to uncover possible edge cases. The more we know, the better, as it helps us refine Hydranet’s user experience! 

Happy testing!


Copyright © 2024