The blockchain technology is a combination of several different entities, which together makes it possible for us to benefit from its advantages. These entities involve mathematical computation, peer-to-peer networks, validation protocols and more. Each entity is an important piece in the puzzle of decentralized finance. The blockchain technology is often described in terms of blockchain layers in which the above mentioned entities are included. These blockchain layers are sometimes qualitatively described in terms of what they comprise and sometimes described in terms of numbers. We are going to focus on the latter in this article, to eventually cover how and why the Hydranet DEX can be entitled as a Layer 3 DEX.
Layer 0 can be referred to as a connector of blockchains. It is composed of protocols, hardware, miners and other components that together form a framework which is run beneath a blockchain. The idea is that with a common underlying layer, is will be easier to achieve cross-chain interoperability and easier for developers to build blockchains to their desired specifications (instead of forking already existing networks). Polkadot (DOT), Avalanche (AVAX) and Cosmos (ATMO) are examples of some of the biggest Layer 0 protocols on the market.
Layer 1 is probably the layer which is most common to the everyday crypto user. Common blockchains such as Bitcoin (BTC), Ethereum (ETH) and Binance Smart Chain (BSC) are all examples of Layer 1 blockchains. These blockchains can be referred to as base networks since they are the main networks within their respective ecosystems. Layer 1 blockchains can process and complete transactions on their own network, no other networks are needed for this. Native tokens are usually used to pay for transaction fees on Layer 1 blockchains. BTC is used on the Bitcoin blockchain, ETH on Ethereum and BNB on BSC, which you are probably familiar with.
Scalability is often spoken of as one of the major problems for Layer 1 blockchains. Shortly, scalability refers to the capacity of a network and how many transactions per time period the network can process. Scalability has an important role in the widespread adoption of the blockchain industry. No one wants to use a payment system that takes hours to confirm a payment.
Blockchain developers are constantly trying to find solutions for the scalability issues on Layer 1 blockchains. Options within the individual networks are usually: increased block size (confirmation of more transactions within each block), changed consensus mechanism (for instance, Ethereum 2.0) or implementation of sharding (database partitioning). However, finding a solution to the scalability problem involves a lot of compromises. This leads to the fact that not everything is solvable on Layer 1. Layer 2 solutions has therefore emerged as a way to mitigate the Layer 1 scalability problem. This will be covered in the section below.
One solution to the scalability problems on Layer 1 blockchains is to build applications on top of the Layer 1 chains. This is what is referred to as Layer 2 solutions. The idea is to transfer some of the Layer 1 transactions to the upper layer (2) in order to decrease the Layer 1 transactional load and thereby increase its efficiency and scalability. Transactions performed on Layer 2 applications can later be reported back to Layer 1 at a rate that prevents the chain from being congested.
There are different Layer 2 solutions to consider. The normal solutions are typically: state/payment channels, sidechains and rollups.
State channels are used for off-chain, two-way communications between transacting parties. Each party locks a fraction of the blockchain’s tokens and connects these to the state channel. This is often done via a smart contract. Once locked, the parties can trade an infinite amount of trades without sending each transaction data to the underlying blockchain. Since the underlying blockchain is not part of this operation, transactions are more or less instant and fee less. When the parties no longer want to make any transactions via the state channel, the final status of the state channel is broadcasted back to the blockchain for validation.
Bitcoins Lightning Network is an example of a state channel technology. The Lightning Network is an important piece in the Hydranet DEX. More about the Lightning Network can be read in this article.
Whether sidechains can be classified as Layer 2 solutions is a discussion for another forum. Regardless, we will in this article present sidechains as a scalability solution for Layer 1 blockchains.
Sidechains are often presented as a concept in the context of the Ethereum network. The concept involves creating several independent chains outside the main chain, hence the name "sidechain". These sidechains rely completely on their own consensus mechanics and security. But with these sidechains, some of the transactional load on the main chain can be offloaded to the sidechain and by this mitigate the issue with a congestion main chain. Smart contracts are used to bridge the assets between the main chain and sidechains.
The Polygon network is an example of a sidechain. It has its own native token, MATIC. Furthermore, Connext is an example of a bridge provider that offers fast and secure bridging between blockchains and rollups. Connext is also an important piece in the Hydranet DEX. More about Connext can be read here.
The final scaling solution to be covered in this article is rollups. Rollups is an off-chain solution in which transactions are "rolled up" into a batch and compressed (in terms of data), before the complete batch is validated. The compression of the rolled up data allows for a higher transactional throughput and thus lower transaction costs. Rollups solutions are typically classified into ZK-rollups and Optimistic rollups, none of which we will discuss any further in this article.
The Arbitrum network (the network on which our token, HDX, is hosted) is an example of an Optimistic rollups.
Layer 3 is the last layer among the existing blockchain layers, and is often referred to as the application layer. This layer is used to empower different blockchains, and even the whole crypt industry, by hosting Decentralized Applications (Dapps) and Decentralized Finance (DeFi) tools. Ethereum typically has a large variety of Dapps and DeFi tools. However, Bitcoin is not optimized for these types of solutions and therefore typically does not extend further than Layer 2 solutions.
Interoperability is often mentioned in the context of Layer 3. In short, Layer 3 solutions aims to solve the lack of interoperability between different blockchains. It is only when this is accomplished, true DeFi can be achieved.
As you are probably familiar with, the Hydranet DEX is a Layer 3 DEX. So, why is that? The Hydranet DEX combines different Layer 2 protocols to achieve interoperability and fast trades between different blockchains. With the Hydranet DEX it is possible to make low-fee, trustless, cross-chain swaps between native BTC, ETH and additional altcoins. All in one platform and with a CEX-like experience.