Comment by MrRGnome on 03/01/2018 at 06:32 UTC*

5 upvotes, 1 direct replies (showing 1)

View submission: Lightning Network Megathread

I need to just take a second and talk about how cool lightning is.

It's an ACH system built by smart contracts structured in such a way as to be completely free of counter party risk. Any number of parties join in creating a channel via smart contract on the bitcoin blockchain.

The details of the opening smart contract are essentially: Lock up X funds from N parties and disburse them when a valid closing state is published by any of the parties. This is analogous to a traditional ACH relationship with another ACH or party.

This is where I think things get brilliant. Once these funds are locked up in a channel the participants can essentially trade signed transactions as cash. These signed transactions which are exchanged as promissory notes are called Hash Time Locked Contracts. They are Bitcoin blockchain publishable signed transactions which testify that a payment was made.

So the channel participants trade around these signed promises for payment until someone decides to close the payment channel. They post to the Bitcoin blockchain the end state of the channel and a 3 day contention period begins. In those 3 days any channel participant can deny that the channel was closed properly and *prove* it by publishing a transaction they were holding as cash off-chain. These promissory notes, when published, revoke the bitcoin from any potential thief and distribute it to the remaining channel participants as well as the rest of the bitcoin locked in the channel as per its final provable closing state.

Each channel is thus trustless (as these promissory notes in the form of HTLC remove any trust, the only person who can sign them is the person who controls the bitcoins). Channels can be chained together as quickly as these HTLC's can be transferred over the internet and held by their owners to be redeemed in the event of fraud. Each channel only ever knows about its common participants, making multi-channel transactions anonymous.

I love the world we're building on top of this network of trust. It's so much fun to learn about.

Replies

Comment by robotlasagna at 03/01/2018 at 12:27 UTC

-3 upvotes, 1 direct replies

it is absolutely cool and even *cooler* when you take a minute to think of all the clever ways malicious actors will attempt to exploit it. For instance what do you do when someone gets ahold of your previous contracts and broadcasts them to the chain to make it look like *you were the one attempting fraud* and then posting the most recent contract and taking your funds as a result. So we say "well we are just going to have to be responsible to not let anyone have access to our previous channel states". Except that we are already talking about trusting a 3rd party to hold those contracts and broadcast them as our proxy in the event we are offline. Also why having a 3rd party proxy that we have to trust part of this... The whole point of LN was that it was supposed to be *trustless*