0 sats \ 6 replies \ @go OP 6 Aug 2022 \ parent \ on: Lightning network uses mSats - is that an altcoin? bitcoin
So mSats are an alt coin within a smart contract? I mean, they don't have a UTXO attached to them so they're not actually Sats, right?
No. Lightning is moving around real bitcoin but leaving it unsettled on the blockchain but settling payments between a network of special joint escrow wallets.
When you set up lightning channels, its like setting up a bunch of trust accounts between people you want to transact with.
Lightning channel
Lets say you can have a two-person joint checking account where you (Alice) can write as many checks as you want against it, but you can only write the checks to the other person that is authorized to draw on the account (to Bob's private account). Bob also can write checks, but only to Alice's private account. Alice put $1000 into this joint account. Bob put $750 into this joint account.
When the account is set up, Alice writes a check to Bob for $750 to Bob's separate private account. Bob writes a $1000 check to Alice's separate private account. Both Alice and Bob send these checks to the bank, but the bank doesn't process them.
The lightning network of nodes
The bank is in charge of holding any check written against the account, but it can't process the checks until the account is closed.
Lightning transactions
So when Alice wants to pay Bob $800, she writes a check (UXTO) to Bob's private account and gives it to the bank for safekeeping. Bob can see her side of the balance is sufficient, so he updates his side of the account to $1550 and Alice's side to $200.
Later, Bob wants to pay $1000 to Alice, so he writes a check for $1000 and gives it to the bank for safekeeping. Alice updates her balance to $1200 and Bob's to $550.
Bob caught Alice's husband with his wife and he doesn't want to do business with Alice anymore, so he calls the bank and tells them to close the account.
Channel closing
The bank now has 2 checks from Alice to Bob for $750 and $800, and 2 from Bob to Alice for $1000 and $1000. The bank sums up all the checks and finds that Alice has ($1000-800+1000) $1200 coming and Bob has ($750+800-1000) $550 coming. The bank deposits these two sums into Alice and Bob's private accounts and the joint account is now empty.
reply
Ha, freaking Bob and Alice. You definitely made me laugh out loud there. Thanks for the lengthy and thoughtful explanation!
That's between two channel operators. For those who use Bob's hosted lighting wallet, though, I'm just 100% trusting Bob? What do I hold in my Bob Wallet until the channel is closed? They're not sats that I can use onchain, right?
reply
Everything will make more sense if you read Mastering the Lightning Network. You can read it for free on GitHub. https://github.com/lnbook/lnbook
reply
When you use a hosted wallet run by Bob, Bob is being your "Uncle Jim" and yes, you're trusting him completely with anything that's in that wallet. There are many variants of hosted wallets, but with the classical lndhub style everything is under Bob's control.
Bob is keeping a separate ledger of balances in the wallets he is hosting, and hopefully these add up less than or equal to his actual lightning node balance. Transfers between wallets hosted by Bob arent happening on the lightning network, they are just ledger adjustments between wallets. If one of the hosted wallets sends or receives over the lightning network, well then bob hopefully has enough channel funds and routing to allow it.
You cant use any sats onchain as long as they're tied up in a channel in either self hosted or uncle jim hosted cases. In the case of the uncle Jim hosted wallet, no you cant manage channels and put lightning funds back into your onchain wallet. If you want to do that, you either need to loop them out using a loop service, or you sell your lightning sats for onchain sats with someone that will do that for you (for a fee).
reply
Well described, I can understand that. Thank you @Brunswick
Is there a separate name or description for Sats traveling in the lightningsphere which don’t yet have their own UTXO yet?
reply
They are all bitcoin, so theres no reason to differentiate
reply