Lightning Network - Week 1 Update
Learn something new about running a LN node from my direct experience week-1
Okay freaks, its been almost a week since I got my LN node running, 4 days since I got the channels started and 2 days since I started routing payments. Learnt a few things along the way which can be helpful to beginners just starting out, like myself. So.. you got it, A thread.
1/n] Treat running a LN node for payments routing as a proper business. Get an alias to build a brand around it. Jot down your capital cost upfront, this would mostly be your node hardware cost plus marginal internet/electricity cost if at all.
2/n] Start thinking about your operational cost next of running the business. These include - on-chain fees to transfer bitcoin to your node wallet, on-chain fees to open channels, rebalancing fees, loop out fees, on-chain fees to close channels.
3/n] Your job as being a business owner is to successfully minimize your operational cost and become profitable over time. There's not much you can tweak with regards to incurring on-chain fees for fund transfers or open/close channels. Look at
4/n] Mempool can give you an idea about fee stats and how much it'll cost you for a particular on-chain interaction. Ideally you want to do these when fees are low like 1-5 sat/byte, right now is a great time. 1 sat/byte can easily get you through within an hour.
5/n] Now, the interesting challenge is rebalance/loop-out actions - how to? when to? with & who?. This is a learning process and requires some amount of analytical thinking, gets easier the more time you spend on it. Here are few things i've picked up over the last few days
6/n] You'll need to look at traffic flow paths for the first 20-50 forwards that go through your channels. See the in & out channel paths. Most likely what you'll realize is that in the beginning atleast, few channels will do most of the routing through your node.
7/n] This means, you'll drain sats from 1-2 channels constantly or you'll fill up one with sats on 1-2 channels. For me, I had 3 paths out and only 1 path in for the first 20 forwards through my node. I drained almost 1mil sats from these channels into the one 'in' channel.
8/n] My fees were still set to the same base fee & fee rate for all channels, so it should be nothing to do with that for this traffic flow. It should just be how you're connected on the network in the beginning. Now, once this happens. What do you do?
9/n] I figured i should rebalance and send sats back to 1-2 of my 'out' channels from the 1 'in' channel that now that too many sats on it. I looked at the fees this would cost me, one of the channels had really high fees at the time, so i avoided that one.
10/n] I instead sent most of my sats into the other channel back. I incurred a rebalance fees for this operation. I used thunderhub to rebalance, it worked after 2-3 attempts. This is one example of analyzing traffic flows in your early days as a LN node operator.
11/n] What are some other options to naturally rebalance channels over time? Fee structure. Yes, if you play around with your fees, you can divert paths the routing takes through your node. For example, you can raise the fees on channels that you're draining a lot out of.
12/n] While slightly lowering the fee on the other channels you want funds to route through. This fee differential should overtime play itself out and rebalance your channels. But when you're starting out, you won't get flow through most of your channels.
13/n] So i think this is a long term strategy once you have decent flow going through your node and you have well established channel paths all along. But you get the feel now right? Traffic flow patterns is key to proper node management and being a successful node operator.
14/n] Now, two more variables to discuss for this business we just started. a) Which peer to connect with or open channels with? b) How much channel capacity or size (girth)? What's more important? Peers or girth? I'm fairly new to this but i think peer is more important.
15/n] Treat 'girth' or channel size as like a minimum requirement or threshold to reach for you to be in the list of possible routes to be selected for a particular payment. Atleast that's how i see it for now, may change later. So if you have a reasonable capacity, you'll be ok.
16/n] What's reasonable girth then? As far as i'm seeing out there, 2M sat number is being constantly touted. I've opened channels with as low as 1M sats to start off with. I've seen payment flow through couple channels with 1M sats on it. So let's put a range to it. 1-2M sats.
17/n] Okay, so girth is okay for now. How about peers then? This seems to be key. Think about it this way - why should you lock up sats with a peer if you won't see flow through them? What's the point? So, you want to connect with well connected peers and build a network.
18/n] But, so are the other peers too. They want to connect with well connected peers too. But you're just starting out, so who do you connect with then? I went with top 10 nodes on terminal web. There are some big nodes on this list which can get us going
19/n] So, my first step was to get some well connected peers. I locked up 5M sats with 4 big nodes in the top-10 on terminal web. I looped out 1/2 of my sats to the other side of these nodes so as to be able to receive sats through them as well, atleast in the beginning.
20/n] Now, i got both 'out' and 'in' covered for my node with well connected peers. Did i need to rebalance? Probably not, but i did for two reasons - i had no inbound liquidity to start off with & i wanted to test everything out on the platform.
21/n] Now, i had a good start going. What's next? I want to connect with more peers and naturally get inbound from their side. How to do this? One way is to connect with friends/plebs/freaks you already know and open channels together so you can both have liquidity on your side.
22/n] Another option is
https://lightningnetwork.plus
: You can either join or create swaps yourself. The way swaps work is let's say you do a triangle swap, so node A/B/C, this means A opens to B, B to C and C back to A. So let's say i did a 1M swap. What do i get with this?
23/n] I get two things. I get an 'out' channel with node B with 1M sats and i get an 'in' channel with node C with 1M sats. And i increase my channel count by 2. And increased my node capacity by 2M. Remember, node capacity is summation of both 'out' and 'in' side of liquidity.
24/n] That's actually a pretty sweet deal. Double whammy. What did it cost me? Just the on-chain fees incurred while opening a channel with node-B. Again, we get 48hrs to open a channel with node-B as part of the swap, and presently you can easily find an hr on mempool with 1s/b
25/n] Okay, so now we've got some tools in our arsenal to run this newly created business of ours. Let's recap what they are - open channels with big nodes, run swaps, rebalance, loop outs. As any business, there are a lot of moving parts to running this one as well.
26/n] But you;re starting to get a feel for it. In the beginning selection of peers is key and selection of appropriate girth is required. But over long term, where our major focus would lie is how to properly study & analyze traffic patterns and rebalance to feed it.
27/n] My take is that over long term, open/close channels would become a one off activity for us. Majority of our time spent would be on traffic and getting the right flow through our node. One more variable in this regards is the right fee selection.
28/n] So what fees should we charge for the business? At the end of the day, that's our only revenue generating stream for now and our only mode of profit. This is still a study for me and i don't have a good answer. I'm sure there's nuance to this which i don't get right now.
29/n] So what do i do for now? I've set my base to 1sat and have been playing around with the fee rate. Ballpark? 100-300ppm for now is what i've been sticking to. The first payment i routed was at fee rate of 150ppm. And i drained the channel out fairly quickly to give an idea.
30/n] So, i raised the fee for this channel to 300ppm and lowered the other ones to 150ppm. Did it naturally divert traffic to other ones? Not really. The next payment route i got was from another freshly opened channel with fee rate 250ppm. So i think its early days for my node.
31/n] I plan to observe traffic flow over the next few days to a week for my node as is with minimal intervention unless i get serious traffic flow that drains one or some of my channels out. I'll rebalance then to feed the traffic again.
32/n] If i don't get traffic over the next few days? I'll start tweaking around things a bit more again and play around variables i pointed to earlier to see if it helps. It's a learning process as i said and like any business, the early days are not easy and look bleak.
33/n] Would i become profitable and make money doing this? I honestly dont know. But one thing i do know and believe in, is that LN is the payment rails for the whole world in 10 yrs. Well freaks, thats a ton of growth left.
34/n] Bitcoin won't be at 50k in 2030, it'll probably be in millions. Well guess what, that 1M sat channel you just opened, is now worth $10k and has a great routing capacity. So the required girth naturally goes down over time as bitcoin goes up. Get it?
35/n] If you feel you don't have enough girth or channels to route any traffics, I feel you. I felt the same. My advice is to not give up. Stick to it, think 10 yrs not 10 days. Set yourself up to be part of the game then, anything you do now will 100% help. Earlier the better.
36/n] One analogy i have in mind regarding this is how bitcoin mining evolved? One could mine bitcoin on a PC back in the early days successfully, now its no longer possible and is run by big institutions with access to capital markets. Who got in early, got to share a part of it
37/n] There's a slight caveat though, anyone can run their own node. And after a certain point, i don't expect the power to route payments will be dependent on your girth anymore. To route a 1000$ payment invoice, 1M sats today may just be okay. That's the power of getting in now
38/n] I'll end this with what i always say and took from Odell. If not now, then when? If not you, then who? Let's get it freaks. Like always, it took me some time to write this, if you appreciate it, do give me a follow. Cheers.