Bison Relay Lightning Network Management: How to Rebalance Your Channels
Lightning Network uses payment channels to facilitate transactions. These channels need to be fully loaded to participate. The upside of this concept is scalability with fast, cheap, micro transactions.
Rebalancing and channel liquidity on Bison Relay:
- Channel considerations
- The channels area
- Closing channels when funds are low
- Reopening channels with enough funds
- Backing up channel once all new channels are fully open
The lightning network facilitates payments slightly differently from conventional blockchain transactions, which can be a little confusing initially. This can be especially problematic when you run low on funds and need to rebalance your channels.
Here are a few key points regarding Bison Relay’s LN channels:
The outbound channel
The outbound channel is used for sending and receiving messages, sending tips and pretty much any other activity for sending funds.
The outbound channel is balanced from left to right. For instance, the funds you have available are in the “local” Area and the funds spent are in the “remote” Area. As you spend funds or send and receive messages, your available balance, the local balance, moves to the remote balance.
For example, if you load 0.2dcr into your outbound channel, this will start in the “local” balance and gradually move to the “remote” balance over time.
When you close this channel, the local balance gets moved back to your on-chain account and the remote balance gets dissolved. When reopened a new outbound channel, this process starts again.
The inbound channel
When opening inbound channels, you’re effectively asking to borrow funds from a liquidity provider and pay a small fee for this service. Liquidity Providers help users to find a route to your LN channels and make sure funds can be transferred without routing issues.
When you open an inbound channel, you tell the provider how much dcr to make available. These funds are then added to the “remote” side of the balance. Inbound channels work from right to left, starting in the remote area and then gradually moving to the local area, as you receive tips and payments. This is the reverse of the outbound channel.
When the remote side gets low, you’ll need to rebalance by closing the channel and opening a new one. When closing the channel, the amount in your “local” balance gets transferred to your on-chain account and the “remote” side of the channel gets dissolved. By opening a new inbound channel, the process starts again.
Inbound channels are predominantly used for receiving tips and other payments. When setting up inbound channels, it’s worth thinking about how much you expect to receive before you want to rebalance. This is for two reasons, firstly the more you put into this channel the higher the fee will be. And secondly, if the amount it too low, you’ll be opening and closing channels more frequently, which could get expensive and time-consuming.
Closing and opening channels
Let’s have a look at the process for rebalancing our Lightning Network channels.
- When funds are low, close the appropriate channels. In our case, we’re going to close both to start afresh, but generally, you only need to close the one with low funds (closing a channel takes 1 to 2 Blockchain Confirmations)
- We’ll then open our outbound channel. I’ll add 0.2dcr to this channel. This will take 3 Blockchain confirmations to be fully active. During this time, you can’t open another channel.
- Next we’ll open our inbound channel. I’ll add 0.5dcr to this channel. Once again, this will take 3 Blockchain confirmation to become active.
- The final step, once all new channels are fully open, is to do channel back up. Failing to do this each time you open new channels could result in lose of funds.
As you can see, this process is relatively simple but does take a little time to complete. It’s also worth saying, at this point, that this process is likely to become even more efficient as the development of Bison Relay continues.
Comments ()