Lightning network rumblings

Bitcoin (p2p payment) network is slow and has high fees. Lightning network (LN) supposedly fixes both issues. LN is a bit complicated but remember that it has lower fees and it is faster to complete transaction. I am no pro in LN or explaining it, so what i am trying to do here is to write it all out in simple steps. Here is one definition of LN “Lightning is a decentralized network using smart contract functionality in the blockchain to enable instant payments across a network of participants”. The main driver of LN are payment channel(s). Those channels are of-(block)chain bi-directional channels which allow peers to transact of-chain.

Here is a general simplified operation of LN:

  1. Peers open a channel which is broadcasted to blockchain. This is accomplished by an “opening transaction” on the main blockchain.
  2. Once channel is open, peers can transact of-chain any number of times without impacting main chain.
  3. When peers are done exchanging funds, a channel is closed which is done via “closing transaction” on the main blockchain.

The juice of LN is in the “opening” and “closing” transaction. Here how it works in a nutshell:

  1. Peers agree on value of their future transactions.
  2. Peers send (incomplete transaction, requires both signatures to be valid) some amount of BTC to a multi-signature bitcoin address (like a safe-box) with some time constrain. If nothing happens before time expires, all peers get their money back. This is a setup (“opening transaction”). Note that during a time constrain, any counter party can bail since they will only need their own signature to get funds.
  3. Issue new incomplete transactions with different balances (smart contracts) AND time constrain that is lower than original (newer), people can adjust their balances (i.e payments) and this is done of-chain.
  4. When time expires, the newest contract from #3 will be verified and funds will go to peers (“closing transaction”).

In any case this is a poor’s man attempt on explaining LN.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s