LN transactions do not converge within a block and get settled blockchain. No record of them ever reaches the blockchain.
The only LN use of the blockchain is channel maintenance transactions, people opening and closing LN channels as you said.
Imagine that you and I make an agreement to trade between each other, and track our trades in a private ledger. We create an entry in a global public ledger, devoting funds to our private ledger transactions. When were done and we want to settle accounts, we record our respective final balances from our private ledger in the global public ledger. All else in the private ledger stays there, nowhere else.
Of course here, our private ledger is magical. It provides each of us a unilateral recourse to force the current balances into the global ledger, in case of cheating; so there is no counterparty risk.
Right, so the only on-chain activity that happens with LN is in the opening of a channel?
So I create a channel with 1 BTC, and now I can send instant cheap transactions out of that 1 BTC to any other open LN channel and none of that is ever recorded anywhere but it's still non gameable?
Close. You can send and receive with a party with whom youve established a channel. Well, what if youre connected to Alice, and you want to send money to Bob? If Alice has a channel open with Bob, then you can have Alice route your payment for a small feeessentially letting Alice be a mini-Visa network for you. These routes can be extended with multiple hops, potentially (but not necessarily) passing through large hubs; did you ever play six degrees style games? Developers with a focus on privacy have also been working on onion-routing Lightning transactions; think of a Tor which routes money, instead of routing stream sockets.
(PSA: This message is posted through Tor.)Conceptually, roughly, the reason why the system cant be gamed is that you send Lightning payments by providing your counterparty with sufficient information to slam the channel closed with the updated balance, and claim all their money on-chain. Cheaters cant do much mischief, in those conditions. Thats a sketch of the systems general shape. The
Lightning whitepaper (PDF) provides a good technical overview of how it really works under the hood.
In any case, have simulation models of lightning network been performed to somehow predict what fees will be like once people all over the world are opening channels? like at what rate will people be opening channels? (from what I understand, closing a channel is irrelevant, on-chain transactions only happen when opening)
Let's say people load up $1000 bucks a month worth of BTC in a channel for the month to spend from... how do we know this will be viable and for how long?
On-chain transactions also happen when closing the channel; thats how final balances are settled on-chain.
You ask an excellent question about simulations. I would appreciate more information about that, myself.
A related question is of how many global users Lightning could handle, and what tps it could reach, with the current capacity of the blockchain. Back of the envelope, if on average a channel handles
x LN transactions, and an on-chain block can hold
y transactions, then the
upper bound of Lightning capacity (ignoring other Bitcoin use) is about x*y/2 transactions per average 10-minute Bitcoin block. I recently came across a neat little chart giving some numbers here; sorry, I cant seem to find it at the moment. The numbers looked fairly impressive, even given my desire to see orders-of-magnitude scaling of the Bitcoin ecosystems transactional capacity.
In that regard, I look at Lightning as a huge force multiplier for any further incremental on-chain scaling improvements. Of course, I also hope that Lightning itself will see further scaling improvements as it matures. If it gives
big, then Ill want
biggerwell, one step at a time!
What about spamming the LN? as in attackers opening and closing channels just like they do now to spam the network with regular spam.
Well, spurious opening and closing of channels would simply be a matter of spamming the blockchain with spurious transactions. We have that problem already. I dont immediately see how Lightning itself could be problematically spammed, given that its relatively low
and symmetric in resource use (spam needs highly asymmetric costs), and channel participation is by voluntary mutual agreement; but I do not yet have sufficient Lightning expertise to say authoritatively that it couldnt happen somehow. Another interesting question I shall need to think about. Any takers here?