Bitcoin was introduced in 2009 as a form of distributed ledger technology. The main purpose of Bitcoin was to provide a system of keeping a record of all transactions within the ledger in a decentralized network. 6 years later, Ethereum was introduced as an alternative to Bitcoin, where smart contracts could be deployed on the ledger and users could interact with them permissionlessly.
In May 2020, Compound Finance catalyzed what is now popularly known as the DeFi summer of 2020. DeFi (decentralized finance) refers to the use of smart contracts to replicate traditional finance products. For example, instead of depositing money into a bank that then lends out their depositors’ money to borrowers, DeFi leverages smart contracts to perform the roles that a banker typically plays in such transactions. As such, lenders can pool capital into a smart contract which borrowers can borrow from in a permissionless and trustless manner.
Effectively, the smart contracts behave as custodians of pooled funds and manage the interest rates of borrowing and lending. However, this feature was only available to Ethereum at the time. Moreover, the use of such smart contracts for decentralized applications had also resulted in significant exploits, such as the DAO hack in 2016 or the Poly Network hack of 2021. The main reason for such exploits was primarily due to the nature of smart contract programming languages.
As a result of such applications being mainly on Ethereum as well as the prevalence of exploits in the DeFi space, the crypto community started developing solutions to bring DeFi to the Bitcoin network, with a specific focus on preventing such exploits. The result was the development of protocols that were built on top of the Bitcoin layer. One such example would be the Mintlayer protocol.
Mintlayer is, in short, a Bitcoin sidechain. The simplest way to describe how Mintlayer works is that it creates checkpoints on the Bitcoin layer periodically, which has the ability to recall the Mintlayer network to the last confirmed checkpoint. By building a separate layer on top of the Bitcoin blockchain, Mintlayer is able to support a more robust smart contract programming architecture as compared to that of Bitcoin’s.
The checkpointing process is done by sending a Bitcoin transaction with an OP_RETURN function call that corresponds to the checkpointed Mintlayer’s block height (for example, height X) by including that specific Mintlayer’s block hash in the transaction. The checkpointed block can then be affirmed by having a checkpoint request on Mintlayer an arbitrary number of blocks afterward (height X+n).
So for example, a Bitcoin transaction on Bitcoin block 100,000 can contain the hash of the header of Mintlayer block 5,000,000 as a checkpoint. Then on Mintlayer block 5,006,000, a checkpoint request can be made by including two Bitcoin block references, one of which would be the Bitcoin block 100,000. Otherwise, a typical Mintlayer block only includes a reference to one Bitcoin block. Should the checkpoint request block (M. block 5,006,000) be accepted by Mintlayer validators as final, it will affirm the finality of Mintlayer block 5,000,000.
There are many nuances and edge cases when it comes to finalizing Mintlayer blocks, as outlined in their consensus paper. According to the Mintlayer team, the checkpointing process is done locally on nodes and while the blockchain can be pruned till the last confirmed checkpoint, the state of the Mintlayer chain is voted on every 18 seconds, which allows Mintlayer to give a relatively fast confirmation time for transactions.
The fundamental takeaway is that a sidechain ultimately relies on a slightly different set of security assumptions from the base chain, meaning that Mintlayer’s security is always going to be slightly different from Bitcoin’s. This is a fundamental trade-off between scalability and security.
Aside from the checkpointing mechanism, the Mintlayer network consensus utilizes a Proof-of-Stake model to secure the chain. This means that validators are expected to stake Mintlayer (MLT) tokens in order to participate in the network. Similarly, validators’ stakes are slashed for malicious behavior.
The purpose of building the Mintlayer sidechain is to enable DeFi on Bitcoin since most of the development efforts have been focused on bringing Bitcoin to DeFi on Ethereum (such as wBTC, renBTC and sBTC). Mintlayer features tokenization standards and Script-based smart contracts with more programmability than Bitcoin’s. However, such features typically come with corresponding trade-offs.
The pros and cons of using Mintlayer protocol to enable DeFi on Bitcoin are as follows:
The general programmability of the Bitcoin blockchain is relatively simple. As a result, it is difficult to code complex smart contracts on Bitcoin due to the limitations (or simplicity) of the Script language (Turing incomplete) used for Bitcoin smart contracts. Mintlayer overcomes this by abstracting some functionalities to Web Assembly (Turing complete) that allows for greater programming flexibility. It should be noted that the Web Assembly environment is sandboxed from the main Mintlayer blockchain.
By using Script for most of their smart contracts functionality, Mintlayer remains less susceptible to most of the DeFi hacks on Ethereum arising from the Turing completeness of Solidity. Turing incomplete smart contracts are generally more predictable as they are typically more restrictive in terms of logic implementation.
Mintlayer’s block time is roughly 2 minutes, with the same size as a Bitcoin block. This significantly increases Mintlayer’s transaction throughput as there is increased block space for transactions. Moreover, the reduced block time also confers faster transaction speeds, which is generally beneficial from a user experience standpoint.
Utilizing a Turing incomplete language does often restrict the innovation in terms of creating novel applications with smart contracts. This may stifle the continued development of applications for Mintlayer. That said, most of the activity that occurs on-chain today can be accomplished with Turing incomplete smart contracts so this problem would be less significant for Mintlayer.
One of the biggest security concerns would be the finality of Mintlayer’s blocks in between finalized checkpoints. While the finality can eventually be ascertained after one full Mintlayer round, the duration of a single Mintlayer round can take up to one week. This introduces the possibility of reorganization of the Mintlayer chain in the current round, which can negatively impact user experience.
A summary list of existing competitors can be found below:
Founded in 2015 and launched in 2018, RSK is another Bitcoin sidechain that uses a Turing complete programming language that is backward compatible with the Ethereum Virtual Machine. The market cap of RIF token as of this writing is $137M.
Blockstream was founded in 2014 and launched Liquid Network in 2018, a Bitcoin sidechain with privacy and asset minting features. Liquid Network utilizes a novel consensus algorithm known as Strong Federations. Liquid Network does not utilize a native token.
Stacks was created as a computer science Ph.D. project in 2013 and launched in 2017. Stacks utilizes a Turing incomplete language, Clarity, for their smart contracts and offers features such as NFTs and DeFi as well. The market cap of STX token as of this writing is $1.66B.
DeFiChain is a Bitcoin sidechain that was launched in 2020 and also offers Turing incomplete smart contracts. They use a delegated Proof-of-Stake consensus algorithm and also have asset minting features. The market cap of DFI token as of this writing is $1.11B.
The clear conclusion for Mintlayer is that the product is definitely addressing a large and serviceable market. However, the question remains if Mintlayer can outperform its competitors. It would appear that most of the Bitcoin sidechains offer similar features so the differentiating factor would most likely be the user experience. This means that there is likely to be a significant emphasis on having fast and seamless withdrawals from the sidechain to the Bitcoin base layer. Additionally, fast transaction confirmations on the sidechain transactions will likely be a huge plus as well.
Mintlayer’s main advantage is that it has seen the successes and failures of its competitors and can capitalize on maximizing its strengths and balancing its weaknesses. If anything, the prevalence of Bitcoin sidechains is a good sign that the approach of bringing DeFi to Bitcoin is a narrative that will stay on for the foreseeable future.