This is a journal of my experiences with Lightning that will be useful to anyone new to Bitcoin or Lightning. As a disclaimer, there are a lot more ways to do things than I’ve shown here. There are a number of products and solutions to get you started, some more complicated than others. While there are certain standards and best practices for using Bitcoin and Lightning, the only way to get better is to get into where you are comfortable and learn a lot in the process.
Before you dive in, it is good to understand the difference between Bitcoin Layer 1 and Lightning i.e. why Lightning exists, its own tradeoffs, and special considerations. This post relates specifically to the operation of Lightning channels. Effective channel management can be its own rabbit hole, but before we can understand it, let’s define a few key concepts.
- Read and contribute to the PlebNet resources and discussions.
- Being a Node Operator comes with an upfront investment but pays off in terms of knowledge and experience. Think long term.
- When it comes to routing, focus on peer selection, uptime, and liquidity management.
Note that you don’t have to be a large routing node to take advantage of Lightning. Merchants can accept Lightning payments for their business, and as an end user, you can make Lightning Fast Payments on your own terms, and that in itself is reason enough to run a node.
I use a Raspberry Pi together with one of the well-known node starter packages. One thing I didn’t know before joining PlebNet was the importance of having an uninterruptible power supply or battery backup – and this is a must to avoid outages.
My main Lightning tools so far have been ThunderHub and Balance of Satoshis (BOS). I was a complete newbie to Linux too, and if you’re prone to it, I recommend learning the basics of the Linux command line as it really helps to understand what’s going on under the hood when you click around on a fancy UI.
My first channel was a small one with a capacity of 150,000 sats as I had to get into the network graph first and this helped me open a channel and watch the funds move. My first Lightning payment felt like magic.
I opened up larger channels and made sure to select colleagues I trusted – trust in the sense that I took the time to qualify their reputation in the community. My colleagues have a track record of being honest bitcoiners and skilled node runners. Yes, Lightning is designed to minimize trust, so you should be able to connect with strangers. However, I want to reduce the likelihood of costly scenarios and downtime due to poor node management by unchecked colleagues.
A routing node needs both inbound and outbound liquidity. One way of detecting incoming data traffic is to carry out a so-called loop-out. In the beginning I looped through channels individually to balance out the liquidity. I did this at my own expense so as not to bother my distributor.
Later, after reading the Voltage series on Routing Nodes on blog.voltage.cloud, I found out that a better way to get started is to open as many outbound channels as possible and loop out multiple channels at the same time. Lightning Terminal does all of this for you. I looped several million sats at once, and I have to say, that got my heart beating for a moment. In general, I try to move coins in smaller amounts so that not all of your funds are tied up at the same time.
I also used my own strike wallet to do loop outs, but since the sats arrive as dollars in the strike app, I’ve suffered conversion fees by converting back to bitcoin. In both cases, the cost of the loop-out is still remarkably low – around 20-30 basis points.
Note that I chose to exhaust channel funds in order to create a balanced liquidity profile of the node. There is a cost to this service so I plan to run free liquidity swaps in the future and easily add or remove channels as needed. Looping-out is useful in the beginning to boot liquidity, but otherwise not necessary for every channel. In addition, you can only ever buy inbound channels and bypass the technical details.
I had nine or ten channels open when I saw my first forward gear go through and I loved it. I’ve set my fees relatively low, but enough to potentially amortize the channel costs if all funds are forwarded at once (see c-otto.de for a more detailed discussion of fees). While my goal is to get to a low maintenance organic flow node, I have certainly noticed that the storms were mostly unidirectional through a small number of routes. This is where rebalancing and fee adjustments are important.
In the first 30 days, the node had 26 forwarding events averaging 144 ppm, which was 60% of the node’s local liquidity. The win was only 1,300 sats – not very much, but hey, it’s still satisfactory.
At the high level, the cost includes chain fees, routing fees, and Lightning-related service fees, not to mention hardware costs. The cost of chain fees includes not only opening / closing the channel, but also deposits and withdrawals on the Lightning wallet. Most of the routing fees paid come from performing the loop-outs, and the routing fees may increase the more sats you have to move. I also made two payments to a couple of friends on my node that incurred routing charges. I made a spreadsheet to keep track of the expenses in each category. This helps in reconciling the balances that the node is displaying on the screen. Records show that I paid roughly 29,000 sats out of pocket after all channels were opened and rerun. Specifically, BOS tells me that I’ve spent around 4,000 sats in chain fees and over 25,000 in routing fees.
It’s hard to be specific because I had to try to explain the sats eaten up by the exchange fees. Initially, there was also some confusion about commitment fees and channel reserves, which are funds that are yours but not reflected in the available channel funds. It is important that you get used to doing the bookkeeping in Bitcoin terms, although the accuracy of accuracy is a personal choice.
In comparison, I’ve paid a lot more sats to get my channels up and running than I’ve earned in routing fees. Note, however, that the bootstrap liquidity cost should be one-time. Additionally, funds can move back and forth endlessly in a channel, allowing a channel to conduct many multiples of its capacity over the life of the channel. I would say 25,000 sats were worth the investment in education.
My goal for next month is to increase node capacity by 20% and generate positive net income. With a view to the future, these are other interesting areas:
- Explore the stacks of opening channels and channel finance from cold stores.
- How could using multiple Lightning Network wallets or nodes make liquidity management easier?
- Experiment with automated channel management tools.
- Improve security, reliability and availability.
If you need help, don’t hesitate to ask questions; the plebs and I are happy to help!
This is a guest post by Tyler Parks. The opinions expressed are solely their own and do not necessarily reflect those of BTC Inc or Bitcoin Magazine.