logoalt Hacker News

HWR_14today at 3:10 AM2 repliesview on HN

I'm still thrown. I don't see how an after the fact penalty can work.

Let's say I have 1 BTC. I buy something for 1 BTC on lightning network A. Simultaneously (within nanoseconds) I buy something for 1 BTC on lightning network B. I never plan to use BTC again (or if I do, I will use a different wallet, etc.) Do I just get two purchases? Is there a meta-network clearing house, and if so, why are there many disjoint networks.

Or do I need to have moved my BTC into the lightning network A or B before I spend it?


Replies

jenadinetoday at 5:13 AM

On the main chain, bitcoin transactions can have "scripts" that describes who and under what condition this money can be spent.

You have to lock your bitcoin on the main chain in a script that shares the bitcoin between you, and another lightning network user (typically a hub)

The trick is that a lightning transaction happen by signing transactions to the other party that changes the way the bitcoins are split, without broadcasting it to the main chain. You only broadcast to the main chain when you want to unlock the bitcoin. Broadcasting an earlier transaction will result of you losing the found because subsequent transaction contains secrets that allow the other party to take them.

ProllyInfamoustoday at 4:22 AM

Once you've allocated BTC, you cannot doublespend it elsewhere (well, you can try, but verification nodes will reject it so the blockchain will never accept).