Stakenet’s vision: Part II —Breaking down the layers — Layer 1, Layer 2, and Layer 3

Stakenet
Stakenet
Published in
6 min readApr 6, 2021

In the last article, we discussed the differences between centralized exchanges (CEX) and decentralized exchanges (DEX) including the pros and cons of each. It is equally important to understand how a DEX’s ecosystem works and what it is compatible with. Does it use native assets? Can it scale according to the number of people using it? Does it allow a user to trade privately, or even, anonymously?

What are Layer 1 protocols?

Layer 1 is, at least in our simplified definition, the blockchain layer. This layer includes sidechains and mechanisms that operate entirely within the blockchain itself, also referred to as on-chain, to solve certain problems. The blockchains powering some of the most well-known crypto assets (including BTC, ETH, and LTC) offer limited capacities to scale. On-chain transactions are limited by their chain’s block time and block size.

As a blockchain grows in popularity, more demand is exerted upon its framework which leads to getting congested — the knock-on effect of this is that it slows down transaction times by hours or even days. Consequently, transaction fees increase significantly and in some cases, small transactions won’t be economically reasonable. The end result is a slow and overloaded framework where doing basic things (transferring, trading) can be horrendously expensive.

To enable BTC trading on a faster chain (e.g. Ethereum), “wrapped assets’’ come into the play, where the original coin or token is “mirrored” on the faster chain — this basically means a copy of that asset is created on the second chain and is often referred to as a “wrapped” token/coin. This is requiring unmerited trust in that new wrapping chain, so it doesn’t get hacked due to weak security and/or that its inventor is acting (and will continue to act) in good faith.

Every wrapping process has 3 components:

  1. The origin chain
  2. The bridge
  3. The destination chain

The bridges are often centralized and a third party is needed to be trusted and perform the transfer (e.g. Bitgo as a custodian for the BTC/WBTC wrapping).

Sidechains

While sidechains, in almost every case, offer better blockchain specs, such as improved block time and throughput, they still suffer from inefficiency due to on-chain workloads. Known sidechains are Liquid and Polygon (formerly Matic).

Sidechains share the same basic scalability issues — however, they offer temporary relief by offloading transactions onto newly created blockchains, postponing the initial congestion problem.

Both smart blockchains and sidechains act like isolated islands, only being able to wield their native assets, like ERC-20 tokens on the Ethereum chain.

In conclusion, wrapping and/or sidechains are not the most efficient ways to choose for cross-chain applications and trading.

What are Layer 2 (L2) protocols?

A “second layer” runs atop a blockchain’s original network (“layer 1”) and coexists with it. Unlike layer 1 transactions which are strictly “on-chain”, layer 2 transactions are “off-chain”. Centralized exchanges and layer 2 transactions are both technically “off-chain” solutions — bypassing the actual blockchains until all transactions/trades are done, and only the result is recorded on the underlying blockchain(s). There are, however, two notable differences that set them apart: 1. Layer 2 protocols are directly connected to their blockchains. 2. As a result of #1, third parties are not involved and users have full control over their funds.

Rollups

Rollups work on ETH directly and enable it to scale by a factor of 100. They aggregate dozens of transactions into one single transaction and by doing so, it reduces fees and congestion of the blockchain. The throughput gets increased from 15 transactions per second to around 1000 transactions per second. Rollups require smart contracts to work, so they cannot be utilized for BTC. Once again, wrapping would be required and that’s a major limitation for cross-chain interoperability.

Layer 2 protocols

Layer 2 protocols, above all, allow for infinitely faster and more scalable networks with a much greater throughput to be secured, verified, and validated at all times by the entropy and security of its underlying blockchain at Layer 1. Bottlenecks of an L1-solution are bypassed and, in turn, nothing is sacrificed. This has the potential to create the most ideal scenario for exchanging different cryptocurrencies.

The most well-known Layer 2 protocol is the Lightning Network (LN) adopted by Bitcoin, Litecoin, Stakenet, and many more. In the next article, we will take a closer look into this popular L2 solution. Others include ETH-centric protocols like Connext Network and Raiden Network.

Do CEX’s have any advantages over a DEX that uses Layer 2 protocols?

A centralized exchange that is fully licensed and compliant with regulations may be eligible for certain types of insurance (i.e. FDIC) which means if the exchange is compromised, there is a chance that customers could receive their money back. On the other hand, since DEX users hold their private keys, in case there is a breach to their PC they could permanently lose their funds.

In addition, being fully compliant also enables FIAT deposits (USD, EUR, CAD etc.) and trading options, which are currently not possible for DEX’s. However, there are some toolkits that make it possible to buy cryptocurrencies with credit cards directly from a DEX or other dapps.

What are the greatest benefits for projects that integrate L2?

As mentioned previously, Layer 2 provides instant benefits for jammed blockchains and the mechanisms which embrace it. It has the potential to reduce fees on any given BTC or ETH transaction by over 99% and validate transactions that would normally take hours on-chain within mere seconds.

It has been claimed to be the future for Bitcoin, Ethereum, other popular chains, and for DEX’s alike. Several prominent experts (like Michael Saylor, Aantonop, Stephan Livera, Paolo Ardoino etc.) in the crypto industry believe Layer 2 protocols are the way forward, and they could turn into one of the biggest solutions in the entire crypto space.

Different types of DEX’s

As there are different Layer 1 and Layer 2 solutions, different kinds of DEX’s were and are being built. We will have a quick overview of the most known DEX solutions here:

*off-chain fee model where a trader gets paid when his limit order gets filled, resulting in negative fees. Read more here

Layer 1 DEX:

You can classify these DEX’s into:

  • DEX’s supporting one specific blockchain: Uniswap v2, IDEX, Curve, Binance DEX, Orion Protocol, Serum DEX, Synthetic DEX, Polkaswap, Injective protocol, Sushiswap, and many more.
  • DEX’s supporting cross-chain* swaps: Shapeshift, AtomicDEX, Block DX, etc.

*cross-chain: enable on-chain trading between different Blockchains

We could argue that these are L1 DEX’s: on-chain DEX’s with assets on Layer 1.

Layer 2 DEX:

  • DEX’s using rollups, supporting one chain: Diversifi, Loopring, Uniswap v3

These are in our definition L2 DEX’s: DEX’s with assets of a single chain, using different rollup solutions.

Layer 3 DEX

Stakenet DEX is a Layer 3 DEX: supporting off-chain, cross-chain, and cross-network trades with native assets on L2.

Whereas Layer 3 is quite a new term, but combining different Layer 2 solutions like Connext and Lightning Network is one layer above all these different scaling solutions. For better understanding see this graphic:

Layer 3 (L3) now finally enables what’s very necessary for every DEX: real-time interoperability between different blockchains. You can now not only exchange different ERC-20 tokens. but also Bitcoin, Litecoin, BSC tokens, and many other coins and tokens. Up until now, this has not been possible as every solution built its own isolated island. We are finally connecting all these different chains and their scaling solutions in one app.

This enables scalable, private, instant transactions with virtually zero fees and without having to wrap or peg your coins at a new blockchain.

In the next article, we will discuss the scaling of Bitcoin in more detail and show you the major strengths and benefits of the Lightning Network.

Join us on Discord and follow us on Twitter to stay up-to-date with our latest news and developments.

--

--