Hacker News new | ask | show | jobs
by sanswork 3623 days ago
Question for you.

Say I want to pay Bob $0.001. That's too small for a bitcoin transaction since the fee is higher than that. So from what I understand I would "load" say $10 into the lightning network then create a transaction over the network to Bob for $0.001. Say tons of other people do this and now Bob is sitting on $10. How does he turn that into actual Bitcoin? Like get it out of the lightning network. Doesn't he have to close off all those thousands of channels?

1 comments

The fun part of the Lightning Network is that you're actually exchanging bitcoin transactions. You're just keeping a local cache and electing when to broadcast it. It's flipping the double-spend problem on its head (and using it as a feature) and securing it via time-bonded proofs using programmed Bitcoin scripts native to the blockchain itself.

At any time either party can close out the channel unilaterally by broadcasting the most recent state. The person that broadcasted it gets refunded after a delay (assuming the uncooperative case where the other party in the channel goes off the Antarctica or something -- in a cooperative case, both parties close out immediately with the current balance).

Leaving coins in LN is fully backed on-chain, of course, since these are real bitcoin transactions passed around. The added benefit is you can transact instantly in high volume, so coins in LN will probably have more use than coins off LN when it comes to payments.

Sorry I think you'll have to dumb it down for me.

Say Bob says I want my $10 to stick on OKCoin now. He broadcasts that he wants to close the channels for all those thousands of people now? Doesn't that mean the transactions go through on the actual network costing him ~$0.05 for each $0.01? Or am I understanding settlement completely wrong?

Let's say you're Alice. You have a channel open with Bob. Bob is connected to Carol (OKPay).

You update your channel to tell Bob, I will pay you conditional upon a proof that you paid Carol. Bob pays Carol and provides proof. If Bob didn't provide proof after an agreed timeframe, this gets cancelled. There can be an arbitrary number of people between you and Bob (7-degrees of Kevin Bacon, but probably don't go too high!).

This is done completely off-blockchain. At any time this can be moved on-blockchain, but since the blockchain will enforce the payment as part of its transaction scripting language, you both elect to do it off-blockchain. Think of this with the system intent/design where it represents an enforcible caching layer where invalid cache can be corrected on-blockchain.

You can do thousands, even millions of these transactions off-blockchain. Only the final balance is net-settled on the blockchain. So you finalize your balance between Alice and Bob if you want to close out the channel. Note that the channel between Bob and Carol could still be left open and everything still works fine!

Since it's scalable in a routed graph (think switches instead of hubs), you could potentially do millions to billions of transaactions which route value, much like routing packets on the internet.

Bitcoin works based on incentives. There is no reason to go off-chain if you're not getting paid. And OKPay is not an end-node in any system. What you "really" want is to be able to send all assets in the system integrating banks. So the supernodes will be banks, i.e. large liquidity providers with a legal framework. LN is technically interesting, but there is no plausible scenario to make it work IMO. And if, you'd be way better off with redesigning Bitcoin and getting rid of some major drawbacks there.
Miners can run LN nodes too and profit off it as can anyone with bitcoin. The point is avoid the need or having to rely on "supernodes." You have other altcoins going other routes trying to fit as many of these small transactions on the blockchain... Good luck verify all that or keeping that decentralized.
LN is a theory, not a production system. I much doubt it will reach full production stage ever. Bitcoin wasn't at all designed for anything remotely like it. My bet would be on a new system & coin.
Thanks for taking the time. I think I understand it now though I'll spend some more time having a read through the site when I have a bit more time.
Cheers! :D

If you have any questions, do send me an email. I'm working on making the explanation better so feedback is always appreciated.