Layer 2 Protocols: Functionality as a Mode of MicropaymentsteemCreated with Sketch.

This post is a continuation to Layer 0 Protocols: The Key to Scaling Crypto for the Masses
Please do have a look at that before moving ahead.

Layer 2 protocols are the trendiest solution in crypto today. In the last article, the meaning and difference between each of the 3 layers (0,1, and 2) were explained. If you haven’t read the previous article about layer 0 on a blockchain, I would recommend doing that before diving into this. You can find it here.

Micropayment Architecture

Screenshot 2019-05-13 at 10.03.09 AM.png

A layer 2 protocol can be any infrastructure built on top of a blockchain. As the previous article used bloXroute as the base for layer 0, this one will use the Lightning Network as the base.
Lightning Network (LN) is an off-chain settlement layer on the Bitcoin blockchain. It is infrastructure built by Lightning Labs on top of the main-chain of Bitcoin. It works by having people who provide liquidity through ‘channels’. These channels help LN retain Bitcoin’s innate trustless nature. Through the use of two types of contracts, LN makes sure that the person/entity running the channel cannot defraud those who are using their channel. A big part of channel providers on Lightning is reputation. Those who have high liquidity and a good reputation will consistently have user on their channel. This works for them because the more transactions they facilitate, the more the fees they earn.

The huge advantage here is not having to wait for your transaction to be confirmed in a block. LN provides near-instant confirmation rather than waiting for 10 minutes to see if your transaction is in the next block. The biggest drawback of Bitcoin is the increasing mempool size as transactions on the network increase. Bitcoin essentially turns into a fee market when transactions overload the network. At time of writing this, Bitcoin fees are around $2 to be confirmed in the next 6 blocks (60 minutes).

Screenshot 2019-05-13 at 10.03.47 AM.png

LN was constructed to easily facilitate micropayments over a trustless protocol. In essence, it works by you paying the channel and the channel paying the person you are transacting with. The channels work as middlemen that are incentivized to be genuine and provide a disincentive to be malicious. The contracts employed over LN architecture help invoke the trustless nature of the protocol.

Breaking down Lightning Network

Jordan wants to send money to Andrew over the Lightning Network. Neither of the two run a channel, so Jordan contacts a channel provider, Virgil. Jordan tells Andrew to create a password and create a hash function for it. After making the hash function for the password, Andrew has to send it to Jordan. Jordan than send the amount he wants to send to Andrew to Virgil. Jordan’s money is locked in a two contracts; a hash contract and a time-lock contract. The hash contract can be opened only with Andrew’s password and the time-lock is a contract with an expiry. If the hash contract hasn’t been opened before the time of expiry, it opens the contract and released the money back to Jordan.

Virgil receives the contract from Jordan. This is the same hash that Andrew created by encrypting his password and gave to Jordan. Now Virgil sends Andrew the amount Jordan sent (to be sent to Andrew) and secures it with the same hash. Upon receiving this, Andrew unlocks the contract by entering his password and get his Bitcoin – all the while, Virgil is watching. Now in possession of the password, Virgil can open the contract Jordan sent him and receive his Bitcoin. Nobody was able to deceive anyone and the entire process for cryptographically secure.

Lightning Network Trilemma

There are three huge repercussion to LN. These concerns have not been meaningfully addressed by anyone.

Screenshot 2019-05-13 at 10.05.53 AM.png

First, a situation where a person tries to send Bitcoin dust is not trustless. Bitcoin dust is an amount so small that it costs more to send it than the amount that is actually sent. For example, the fee now is around $2; anything below $2 is dust as it costs more to send the transactions than the transactions is actually worth. LN has not found a trust-free way to facilitate dust transfers yet. As of now, it starts by Jordan having to drop the dust into Virgil’s fee bucket (the fee bucket is the separate holding space for the fee to be paid to the miner). Virgil then goes to Andrew and asks him for his password, upon which he will release the BTC amount to him. Andrew must comply to receive payment so he gives Virgil the password trusting that he will release the amount to his wallet. After getting the password, Virgil unlocks Jordan’s contract upon which Virgil trusts that Jordan will move it from the fee bucket into Virgil’s wallet. As micropayment infrastructure, having this kind of a mechanism hinders usability of the system.

The amount of trust needed is ridiculous compared to the Bitcoin main-chain. Not just that, but Virgil can potentially take the password from Andrew and not release the BTC to him. One benefit is that there is no incentive for Virgil to have this malicious intent. The money is stuck in the fee bucket when he send it to Andrew, so the miner will get dust that is to be sent to Andrew.

Second, it creates a double fee market. Users pay a fee to the miner and the channel provider for giving them the liquidity. The fee to the channel provider is for bearing the risk of non-compliance and contract expiry as well as for providing liquidity. This double fee puts a strain on investors pockets as this protocol, which is meant for micropayments, extracts a larger fee than the layer 1 Bitcoin network.

Third, all channels are essentially centralized hubs. While the contracts enforced invoke a degree of trustless nature, it doesn’t change the fact that the channel system is centralized. It’s kind of like EOS where only 21 entities are allowed to produce blocks. The liquidity constraints of a channel hinder regular people from being able to open one. So when you put it all together, LN has centralized channel providers that are dominated by those who have enough capital to do so. At the same time, these individuals with significant capital to run channels are making even more money by collecting third party fees on top of the mining fee.

End-Game

Screenshot 2019-05-13 at 10.02.13 AM.png

At the end of the analysis of both layer 0 and layer 2, I can say with full confidence by bias is toward layer 0 protocols. Layer 2 in this case has no quantifiable scaling metric to compare it to layer 0 on that basis. The drawbacks provided by layer 0 are only that all information is no longer stored on main blockchain, rather it is just verified ID’s that link to each block in the chain. Layer 2 on the other hand is riddled by issues.

Proponents of LN make the argument that Bitcoin is nascent and LN is even further nascent. But in all fairness, so are layer 0 networks. And in the same fairness, decentralized layer 0 like bloXroute isn’t ready yet. But when it is, it’s bound to be a game changer for scalability. Taking the case of Ethereum, implementing state sharding along with running bloXroute under the blockchain can lead it to drastically outperforming the likes of EOS, Zilliqa, Tron, and any other smart contract platform.

While it is easy to pick sides, it’s important to understand both these solutions are integral to the growth of the network and the industry. All 3 layers are crucial for cryptocurrency to scale into a global system that can be used and sustained by the world. The recent saga with BSV has shown us that cryptocurrency is not about competition, intimidation, and fear. The essence of it is co-operation. Understanding that we are a part of collective that is developing and adopting technology that will change the world is what should keep us moving. While some healthy competition is necessary to keep everyone on their toes and make sure the best technology is rewarded, it is important for issues like the Parity-conflict in Ethereum, that are miniscule in comparison to the social breakthroughs cryptocurrency can bring, to be toned down for the collective good.

As a conclusion, all 3 layers will play a colossal role in developing the technology. Keeping an open mind and accepting third party perspective are the most important traits for any cryptocurrency analyst and developer.

Sort:  

Hello dear @reverseacid, well received memo friend, thanks for sharing.

It looks like it's a safe way to pay, and apparently there's no way to cheat.

Have you used it already?

I've not used it personally @fucho80

There's no way to cheat in a meaningful way, even that tiny possibility of someone being defrauded for a tiny amount doesn't benefit the fraudster, it goes to the miner

Posted using Partiko Android

a person send Bitcoin dust need costs $2 !
I don't know it costs such much.

Thank you for sharing your blog.and thank you for your generous gifts 😊

please stop memo spamming me

I'll need to read again to understand this. So far it seems that LN channels consolidates a lot of transactions and later send them to the main net.

I associate this concept to a train: a lot of people get on the train (LN channel). When the train is full it goes to the main rail (main net). There is no sense to transport only one passenger on the train. If that is the case, then the passenger can use the rail by himself (Not using LN channel).

On the other hand, I'm afraid that a layer 3 blocks access to layer 2. There is some risk that the network becomes centralized. For example, in my country the beaches are public however, to access to some beaches you have to pay because the entry to the beach is private property or natural reserve.

Maybe I'm wrong. Anyway, this is a great post.

This is a little bit technical and I'm a slow, that's why I need to read again :)

layer 3 that are trustless won't need face that problem.
The key layer 3 that are trustless to a certain degree are Statechains and Channel factory(depending the design).
Liquid and RSK are also layer 3 but they are not that trustless or are to a lesser degree ie RSK. RSK is more open than Liquid but still has a Federation which intersting control but doesn't control the bitcoin the same time. RSK does plan to get rid of the Federation but it depends if main net will get a soft fork peg

Congratulations @reverseacid! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 8000 upvotes. Your next target is to reach 9000 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

New japanese speaking community Steem Meetup badge

You can upvote this notification to help all Steem users. Learn how here!

And again I'm late to upvote your post. I loved the post. LN is a good alternative solution for scalability and speed within the Bitcoin blockchain. Plus it saves on fees.

Have these protocols already been implemented?

Thanks for sharing

Yes @jadams2k18

LN is being adopted big time for micropayments. Lots of new features coming to the network soon!

Posted using Partiko Android

Is it hard to program blockchain technology? I've never tried

Wow, another great review of Layer 2 Protocols. I can't wait to see bloXroute go live with all these awesome features that it would have. Sorry for staying out of the loop for a while. I am back now, so keep all those amazing content coming up!

Your friend,
Kelvin.

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.032
BTC 63754.85
ETH 3055.95
USDT 1.00
SBD 3.85