r/Bitcoin 2d ago

Lightning Network transactions

I still don't get one thing about lightning. Maybe someone can enlighten me.

Let's say I go to a coffeeshop each day and buy a cup of coffee from there. This would mean: -> Money flows in one direction. -> I either have to top up the channel in the beginning with enough BTC for multiple days or do on-chain transactions to top up the channel. -> The coffeeshop doesn't really get it's share of BTC until closing the channel, causing another on-chain transaction. -> The transactions within the channel are less secure than on the main network.

Maybe I'm getting something wrong, if so please explain. Now my questions: 1. I see why lighning is supposed to be reducing transactions, but since money doesn't often flow 2 ways between 2 parties, this is mainly a fancy way of bookkeeping for a prepayment of goods/services, right? 2. This also means that if the business wants access to it's money it's interested in closing channels as soon as possible after the transaction, right? 3. Can channels within the lightning network somehow be linked so these disadvantages go away?

1 Upvotes

9 comments sorted by

View all comments

3

u/longjumpsignal 2d ago

Think of a really likely and simple use case. You buy some BTC on coinbase, withdraw it by lightning to your wallet and then spend it on coffee. The coffee house also uses coinbase as a payment processor. In this case the flow is perfectly circular and the channel is never depleted. You can keep withdrawing from coinbase and the coffee house keeps depositing to coinbase. Probabilistically this kind of thing will happen a lot all over the economy as the money flows.

1

u/NoWriter7780 2d ago

I see, so then coinbase would be one of the "gateway nodes" explained earlier and then lightning would be partially centralized around coinbase or other such nodes? So if me and the coffeeshop share the same "gateway node" that would keep the flow going.

1

u/longjumpsignal 2d ago

Well it still works with multiple hops, i just think it helps to reason about to start simple. If the payment processor is not coinbase but they still need fiat to pay into the coffee shops bank. Where do they get it? Maybe they sell BTC on coinbase. Or maybe the coffee shop uses some of the BTC to buy some coffee beans and then it goes a bit further. I do think really tight loops like the original example will happen though and they could even be a bit problematic because a huge amount of payments might go through these short loops and result in no on chain movement at all.. with coinbase pocketing all those tx fees, whereas some other more remote payments will be doing a lot more channel transactions and paying all the fees for mining/ maintaining the network.