logoalt Hacker News

jenadinetoday at 5:13 AM0 repliesview on HN

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.