Introduction

In this article, we will see how Ethereum has revolutionized the digital world with its blockchain technology and smart contracts, enabling the creation of decentralized applications. However, its popularity has led to scalability issues, such as network congestion and increased transaction costs. Layer 2 (L2) solutions have emerged to address these challenges, designed to improve Ethereum's performance without compromising decentralization or security. As we see below, these solutions promise faster and cheaper transactions.

So let's get started

A bit of history

Before we start explaining Ethereum Layer 2 scaling solutions, it is paramount to know a bit about the origin of all this and obviously, to have a knowledge base so as not to get lost along the way....

It's 2017...

Probably, it must have happened to you as it did to me, that somewhere you heard about something called “Bitcoin”... But it was kind of scary since it was something unknown, and you even heard that it was used in the underworld and the deep web. And then you found out that you could mine them (create them) from your home; however, you had to have special equipment for that, if you didn't want to burn your computer in the process and since it was too expensive to buy, you got interested in the second most important digital currency, Ethereum.

For that reason, 5 years ago I wrote about one of my favorite cryptocurrencies, Ethereum. Where I explained this technology and talked about the improvements that would come in the near future, but I never imagined that it would become more than just “smart” digital money. It would become a disruptive concept that would revolutionize the world, not only economical, but also social and technologically. And the most brutal of all is that it evolves by constantly reinventing itself. And this is what I come to explain to you in this new publication.

Initially, I loved this crypto because, besides being a way to have “real” money in a digital way and own it myself, without an entity (government or bank) being involved. Also, their transaction fees were not expensive (less than $0.1) unlike Bitcoin. And they were “super” fast: 15 to 30 transactions per second (TPS), unlike Bitcoin, which was 7 TPS (they were eternal, as well as expensive).

Surely, you installed (as I did) the Metamask fox in your browser and you loved how it followed the movement of your mouse cursor with its little face 😃. You could see the transactions and the addresses of the portfolios where the funds came from.

However, not everything was a bed of roses; the day came when the transactions started to go up and reached $100 (even more). Imagine that just to transfer 0.0040 ETH ($10 today) you needed $100... Crazy! Isn't in? So I decided to put Ethereum aside for a while.

But before I go into detail about my subsequent experiences with Ethereum, let's talk more about this cryptocurrency and its decentralized technology. Believe it or not, it is necessary to talk about blockchain technology to understand more about this world of cryptocurrencies.

Imagine, then, a large ledger that is being added to; on each sheet, a record of transaction amounts, such as deposits or withdrawals, is recorded. A copy of this ledger is located in hundreds of thousands of interconnected computers (nodes) distributed around the world. Once a sheet of the ledger (commonly called a block) is filled, it is linked to the previous one, and the information is updated throughout the network of nodes, creating an exact copy of the ledger in each of them. In this way, the information is kept safe due to its distributed, unalterable, and immutable nature. So it can be said to be “indestructible”.

Moreover, this information is visible to everyone, which ensures its transparency. Yes, we can all see how much Ethereum (Ether) the neighbor has (and obviously, others can see yours too). The most impressive thing, about all this, is that it is done automatically and autonomously, i.e. there is no central corporation controlling this process. That is why this technology is called “decentralized”. Each node works on its own and is responsible for updating its copy of the book it is in charge of.

In order not to confuse you with technical terms, the nodes are not only in charge of keeping an exact copy of the ledger, but they are also in charge of “mining” the cryptocurrencies (creating new sheets for the ledger). The mining process is an extremely arduous task that this computer (node) performs in order to create a block, and if it manages to do it before another node does it, it is paid a reward in Ether and that is how the cryptocurrencies are generated. But they don't actually give you anything tangible, you just get a transaction recorded on your statement with the amount of the reward. So there really is no “real” place or exchange where coins are held. It's all transaction recording.

This labor-intensive process is so loud it's mind-boggling. Have you ever had a miner “node” in your house? It is super noisy and generates so much heat that you must have an air conditioner to prevent the device from burning because it is so hot.

Miner

As you may have noticed, this process is not very environmentally friendly, the energy consumption is barbaric. But how much does this device does? Well, what it tries to do is to guess a number, something like guessing the combination of a safe.

Have ever you seen those bank robbery movies, where the guy is all soaked, beads of sweat running down his face, shaking and silently turning the knob on the vault, trying to find the exact combination before the police arrive or an alarm goes off...?

Well, that's basically what the node does. It has to try each and every possible combination (a huge number of combinations) until it finds the one that opens the safe. Then, once the combination is cracked, it must publish that it found the number to all the other nodes and these, in turn, must verify that the number it found is correct. Finally, the node receives the reward in the form of cryptocurrency, in our case Ether (ETH). It does this thousands of times a day.

Now you know why it took so long for transactions to register, don't you? Especially when there are thousands of people buying “cats”?

This arduous process is called proof of work, PoW. This method is original to the Bitcoin blockchain and Ethereum used it at first. However, its creator added something else....

Who created Ethereum?

Undoubtedly, we cannot talk about Ethereum without talking about the Master and Lord of Blockchains and Transactions: Vitalik Buterin...

Vitalik Buterin

In 2013, this young Russian-Canadian, who was obsessed with Bitcoin technology, published the Ethereum “Whitepaper”, describing his vision of a new blockchain incorporating a programming language to develop decentralized applications, based on smart contracts. In this way, the blockchain proposed by Vitalik would not only keep a record of transactions as the Bitcoin network does; but would use a virtual machine that could execute code or scripts to perform some action, in due time, depending on some condition.

A white paper is a technical document that describes the purpose of a project, how it works, the underlying technology, the business model, and the benefits it offers.

A smart contract is basically, as the word says, an agreement that executes itself, provided certain conditions are met. To understand this, imagine the following scenario, you are betting with a friend on who will win a soccer match between Real Madrid and Barcelona (or if you prefer, between Manchester United and Liverpool). Instead of relying on your friend to pay you, if your favorite team wins, a smart contract in Ethereum could be used to take care of releasing the bet funds, automatically, to the winner once the match is over. And thus avoiding debts and arguments.

Being on the blockchain, as I mentioned earlier, this is inviolable and immutable. And, then, how does the contract do to know who won? This is something I was also wondering...

Relax, don't worry about the vase... (Iconic phrase from the Matrix).

Well, it is done through an oracle, that is, smart contracts consult the oracle to determine the action they should follow. An oracle acts as an intermediary that provides real-world data, such as asset prices, sporting event results, and weather conditions, among others. We will not go into how oracles work, as this is not the main topic of this article.

Imagine the possibilities of this type of technology: leasing, lending, betting, voting systems, health software, legal document registration, corporate governance, crowdfunding... always keeping control of personal information and funds at your fingertips.

All these kinds of transactions are fully automated, autonomous, transparent, and inviolable. Are you beginning to see the big picture, the revolution we are witnessing?

The idea of Ethereum attracted the attention of other developers, among them were: Mihai Alisie, Anthony Di Iorio, Charles Hoskinson, Joe Lubin, and Gavin Wood; the future cofounders of Ethereum.

Officially, on July 30, 2015, the first version of Ethereum was launched.

ERC-20 Standard

In 2015, Vitalik along with Mr. Fabian Vogelsteller created the ERC-20 standard, which was a technical specification used to create and issue tokens within the Ethereum blockchain.

That's right! This standard allows people to create their own cryptocurrencies without having to do all the work of developing a blockchain. Not only that, it is the principle that will give rise to interoperability with other networks and other decentralized applications (or dApps).

A very popular ERC-20 token is USDT and USDC, which are stable cryptocurrencies or stablecoins. These tokens are designed to maintain a fixed value of 1 USD. Furthermore, they have become a popular option as a means of payment in the Ethereum ecosystem.

This standard gave rise to a new way to monetize cryptocurrencies. ICOs or "Initial Coin Offerings", are a method of financing used by startups in the cryptocurrency world. Through an ICO, a startup can issue its own cryptocurrency or token to raise capital to develop its projects, technology, or platforms.

Yes, ICOs went viral, especially between 2017 and 2018. During that period, many startups used this method to raise funds, offering promises of high returns, easy access, technological innovation, and growth in the cryptocurrency market. A series of benefits that led to a significant increase in media attention and investor participation.

However, the ERC-20 standard became a double-edged sword. Many fraudulent companies took advantage of the standard to scam people.

Yes, I was a victim of this (nowadays, I laugh, 😂). You won’t believe it. And you’ll probably say that my loss wasn’t that significant, but I assure you that if you live in a country whose hyperinflation rate is the highest in the world, you’ll understand me.

What happened to me? Well, I bought from a company two million (read that correctly) 2,000,000 BAT tokens! For just $2, which at that time was a lot of money in my country.

In the image, you can see the transaction I made, and by the way, I still have them.

I was disappointed when I realized that the BATs were actually “Bass Tokens” and their value… was zero dollars…

Here I show you a real transaction of some BATs (Basic Attention Token) that I received; these are real.

So, guys, pay close attention when you want to buy tokens…

You might wonder what all of this has to do with L2s. Don’t worry, this and the next standard are very important for you to understand the origin and necessity of L2s.

The ERC-721 Standard (Beautiful Kittens and Horrible Monkeys)

We are definitely witnessing the birth of wonderful things; we are fortunate to witness innovative historical phenomena. In 2018, the ERC-721 standard was born, defining the rules and technical specifications within the Ethereum blockchain for creating non-fungible tokens, commonly known today as NFTs. These would have a significant impact on collectors, to the point of going viral. In fact, some people became millionaires just by owning a digital drawing of a horrible monkey.

The concept of “non-fungible” was something I practically knew nothing about. It’s a financial term. When an item is fungible, it means it can be exchanged for another of the same value, like a $10 bill can be swapped for another $10 bill (even if it’s old and crumpled), or it can be exchanged for ten $1 bills, or subdivided into cents, etc. A non-fungible object is unique, doesn’t have a fixed value, and cannot be exchanged for another of the same kind, like paintings. You can’t swap the Mona Lisa for a Monet; both are unique and despite being pieces of art, they have different values.

Similarly, in the world of cryptocurrencies, unlike conventional tokens, NFTs are not interchangeable; they are unique. Moreover, the ERC-721 standard allows for the assignment of an identifier to NFTs that distinguishes them from others.

This standard gave rise to the first decentralized NFT game, called CryptoKitties. I remember buying my first three psychedelic cats about five years ago, XD. And if you think this game, which was initially a success, was a blessing, it actually dealt a fatal blow to the Ethereum blockchain.

What happened? This game allowed users to buy “unique” digital cats that could reproduce. Yes, you read that right. You could buy a pair of cats and have kittens from them, which you could then sell! This was a “boom”! By combining the characteristics of both cats, you created entirely new and rare cats that were very profitable. There were so many people who wanted to own crypto cats that they congested the Ethereum network.

Remember the TPS? Thirty transactions per second were no longer enough (or was it 15?). So, transaction prices began to rise… Want to buy crypto cats? Well, wait 24 hours, or pay a reasonable fee of $8 (this is just an example) and you won’t have to wait… Buy it now!

Something similar happened… There were so many requests that the system became congested, and you had to wait even days for a transaction to be recorded on the Ethereum blockchain. Thus, transaction fees began to rise to the point of becoming impossible (at least for an ordinary person like me). Those who invested in ICOs and DeFi (decentralized financial applications) to buy tokens and make trading financial operations didn’t mind paying more for transactions as long as they were making good profits.

The cats I have left

By the way, a month ago, someone bought one of the three cats I had in my wallet. They gave me $18 (Yaaay! 😃)

Bored Ape Yacht Club

We cannot overlook the story of the "horrible monkeys." These are the famous "Bored Ape Yacht Club" (BAYC), a collection of non-fungible tokens (NFTs) launched in April 2021.

Bored Ape Yacht Club (Did you see their prices?)

They were created by an anonymous group known as Yuga Labs. The collection consists of 10,000 unique images of apes, generated algorithmically, each with different characteristics and styles (personally, I found them disgusting).

However, since their launch, BAYCs became extremely popular, turning into a status symbol within the cryptocurrency and NFT community. The fame was so great that it attracted the attention of celebrities, artists, and collectors. They became a symbol of exclusivity and power. Owning a Bored Ape not only meant having a piece of digital art but also granted access to exclusive events and membership in a private community.

The most unusual thing was that Bored Apes reached prices of hundreds of thousands of dollars, even millions. This further increased interest in the crypto sphere…

More than just a NFT

This standard (ERC-721) evolved even more, allowing for the tokenization of all kinds of assets. It wasn't just galleries of horrible monkey drawings; it also became possible to tokenize documents, songs, videos, posts, etc. In this way, you could earn commissions automatically every time the asset was sold. It’s like when you publish a book and earn a profit for every copy sold, but you no longer have to keep track of sales; everything is automated, and the money is deposited into your Ethereum wallet.

The slowness and high fees: A problem that only Merge can solve, or is it?

Getting to where we are has been a rollercoaster of emotions, and even more are coming. Now you will begin to see the bigger picture… So you understand why Layer 2 scalability solutions are necessary.

Despite being the second most famous cryptocurrency, Ethereum began to be overshadowed by other blockchains that offered scalability, meaning they could handle millions of transactions per second, based on different types of "consensus" or methods to validate transactions and maintain security. They no longer used PoW but rather PoS, or proof-of-staking.

These blockchains were more eco-friendly, as they did not consume the excessive electrical energy required by PoW nodes; they were also faster and cheaper. An example of this is the TRON network.

TRON propaganda with Justin Sun and Vitalik Buterin at the front.

However, Vitalik Buterin assured that they would create Ethereum 2.0, which would use PoS making it, in this way, ecologically friendly and of course faster, more efficient, and cheaper.

And a key event that they would call Merge.

But the wait was getting long.... Very long...

It was clear that Ethereum was not designed for scalability (there are those who call this concept of scalability with the term speed)...

And the memes began

Converting a blockchain that operates under proof-of-work consensus to a new, more eco-friendly model was not simply a matter of waving a magic wand and making “hocus pocus” and voilà!

It was necessary to come up with a solution that ensured the scalability of the Ethereum blockchain.

Blockchain Trilemma

Solving the scalability problem within a decentralized system is quite complicated. This is where the famous Blockchain Trilemma, also known as the Scalability Trilemma, comes into play. This is a very popular concept in the world of cryptocurrencies and blockchain technology. It highlights the difficulty of achieving a balance between the three fundamental properties of a decentralized system or blockchain: scalability, security, and decentralization.

The biggest problem is that improving one of the three often compromises one or both of the others. Let’s take a closer look at this.

When we talk about scalability, we refer to the ability to handle more transactions per second (remember TPS?) as the number of users in the system increases. A system is said to be scalable when it can accommodate a higher volume of transactions without affecting its response time or slowing down.

Security involves protecting the system against attacks and fraud. In the blockchain world, these must be resistant to malicious attacks, such as the infamous 51% attack; where the attackers manage to control a group of nodes that represent more than 50% of the network, thus having the power to control the entire system in general and manipulate transactions.

The last aspect is the most important: decentralization. Allowing multiple participants to regulate control and decision-making makes the system resilient to failures and censorship, promoting greater transparency and autonomy, and increasing security by making it resistant to outages. Remember that with distributed control, if one part fails, the overall system will continue to function. This is the magic of blockchain.

Now let’s examine the challenge of the Trilemma:

Improving scalability always compromises security and decentralization. For example, increasing the block size means you can store more transactions per block, thus serving more transactions per second. However, this reduces decentralization, as it requires more specialized nodes, with more computational processing to ensure the validity of transactions (security). So becoming a node will require more resources, therefore, any computer will not be able to be a node in the network. Then the sense of decentralization is lost, since only “special” nodes will be able to process transactions faster. An attack on these nodes would compromise the entire network... Are you beginning to understand how complicated this is?

On the other hand, increasing security will also require more resources, which may limit not only decentralization but also scalability (speed).

Encouraging decentralization can lead to a more secure network, in the aspect of being less vulnerable to attacks or network crashes, but it can also jeopardize scalability, as it will require many nodes involved in the validation process.

Do you see the problem faced by Olympus Gods?

Still, they managed to find several ways to solve this trilemma, through totally different approaches. This is the beauty of it all and what Vitalik Buterin was referring to with the concept of pluralism in his article Layer 2s as cultural extensions of Ethereum.

There is not really a single solution, but a set of them oriented towards the applications that require them. But to understand this, let's first get to know the scalability solutions that came to light.

This first part ends here. You can continue reading here.

More information about Ethereum & L2

Ethereum website
https://ethereum.org/

Scaling
https://ethereum.org/es/developers/docs/scaling/

Ethereum Layer 2 Scaling Explained
https://finematics.com/ethereum-layer-2-scaling-explained/

Vitalik Buterin's website
https://vitalik.eth.limo/index.html

Plurality philosophy in an incredibly oversized nutshell
https://vitalik.eth.limo/general/2024/08/21/plurality.html

Videos

Which Layer 2 solution to choose: Polygon, Arbitrum, Optimism
https://www.youtube.com/watch?v=6LIXpMWM4v4&ab_channel=PixelPlexInc.

ZK Rollups vs Optimistic Rollups. The Difference Between Them Explained in Simple Terms
https://www.youtube.com/watch?v=qV6YbuWhDXM&ab_channel=DeFiTeller

What are Sidechains in Crypto? Rootstock + Polygon Explained!
https://www.youtube.com/watch?v=cFRj2-jzm8E&ab_channel=WhiteboardCrypto

What is the EVM? Ethereum Virtual Machine - Explained with Animations
https://www.youtube.com/watch?v=sTOcqS4msoU&ab_channel=WhiteboardCrypto

Ethereum 2.0 Upgrades Explained - Sharding, Beacon Chain, Proof of Stake (Animated)
https://www.youtube.com/watch?v=pycVClxWUN8&ab_channel=WhiteboardCrypto

What is Ethereum Gas? (Examples + Easy Explanation)
https://www.youtube.com/watch?v=3ehaSqwUZ0s&ab_channel=WhiteboardCrypto