Publisher avatar
LearnCrypto
15 min read

Beyond Lightning Bitcoin Layer 2 Mintlayer and Rootstock

Beyond Lightning Bitcoin Layer 2 Mintlayer and Rootstock

The Lightning network: a brief overview

The Lightning Network is a payment protocol that operates on top of the Bitcoin base layer. The base layer is also known (retrospectively after the creation of Layer 2) as Layer 1, meaning that the Bitcoin network is the first layer. The Layer 2 concept is imagined as building a secondary infrastructure that interacts with Layer 1 as its base without scaling limitations.  

To gain more insight into the fundamentals of Bitcoin’s layers, we suggest reading this article: ‘Crypto Basics: Building on top of Bitcoin’.  

The Lightning Network enables fast transactions between Lightning nodes that are later on settled on the base layer. In simple words, two users can instantly and securely send money to each other with the use of smart contracts. Instantly refers to the fact that it happens right away, instead of every ten minutes as on the main layer. 

If you are a frequent reader, you probably remember that we published a guide on how to use the Lightning Network. If you’re not familiar with its use, check out the guide right here.

Building DeFi on the Bitcoin blockchain

Decentralised finance (DeFi) is an umbrella term for all financial tools, products, and services designed to replace traditional forms of finance in a decentralised environment. The idea behind DeFi is to make the financial world open to everyone without going through an intermediary such as a bank. 

So far DeFi has been more dominant on the Ethereum network. Ethereum has been the first mover in the field of DeFi simply by being the first public blockchain network to support the creation of decentralised applications (Dapps). However, Bitcoin found a way to expand its capabilities beyond monetary transactions and enabled Dapps across its ecosystem. 

DeFi was first introduced on the Bitcoin network in November 2021 due to the implementation of the Taproot upgrade. With Taproot, Bitcoin became able to support decentralised apps, making it a viable alternative to any other non-Bitcoin blockchain.

loading...

Before launching Dapps on the native Bitcoin blockchain, Bitcoin holders were allowed to convert their crypto assets into wrapped versions on the other available blockchains. For example, the most popular was the Wrapped BTC (wBTC) crypto asset on Ethereum.  

Taproot directly helped in the implementation of advanced capabilities that can be realised on Layer 2 scaling solutions. The two Layer 2-based protocols we are going to explain and compare in this article - Mintlayer and Rootstock- emerged as solutions to make decentralised finance a reality within a Bitcoin DeFi space.

Why do we need DeFi in the Bitcoin ecosystem?

The answer is the same as in the question of why we need DeFi anywhere. As the Bitcoin DeFi space grows, along with the growth of Bitcoin’s rival networks, crypto users’ appetite increases as well. By accommodating DeFi apps, Bitcoin is able to attract more users, DeFi developers and increase the Bitcoin community. 

loading...

DeFi and blockchain technology form a symbiotic relationship. Blockchain networks need DeFi to expand its user base and utility while DeFi needs blockchain technology for the purposes of increased security and trustworthiness among potential DeFi investors.   

Since Ethereum-based DeFi protocols became a reality, many new blockchains entered the race by doing the same. The Bitcoin blockchain was frequently overlooked in this conversation being a flagship blockchain network designed to enable peer-to-peer online transactions. Due to implementing new solutions, the Bitcoin network found a way to extend its capabilities.

Challenges facing DeFi on the Bitcoin blockchain

DeFi faces a few problems on the Bitcoin network such as scalability, security and decentralisation. These challenges are not unique to the Bitcoin ecosystem though. They are known as the blockchain trilemma. If you’re interested in learning more about challenges within Bitcoin why not read this article: ‘Crypto Basics: Bitcoin’s limitations’. 

How do these challenges affect Bitcoin specifically? Scalability is a feature that measures how many transactions can be processed within a blockchain network in a determined period. That period usually equals 1 second. Bitcoin has been one of the slowest networks in the crypto market because it processed seven transactions per second.  

Bitcoin’s proven security infrastructure is well-known within the crypto market. It stood the test of time successfully. The next question is how secure Layer 2 solutions and sidechains are. Even though they rely on the main chain, they still pose a particular risk. The situation is similar to other DeFi applications and DeFi platforms on Bitcoin’s rival networks. 

Last but not least, the decentralisation issue should answer the question of whether the network can continue to function seamlessly without a central point of control.  

Even though it is not usually included in the trilemma, we can mention the composability challenge as well. It refers to a system design principle that defines relations between modular components. In contrast to Ethereum which was built from the ground to be entirely composable, Bitcoin is not built on that concept due to its use of a limited scripting language. 

However, there are two Bitcoin solutions for DeFi challenges – Mintlayer and Rootstock. Let's examine them.

What is Mintlayer?

Mintlayer is Bitcoin’s sidechain that supports smart contracts and enables users to access DeFi, non-fungible tokens (NFTs), stablecoins, and other crypto assets while keeping up with Bitcoin’s degree of security.  

The project developed by a variety of experts in 2019 officially started off the next year. It is led by Enrico Rubboli, a former senior engineer at the cryptocurrency exchange Bitfinex, and coordinated by RBB SRL, a San Marino-based company. 

As the name suggests, the sidechain wants to be a new layer to mint all sorts of crypto assets. It builds on the main chain and envisions a financial order on the network.  

Similar to the Ethereum network, Mintlayer is a DeFi platform on which developers can create Dapps and subsequently, increase Bitcoin’s utility. It is claimed to solve all challenges DeFi faces on the Bitcoin network. 

Interestingly, the project aims to empower DeFi developers by bringing to the table a number of programs such as the ecosystem fund, incubator program, accelerator program and grants. All of these serve as incentives, each in its own manner. It is based on a community approach to attracting potential developers and investors.

How does Mintlayer work?

Being a sidechain, Mintlayer remains close to Bitcoin’s design. The detour can be spotted in areas where it was necessary to bring on better functionalities. For example, one of these changes relates to an alternative consensus mechanism.  

While the main chain is based on Proof-of-Work (PoW), the side chain is a protocol more similar to Proof-of-Stake (PoS). The new consensus mechanism is known as the Dynamic Slot Allotment (DSA) consensus mechanism, and Mintlayer is the first platform to use such a mechanism.  

DSA utilises Bitcoin hashes as a source of randomization to choose block creators. Specifically, every period of 1,008 Bitcoin blocks amounts to a Mintlayer round of block creation. Block creators jump in here to establish a transaction history, and anyone within the system is enabled to record a checkpoint on the main chain.  

Mintlayer relies on checkpoints as a vital tool to prevent long-range attacks on the main network. The checkpoint system is built-in meaning that it anchors Mintlayer transactions to the main chain.

On the other hand, Mintlayer integrates with the Lightning network to enable so-called Lightning swaps. They can be used for decentralised exchange (DEX) swaps to provide a higher degree of scalability. 

loading...

Mintlayer has its own decentralised exchange (DEX) that is connected to the Lightning network making the whole DeFi system very scalable. Instead of having on-chain order books in the form of smart contracts, trades are communicated through the so-called Distributed Hash Table (DHT) which is separate from the blockchain. 

When it comes to transactions and potential fees, this side chain provides an open currency system. In other words, any token can be used to pay for transactions on the sidechain. As long as block creators accept it as a block reward, any token has the potential to be used.

How is Mintlayer different from Ethereum?

It has been noted that Mintlayer shares similarities with Ethereum, especially when it comes to the implemented consensus mechanism. Mintlayer creators claim that the main difference lies in the DSA Proof-of-Stake system which is more secure since it relies on the Bitcoin blockchain. 

Further, it has been stated that the scalability concept is different on Mintlayer in comparison to Ethereum. Mintlayer uses transaction batching to shrink the size of each transaction along with the Lightning Network while Ethereum uses a variety of shards as sidechains amounting to an increasing size of nodes required to run the network.

How does Mintlayer help Bitcoin?

 Mintlayer redirects transactions from Layer 1 and therefore, reduces network congestion and fees. In general, it enhances Bitcoin’s functionality and utility. 

One important feature provided by this solution refers to the ability of users to interact with DeFi applications without the need to use token bridges or WBTC tokens. The swap system removes the need for an intermediary and enables users to trade any token accommodated on the Mintlayer ecosystem for Bitcoin. 

With the introduction of new tokenomics, smart contracts, and Dapps, Mintlayer extended Bitcoin’s use cases. Thereby, it is claimed that this Layer 2 solution addresses all issues DeFi faces within the Bitcoin network.

What are Mintlayer's cons?

The creators state that Mintlayer is a more innovative solution when compared to the Ethereum infrastructure. However, each project has a few drawbacks.

First, the project was officially launched in 2020. In the eyes of investors, this project is still a new one. Secondly, the innovative DSA consensus model is still not quite clear.

Further, it appears that there are certain risks associated with the new sidechain. As stated, it is a new blockchain that still has the potential to experience significant bugs, along with not having enough node validators to keep the network totally decentralised. 

Another risk is a more general one – the competition in the crypto space is filled with smart contract platforms that provide a high degree of quality. How Mintlayer will mitigate these risks shall determine its long-term position in the market.

What is Rootstock?

Similar to Mintlayer, Rootstock (RSK) is another side chain on the Bitcoin network with smart contract capability. It was created in 2014 with a vision to provide faster transactions and support smart contracts with the general purpose of extending Bitcoin's full potential.

A group of Bitcoin developers published a paper in which they laid down the concept of a sidechain. Due to this vision, BTC holders can move Bitcoin from the main chain to a side chain and vice versa.  

The RSK blockchain utilises the same Proof-of-Work consensus mechanism as Bitcoin with the exact same algorithm that enables Bitcoin users to engage in merged mining. This refers to a kind of mining where one computer can be used to validate transactions in two divergent blockchains.  

Rootstock provides a few interesting benefits; aside from its compatibility with Ethereum Dapps, it provides a native token used for staking, fee payments, and value transfer. For example, when a Bitcoin (BTC) is transferred to RSK it becomes an RSK Bitcoin (RBTC), a smart-contract-enabled Bitcoin. Additionally, it supports DeFi applications that enable users to borrow, lend and trade crypto assets.

How does Rootstock (RSK) work?

By setting out smart contracts in the form of a sidechain, RSK tends to overcome slow transaction confirmation periods and network congestion. Since the blocks on the base layer are limited to 1 megabyte, putting a smart contract into a block affects the block’s ability to store transaction information. The outcome is an even slower network. 

By implementing RSK, a user sends Bitcoins to a special address monitored by a Rootstock-Bitcoin bridge smart contract. These are locked on the Bitcoin blockchain, and RSK coins are unlocked and sent to the accurate address on the side chain. 

RSK utilises a combination of drivechains, sidechains and federations. Since it is not possible to implement sidechain technology directly into Bitcoin without a hard fork, a drivechain model is put in place instead. A hard fork in blockchain technology refers to a radical change to a network's protocol that makes invalid blocks and transactions valid and the other way around. It requires a full upgrade to the latest software version of the protocol.

Further, to allow the drive chain model to remain active, a certain number of miners must merge mine RSK to have a direct incentive to act honestly.  Merge mining simply means that Bitcoin miners can work at the same time on BTC and RSK without affecting Bitcoin mining.  When such requirements are met, RSK takes the form of a side chain. 

In case these conditions have not been met, RSK calls upon the federation. The federation refers to a group of notaries composed of Bitcoin exchanges that are put in charge of releasing Bitcoin when required. A majority of them must sign off on a transaction. 

How is Rootstock different from Ethereum?

As Mintlayer, Rootstock shares some similarities with Ethereum – RSK smart contracts’ features are identical to Ethereum’s smart contracts. The difference can be spotted when you examine networks. 

Ethereum consists of a main network where all smart contracts run in a decentralised setting. On the other hand, Rootstock is Bitcoin’s sidechain. Instead of being a two-way peg like other sidechains, it is a federated peg that employs merge mining.

How does Rootstock benefit Bitcoin?

Adding the Rootstock sidechain to the Bitcoin blockchain improved its scalability since it enabled additional tasks to be completed on Layer 2. Bitcoin needs up to 10 minutes to verify a transaction due to the power and time required to create a new block. 

loading...

Rootstock reduced the time of block confirmation to approximately 34 seconds. The result is that transactions are much faster and cost less.  

Similar to Mintlayer, Rootstock brings to the table new use cases. RSK enables DeFi developers to create their applications, protocols, and NFTs. In the meantime, RSK highlights the need to maintain a high degree of security.  

As Mintlayer uses a lot of incentive-based programs to attract developers, Rootstock makes use of monetary incentives to attract security experts and hackers to find weaknesses so the whole ecosystem can increase its security. 

What are Rootstock's cons?

Rootstock is an interesting and advantageous project but it has received some criticism as well. For example, merge mining is beneficial and novel but there are particular risks associated with the concept such as miners finding that the cost of supporting RSK outweighs the benefits or if the rewards turn out to be unreliable.  

Furthermore, the use of trusted third parties to employ the bridging between Bitcoin and Rootstock amounts to the risk of centralisation and the possibility of these parties acting with malicious intent.  

In the meanwhile, the RSK project has lost significant market capitalization which is not unusual in times of crypto hardships, but it maintained its total value locked in Bitcoin terms. In simple words, it managed to keep its users.

Redesigning the main house: final thoughts

It can be argued that Bitcoin’s approach was flawed from the start as they decided to build the house first, only to acknowledge a bit later that they need to implement a better foundation. However, when it comes to market reliability and monetary policy, Bitcoin seems to be unmatched.  

Blockchain technology like any other type of technology is constantly developing. Rapid innovations require a decent degree of flexibility; Bitcoin demonstrated that there is a good chance of redesigning its home. 

As the Bitcoin DeFi space grows, so do Layer 2 scaling solutions. Each technology has its flaws, but so far they have been doing a good job of overcoming obstacles. It is yet to see what the future holds for Bitcoin and all its layers.