Hacker News new | past | comments | ask | show | jobs | submit login

High level answer: Lightning transactions happen off network and only "sync up" once in a while. In a lightning transaction, only the two individuals transacting know that it has happened. But in an on-chain transaction, that info is public.



What prevents someone from making the transaction on the lightning network, as well as the btc blockchain before the lightning network syncs up?


To open a LN channel, both parties puts their funds in an address that can only be spent if both parties agree (both have to sign)

But the way this swap happen trustlessly between onchain and LN channel funds it's complicated, I don't have it clear right now

If you want to get an idea how later the balances updates happen trustlessly see my other comment https://news.ycombinator.com/item?id=27451184


Other person node who would lose money if this happend can publish the original transaction that is construscted in a way that the attacker would lose all his funds.

So attacker could potentially do this but if they get caught they get punished for losing everything and they get caught if the other side node is online when this happens. There are also watchtowers that can monitor the network for hacks like this


The coins are essentially allocated to being on the lightning network, and cannot be used on the blockchain until the two are synced up.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: