Layer 2 Scaling
For today’s article, I am going to take a closer look at layer 2 scaling. I’ve mentioned it a number of times in previous articles, as one of the ways to help increase transaction speeds and lower costs, but I’ve never really dived into what it actually means, or talked about any of the real examples of it, other than when I talked about The Lightning Network.
For the usual disclosure, I am not a financial advisor, I don’t even work in finance at all. My day job is as a telecommunications software engineer. Treat everything you read here as some educational resources and not financial advice.
What Is Layer 2 Scaling
Layer 2 scaling is a one of the methods of improving a blockchain to make it possible to handle more transactions at a lower cost. Versus changes made to the blockchain or it’s protocols directly, a layer 2 solution is something that runs in parallel to the main chain, and only relies on the main chain for certain activities like payment settlement.
This offloads significant portions of the work to the second layer, meaning more room for transactions on the main layer, plus increased handling by everything happening on the other chains. It also lets the second layer leverage the security provided by the main blockchain by using it for all the final state records.
This type of architecture is not actually specific to blockchains and the concept of layers being used to take load off of the points that do a lot of heavy lifting, exists in all forms of technology, including the operating system that is controlling whatever device you are reading this off of.
Layer 2 solutions came about as a way to increase the scalability, without having to sacrifice either decentralization, security, or in the worst of conditions, both. This would be the so called Scalability Trilemma that plagues blockchains to this day, and by offloading the work to a different layer, you can get around having to directly impact the other factors.
It does, however, cause you to have a second point that you now need to consider the trust and risk factors for, because once you move funds onto a second layer protocol, whatever that second layer comes back to the main blockchain and says to update the state to be, that is what is going to happen, so it does add more complexity to the research you need to do.
There are a number of different approaches and implementations of layer 2 scaling, especially around the Ethereum ecosystem, so I think the best way to help you understand how layer 2 helps, is to run through some of the bigger examples of how it’s actually used.
Channels are the most basic of a second layer solution, and is the basis for how The Lightning Network operates. As I’ve already written a whole article on them, I’ll keep this synopsis brief. Basically, two parties can open up a channel between them and stake up some crypto. This crypto can then be used to send payments back and forth instantly, and once it’s time, can get closed out and the final state of the channel is broadcast back to the blockchain, and the final balances updated accordingly.
Channels can also be chained together to allow payments to find short paths in between two points by sending payments through other channels to eventually end up where they need to go.
Plasma is a layer 2 framework that was originally theorized by Vitalik Buterin, who we all know cofounded Ethereum, and Joseph Poon, who wrote the paper on The Lightning Network. Plasma leverages smart contracts to create child chains off the main blockchain and lets transactions be handled and processed there. These child chains can handle the same types of smart contract transactions as the main chain, and funds get transferred into and out of them via smart contract bridges.
One big examples of a layer 2 protocol that uses their own flavor of the plasma framework would be the Polygon network, which is arguably one of the largest layer 2 solutions off the Ethereum network. One big drawback to these solutions, is there can be quite a significant wait period when withdrawing from the child chain, as it has to make it’s way back through the smart contracts and ultimately be confirmed on the main blockchain.
A side chain is a totally independent blockchain with all of it’s own parameters, but is compatible with Ethereum by leveraging the Ethereum Virtual Machine (EVM). This means any smart contract that has been deployed on Ethereum can also be deployed on the side chain. One big example of this would be the xDai chain. This let’s developers release their protocol on multiple blockchains with minimal effort, and gives people additional options when choosing how to interact with DeFi and other crypto projects.
While not directly scaling the underlying blockchain, it does help because people will go to the alternative to save time and money, and that will reduce the load just organically.
Rollups provide scaling by handling a lot of the heavy lifting of transaction off chain, and only submitting the cryptographic proofs of the work to the blockchain. For example, if you look at my article on why DeFi is expensive, I discuss just how much code can need to be executed for these larger complex transactions.
If most of the actual processing can happen off chain, and it is only the final states that need to be broadcast and stored on the blockchain as basically normal transactions, and the main blockchain does not need to handle the actually processing of all the steps, this greatly increases the amount of transactions that can be handled, which in turns lowers out the transactions costs.
This was of course not an exhaustive list of every possible layer 2 solution, and smarter minds than mine are coming up with creative ways to pull things off all the time, but I hope it helps you understand more about what a layer 2 solution is, and how it can help increase the speed and lower the costs of transactions, by offloading some of the work that needs to get from the main chain.
I also know that a lot of my focus was on Ethereum, but the same theories can be applied to any network really, and these solutions are what are going to help keep the networks all running as crypto adoption gets far more widespread, and transaction space is going to become more and more sought after.
Socials And Other Links
I also post a weekly price update video every Saturday over on my YouTube channel, where I will be discussing the weekly price action for some of the major cryptos. You can also sign up for my newsletter which I send out every Friday with news and whatnot from the crypto space, delivered right to your inbox!
You can also find links to resources such as research and news sites over at this link.
Want some more content right now? Check out some of my previous posts:
A few referral links, in case you are interested in the service, and it also helps me out.
Binance — large centralized exchange — referral link saves you 10% on trading fees
Coinbase — basic crypto exchange — referral link gets you bonus crypto on first deposit
Cointiply — very good crypto faucet and earning site — no bonus for you on this referral unfortunately
Originally Posted On My Website: https://ninjawingnut.xyz/2021/07/29/layer-2-scaling/