Updated: May 23, 2023

Building a Lightning Network Node For Routing – Part 2

Ready to Get Started

Get started building with the Lightning Network Today.

Contents

Key Takeaways

Follow our Support Engineer, Nate, as he walks through building a Bitcoin Lightning Network Routing Node in Part 2 of his blog series. You won't want to miss this!

Hey everyone! Node update! We currently have 18 channels (some folks opened channels with the Voltage node over the last week), and 58,000,000 sats in local capacity. We have also claimed the Voltage node on 1ml, LightningNetwork+, and amboss.space so we can give updates to the community as necessary (I recommend everyone do this).

It’s time to open a few more channels and keep growing. For this, I will be using moneni and Balance of Satoshis.  If you missed the previous blog, click here. Also, for a quick refresher on Balance of Satoshis click here for the first part of a guide series on the Voltage docs page.

I will not be using LOOP immediately after initiating channel opens going forward. I will let the node run for a few days after the open and see if we can get any data. After that, I can run some circular rebalancing to see if we can balance that way. Only after I do those two things will I use LOOP for inbound going forward. The reason why LOOP should be a last resort at this point is due to it’s cost. It is extremely effective but a circular rebalance is much cheaper so it should be the first method.

Speaking of rebalancing I noticed something interesting in the Forwards menu in Thunderhub…check this out:

I think we may have some interesting rebalance opportunities. Let’s test out a rebalance on BOS and try to get some liquidity back into the start9 node by running a rebalance.  

$ bos rebalance –in <pubkey>

Results:

BOS has determined that our other channel “betheball” can rebalance up to 4,242,564 sats into the start9 channel. Let’s go back to Thunderhub and see if this rebalance is beneficial for both channels. Ignore the max fee for now.

If we rebalance 4,240,000 sats from betheball to the start9 node, then both channels would balance out nicely! Let’s run the rebalance again to confirm the fee of the rebalance. We also want to define the out pubkey in the next command so that BOS doesn’t pick something different:

$ bos rebalance –in <pubkey> –out <pubkey> –max-fee 2800

Results:

We paid 2766 sats (about $1.50 as of 10/9/2021) for a rebalance of $2354. I generally think this is a pretty solid deal, and the fact that we know that the Start9 channel we have has high demand, we can now increase our forwarding fee rate to make that fee we paid back plus maybe a litlte extra! Let’s calculate.

What % of 4,248,719 is 2766? Answer: About 0.065% or 650ppm. So, to make our rebalance fee back, we need to set fee rate to 650ppm. Let’s set to 700 just to squeak out a profit.

Looks good. I like to give it a couple weeks to see if the funds still flow the way we expect after changing a fee rate.

I will be opening up some more channels using my previous method outlined in part 1, and maybe look for some more high value rebalance opportunities. I hope this gives you an idea of how to utilize rebalances in an efficient way. The hard part is pretty much over now and all we have to do is come back and analyze the movement of our liquidity maybe once a week or so. When the node has reached a very healthy level full of activity, we can start to optimize our fee rates.

I hope you are enjoying this blog series so far and I look forward to releasing the next one soon! Until then, keep learning and have fun.


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. ⚡️

Subscribe To Our Newsletter