Blog
Building a Lightning Network Node For Routing - Part 3

Building a Lightning Network Node For Routing - Part 3

Nate G
Nate G

January 26, 2022

It's been 3 months since Part 2! I hope everyone is doing well. When we last left off, we had a good number of channels, and liquidity. Generally, you don't have to wait so long, but the longer you wait the more data you will have for channel management. I want to remind everyone that our goal for this node is primarily ranking, not profitability for now. With that said I am looking to spend as little sats as possible to make that happen to preserve capital. Let's jump in.

First thing we want to do is have a look at our channels. As usual, Thunderhub is our go-to method for this. As we can see, our general node liquidity balance is really heavy on the remote side.

It's important to remember that there is usually very little benefit, if any, from closing channels that are heavy on the remote side. Even if the channel does not flow funds often, it is likely worth keeping the channel open. This is especially true if the peer has high uptime and has lots of other channels that you have determined through an explorer such as amboss.space, meets your criteria for a good peer (channel size, fees, etc.). The question then becomes...how do I get funds flowing in this particular channel? We can make some educated guesses, but we need to gather some data first. Let's go through an example.

In the example above, we are looking at a relatively large 12,000,000 sat channel that is heavy to the remote side, and the peer has a low fee set. Funds should be flowing, but they're not as much, or they recently drained. We also can see that the channel age is approximately two months. Let's sort our liquidity movement chart (seen on the thunderhub home screen) by two months and see if we can see this node.

Okay it looks like there are two of our channels funneling funds away from the Diesel node. At this point you have two options. The first is you can try to run a rebalance from the two nodes highlighted above back into the Diesel channel, and then increase the fees on the Diesel channel to compensate. Or you can open new channels in hopes of jumpstarting funds flow in the other direction.  

Since our node is heavy on the remote side, I am going to open some more channels to increase local liquidity of the node. Now that our node is more mature, we will be looking to open channels that have the highest probability (no guarantees) of generating this result.

When we go to amboss.space we can see the channels that our peers have. For example, I have sorted Diesel's channels by capacity on amboss to try to find a peer that may have more interaction with Diesel.

Here are a few results:

Looks like Diesel has big channels with some already big nodes. This is good. At this point in my general audit workflow, I would go to moneni.com to see what nodes we can open to that will give us the best reach to the rest of the network. Unfortunately, it seems like moneni has been shut down. We can use a new tool called lnrouter to get an idea of which one of these potential peers will increase our reach in the network, as an added bonus to hopefully increasing throughput through the channel itself.  

At this time, the PRO plan on LNrouter is about 16,800sats/month and will give you a lot of data to help you improve node centrality. For this blog series we will be sticking to free services. I encourage everyone to check them out and maybe use their free trial to see if the data they provide will help you.  

With the information that we have, we are going to go ahead and open a 10,000,000 sat channel to Prince. You can repeat this process with similar channels as much as you would like to try to jumpstart any inactive channels, or open channels to the wider network in attempt to find synergy and make the node more active.

For channels that are heavy on the local liquidity side that seem to not be routing, you can try to lower the fees on that channel. If that doesn't work, you may consider closing that channel to recoup your capital and open up a new channel to a new peer that may have better synergy.

Another way to get liquidity moving again on a heavy remote-side channel is to do a circular rebalance. We went into how to do this generally in Part 2. The primary motivation for a circular rebalances is not to make your channels look "balanced and pretty." The purpose is to find a way to get funds into the local side of a channel in order to harvest fees as it drains. As mentioned in part 2, make sure you set your post-rebalance fee rate in a way that compensates for the cost of the rebalance. Otherwise, you will likely be at a loss.

As you can probably guess, it takes time to audit all of your channels and attempt to capitalize on synergies. However, if you sit down once every couple of weeks and do it, you will be rewarded for your efforts and your node will climb the ranks. Thanks for reading and stay tuned for part 4!


If you have any questions or comments either email us at support@voltage.cloud, use our live on-site chat, or join us in Discord. ⚡️

Share this post

Start Building on Bitcoin Now