Bitcoin’s Lightning Network Payment Channel Explained !!
If you are into Bitcoin space and haven’t been living under the rock, you must have heard about Bitcoin’s Lightning Network.
Lightning is, of course, the technology that promises to scale Bitcoin, but have you ever thought what makes lightning possible?
Another underlying technology or concept called Payment Channels makes lightning possible. You can even define lightning as a network of different payment channels connecting to various users of lightning.
So that’s why in today’s article we thought of deep diving into payment channels and its types to be able to appreciate more the underlying working of Bitcoin’s second layer i.e. lightning.
Let’s get to business:
Bitcoin Payment Channels [Definition]
Payment channel is a medium between two or more parties that allows them to transact bitcoins amongst them a number of times without sending all these transactions to the base layer, i.e., Bitcoin’s blockchain.
A payment channel essentially is a 2-of-2 multisig wallet where parties interested in transacting with each other commit funds and this is called funding transaction that happens on-chain.
Once this on-chain transaction is complete, many transactions can happen between the two parties involved in the payment channel. But the transactions can only happen when both the parties sign thus updating the state of the channel (or you can say an offline shared ledger between them)
Thus many signed but broadcasted transactions can be exchanged between the parties involved in the payment channel.
In simple terms, you can think of a payment channel as duct or pipe which is open from both the ends and there are two individuals on each side with 10 pearls with them.
So through this duct or pipe, these guys can send the pearls to each other number of times and when they don’t want to transact they can simply close the duct or pipe.
This is the closest example I can think, as of now.
Now, let’ see how a payment channel work.
Let’s assume we have two lightning participants Alice & Bob who often need to transact with each other.
- Alice & Bob opens up a payment channel by transferring $10 worth of bitcoins to the payment channel. These transactions are happening on-chain, and blockchain only sees a $20 ledger entry.
- Now, Alice is transferring 1$ every day to Bob for some service, and this continues until 5 days. These transactions are off-chain and are just ledger entries with signatures of both the parties.
- After 5 days their ledger entry looks like this, Alice’s balance is $5, and Bob’s balance is $15. Now they have decided to close the channel and thus broadcast the latest state of the channel to the blockchain.
- The blockchain now gets the status in the form of latest ledger entry in the channel, and it transfers $5 to Alice and $15 to Bob.
In this case, the underlying blockchain acts as a fair jury by looking at the latest ledger entry that was already signed and agreed between the two parties.
Note: These are also called as off chain micropayment channels.
But let me tell you, this a straightforward kind of payment channel and has some drawbacks. That’s why we mainly have 3 different types of payment channels.
types of payment channels [names]
#1. Poon-Dryja Payment Channels
Poon-Dryja channels are also known as L2 penalty channels, proposed the first time by authors named Poon & Dryja with the lightning network’s paper.
These channels are bi-directional channels where funds can flow from one direction to another and vice-versa is too possible. These channels also apply a penalty on the malicious actor who tries to close the channel by broadcasting the old state in which he/she is benefitting.
Lastly, these channels can be closed unilaterally or bilaterally.
#2. Decker-Wattenhofer duplex payment channels
Another formulation of bidirectional payment channels is Decker-Wattenhofer duplex payment channels which have some more capabilities then Poon-Dryja channels.
It is developed by Roger Wattenhofer and Christian Decker in 2015.
#3. Decker-Russell-Osuntokun eltoo Channels
Eltoo channels were presented in a paper by Christian Decker, Rusty Russell, and Olauluwa Osuntokun on April 30, 2018.
These channels significantly improve upon Poon-Dryja channels by removing the penalty mechanism. This makes the implementation of lightning network watchtowers efficient and reduces its complexity by removing punishment transactions resulting from broadcasting the old state by human error or a software bug.
From a user experience point of view by using this channel only transaction fees will be lost, if someone tries to broadcast the old state which is much better than user losing the whole funds in Poon-Dryja channels.
Usecases Of off-chain micropayment channels
- Payment channels can be used wherever we transact frequently either with a merchant or between two individuals or two companies etc.
- Payment channels could also be used wherever metering is done, like for parking lots or calculating the consultation cost while meeting a lawyer or doctor etc.
- Payment channels also make micropayments possible which can be used for tipping.
- Payment channels can essentially stream money/bitcoins like you transfer data from one node to another. This opens a new possible scenario of pay as you stream.
Conclusion
So these are some popular types of payment channels but as I have shared before, Lightning is a network of networks where multiple different types of payment channels will exist.
So depending upon the usecase one can use different types of networks on the lightning which are in turn enabled by different types of payment channels.
Lastly, there are two more types of payment channels that we skipped discussing here, namely CLTV payment channels and Spillman-style payment channels because they are unidirectional channels and we expect channels to be bidirectional ready on the lightning network.
That’s all from our side today in this detailed guide on payment channels.
If you liked this article, do share it with your network on Twitter and Facebook !!
- Is Bitcoin Real Money?: Understanding Different Types Of Money - June 28, 2024
- Bitcoin Transaction Accelerator: 5 Services to Unstuck Your BTC - September 23, 2023
- What Is Bitcoin Private Key? Everything You Need To Know !! - June 2, 2023
Contents
How does this work? Can I put $ 20.00 down on my card..