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.
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).
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.
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.
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.