paint-brush
A Look at Mintlayer: Layer 2 Sidechain for the Bitcoin Networkby@isaacbenson
785 reads
785 reads

A Look at Mintlayer: Layer 2 Sidechain for the Bitcoin Network

by Isaac BensonMarch 7th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Mintlayer is a Layer 2 blockchain platform that aims to create a foundation for deploying smart contracts, NFTs, and decentralized applications on the Bitcoin network. The platform mainly focuses on building the infrastructure for decentralized finance on Bitcoin. Mintlayer uses WebAssembly, also known as Wasm, as a virtual machine to enable the development of smart contracts.

People Mentioned

Mention Thumbnail
featured image - A Look at Mintlayer: Layer 2 Sidechain for the Bitcoin Network
Isaac Benson HackerNoon profile picture

Developers mainly use blockchain development platforms like Ethereum, Polygon, and Binance Smart Chain for creating decentralized applications due to their smart contract capabilities. However, Bitcoin lacks smart contract functionality, so dApps cannot run natively on the network. 

Mintlayer is a Layer 2 blockchain platform that aims to create a foundation for deploying smart contracts, NFTs, and decentralized applications on the Bitcoin network. The platform mainly focuses on building the infrastructure for decentralized finance on Bitcoin. Let's look at Mintlayer and how it works.

How does Mintlayer work?

Mintlayer works as a sidechain to the Bitcoin network, with each Mintlayer block referring to the original Bitcoin block. However, Mintlayer uses a consensus algorithm based on the Proof-of-Stake protocol. 

Their consensus algorithm is known as Dynamic Slot Allocation (DSA), and it works by selecting validators from a group of nodes every 1008 Bitcoin blocks. Since Bitcoin has a 10-minute block time, validators are selected every 168 hours (7 days). 

For a node to be selected as a validator, nodes need to stake MLT tokens (which have a minimum stake amount for nodes who wish to become a validator). As with most PoS-based protocols, nodes with more staked tokens have a better chance of being selected.

Mintlayer uses WebAssembly, also known as Wasm, as a virtual machine to enable the development of smart contracts and decentralized applications.

NFTs on Bitcoin

Mintlayer has an MLS-03 token standard for non-fungible tokens, making it possible for NFTs on Bitcoin. There are already digital assets on Bitcoin via Ordinal Inscriptions. However, these assets take up space on the main chain. Additionally, node operators need to download any Ordinals that are minted on the blockchain.

By running NFTs via the MLS-03 standard on the Mintlayer sidechain, the platform aims to make NFTs more scalable on Bitcoin.

Unspent Transaction Output (UTXO) Model

Mintlayer is built using the Unspent Transaction Output standard, or UTXO. In this model, every transaction leaves behind some change or unspent coins. The unspent coins represent a specific amount of cryptocurrency that can be spent in future transactions.

The UTXO model is an efficient and secure way to keep track of digital currency ownership in a decentralized system. It allows users to prove cryptocurrency ownership without needing a trusted third party. The model also prevents double-spending by ensuring that each UTXO can only be spent once.

The process works by someone using or more UTXOs as inputs when spending cryptocurrency from their wallet. The new transaction uses the input UTXOs and generates one or more new UTXOs as outputs. Any new UTXOs can be used as inputs in future transactions, creating a chain of ownership that can be traced back to the user.

Below is an example of how the Unspent Transaction Output model works:

John Doe has 1 BTC and wants to transfer 0.5 BTC to another wallet. The model separates the transaction into two outputs: the 0.5 BTC that John sent and the remaining 0.5 BTC. 

Because the remaining 0.5 BTC hasn't been spent, it can be used as input for a future transaction. However, John must also provide a digital signature proving he owns the private key associated with the unspent BTC. The signature ensures that only John can spend the unspent balance and cannot be double-spent.

When a new transaction is sent, other nodes in the network will verify it by checking the following:

  1. The inputs correspond to valid, unspent UTXOs. In this case, the input should be the 0.5 BTC associated with John's public key.
  2. The total inputs are higher than or equal to the total outputs.
  3. The digital signature validates the public key associated with the spent UTXO. This ensures that John owns the UTXO and has authorized its spending.

Once the transaction has been verified, the unspent transaction outputs associated with John's wallet and the recipient of the 0.5 BTC will also be updated. The wallet that receives the 0.5 BTC can now spend the UTXO associated with their public key in a future transaction, and the cycle continues.

MLT Token

The Mintlayer token (MLT) is the native token on the network, and its purpose includes the following:

  • Rewarding validators for securing the network.
  • Transaction fees.
  • Additional protocols within the network. 

However, users can keep and spend their original Bitcoin on the Mintlayer network without needing wrapped tokens or token bridges. Instead, the platform uses atomic swap technology to enable users to use BTC as their primary currency on the network.

Conclusion

Mintlayer is a Layer 2 sidechain for the Bitcoin network that aims to bring decentralized finance, NFTs, dapps, and smart contracts to Bitcoin. The protocol uses the UTXO standard and has a token classification for NFTs that will run on the sidechain without bloating the main network.