Now you're getting it! Yes that would be a terrible network design. Fortunately you can route payments through other node's channels. You pay them a tiny fee per transaction and you can collect fees when others route through your channels.

Reply to this note

Please Login to reply.

Discussion

Some nodes specialize in routing others' payments. They have to pay very careful attention to how many payments are flowing through which channels. They have to balance fee rates and try to gauge which nodes are reputable and well connected. It's basically a whole job unto itself. For the purpose of sending zaps you can just open a channel to a routing node and not worry too much about fees. One channel should be all you need.

I found the Routing section in the docs, and I think I get it now. The reason most of the smaller blog posts I had read had recommended opening a channel was mainly so that there was "a way" to be found by others by routing through other channels. However, in theory, I could also make a direct peer-to-peer channel to another person directly, given their node's IP:Port combo and lightning invoice. However, that would actually be inefficient if I did that for multiple people as I would start spewing a lot of channels in the form of a BTC transaction on the chain and causing a huge amount of processing. So by using one, or maybe a few more, channels, I can improve routing to and from me, and also keep my traffic and usage under control.

I think I get it now. This also means that should someone end up using my channel, I can collect fees for the routing too. Neat, passive income. :)

It's nearly 5am, im actually impressed i am still able to grasp all that. XD

Noice! I love to read about you digging in to understand this tech. 😁

Two comments:

1. There is a distinction between public (announced) channels and private (unannounced) channels. (They were poorly named, neither type of channel is private.) Routing nodes use announced channels so that others can route payments over them. Non-routing nodes typically don't announce their channels over the peer-to-peer network because they are not interested in the routing fees or in the headaches this causes (rebalancing channels, liveness requirements, etc.). In order to receive a payment over an unannounced channel you need to include a 'routing hint' in the invoices you create (this is why it's not private). Your node software will handle this for you, but its good to be aware of how it works. This is the cause of a lot of routing errors.

2. Invoices have an expiration. So even if you wanted to open a channel to pay a single invoice it would most likely take too long to get confirmed on chain. This is true for BOLT11 invoices, which are the original, most basic, kind of invoice that every lightning wallet and node understands. There is a new spec for BOLT12 invoices that don't time out that is slowly gaining adoption, so look out for those in the future they are super cool.

This is the best starting place to go deep. https://github.com/lnbook/lnbook

TIL this book is free online. 🤯

Foss is the way :)

And its companion book for on-chain bitcoin. Both are freely available online. You don't have to read them in any particular order. https://github.com/bitcoinbook/bitcoinbook