paint-brush
Advancements in Bitcoin Scaling — Side Chains and Layer 2 Solutions as Key Playersby@tomabasido2004
New Story

Advancements in Bitcoin Scaling — Side Chains and Layer 2 Solutions as Key Players

by July 25th, 2024
Read on Terminal Reader
tldt arrow

Too Long; Didn't Read

Detailing Bitcoin’s journey in scaling, the role of Layer 2 solutions and Side Chains and prospects for the future.
featured image - Advancements in Bitcoin Scaling — Side Chains and Layer 2 Solutions as Key Players
undefined HackerNoon profile picture


Detailing Bitcoin’s journey in scaling, the role of Layer 2 solutions and Side Chains and prospects for the future.

The Original Model

Over the last decades, innovations in the world’s financial market have been negligible because about a hundred different payment systems, both e-cash and credit card-based technologies, failed somehow. However, in January 2009, when a person (or group of people) using the pseudonym Satoshi Nakamoto created and mined the first Bitcoin, there was a glimpse of hope for the sector.


Bitcoin’s birth was primarily to address and eliminate the risks of intermediaries in user transactions. Bitcoin transactions are done efficiently without an intermediary under strict cryptographic rules. This method is trustless and completely decentralized. The prequel features of this innovation were enhanced security, transparency, and instant transaction traceability. This slight change from centralized to decentralized made a significant difference; it inspired a movement, leading to a surge in development and innovation around Bitcoin.

Moving Forward…

For future relevance, Bitcoin needed to do more than eliminate payment intermediaries. As of 2015, the financial system and the world were headed in a totally different direction — the Decentralized Economy. This rise of this concept was due to the popularity of Ethereum the previous year. Ethereum gave rise to development in areas like the decentralized economy. It was pivotal in DeFi ushering the next generation of dApps, an area enthusiasts and developers were ready to explore.


However, Bitcoin was stuck with its age-long scalability issue — an area that if addressed would guarantee exponential growth and unlock new use cases. Improvements in this area will create faster payments, cheaper transactions, better privacy, greater ease of use, and massive scaling to accommodate hundreds of millions of users. Bitcoin’s journey to scalability, is indeed advancing from On-chain Solutions to Off-Chain solutions.


In this article, I will address these topics —

  • Section 1 — Why was Bitcoin not Scalable?
  • Section 2 — Advancements In Bitcoin Scaling
  • Section 3 — Future Outlook for Layer 2 Solutions
  • Section 4 — Conclusion

Section 1 — Why was Bitcoin not Scalable?

Bitcoin’s scalability issues stem from its design and underlying technology. Some of its features were hard-coded into the Bitcoin protocol in 2009 when no one had any idea it might grow into a globally significant currency.

Among the hard-coded limits are -

  • Average time per block — 10 minutes. The time it takes for a block to be appended to the distributed ledger. Within this time, the block would have obtained the needed confirmations to be considered valid.
  • The size of blocks — 1 MB. With a block size of 1MB, that’s about a million bytes. Each transaction is at least 250 bytes. Dividing 1,000,000 by 250 means each block has a limit of 4,000 transactions. Since blocks are found about every 10 minutes, we’re left with about 7 transactions per second, which, unfortunately, is all the Bitcoin network can handle.
  • Node Scalability — one node cannot mine a transaction more than 1MB in size. Satoshi made the perfect design for decentralization but made costly trade-offs like requiring total network participants to be online, connect to the peer-to-peer network, and process every transaction. While this approach to decentralization prevents single failure points, it robs the network of scaling power. With this approach, the blockchain’s number of transactions was equivalent to what a single node could handle. Simply put, one node could mine a block of a maximum size of 1MB.

Section 2 — Advancements In Bitcoin Scaling

Bitcoin and Modular Layers


Personally, I find this section the most interesting part of this article, because once Bitcoin matured, its community developers all agreed it needed scaling. However, they were thrown into disputes on how to accomplish the mission. Much of the community believed in scaling Bitcoin, while others thought off-chain solutions would be perfect.


I am fascinated by the amount of research, experiments, and developments within the Bitcoin ecosystem as a result of this dispute. These developments, however, still uphold the end goal of Bitcoin technology — achieving global relevance. I’ll be exploring these proposed solutions with the aim of educating readers and not to criticise any of these innovations.


Before I start, for clarity, a scaling solution done directly on the Bitcoin layer, is called an On-Chain or Layer 1 Scaling Solution. However, if the main Blockchain is relieved of its load, that is, transactions are processed elsewhere while preserving the main Blockchain layer for transaction validation and security, this solution called an Off-Chain or Layer 2 solution.


Now, let’s dig in fully!

Key Player #1 — Segregated Witness

Although not a Layer 2 or a Sidechain, Segwit is worth mentioning as its implementation helped make Layer 2 and Side chains possible.


SegWit, for short, was proposed in August 2017. As the name connotes, Segwit tries to segregate (separate) the witnesses of a transaction. Transaction witnesses are the digital signature and the public key.


Blocks that do not apply SegWit are called Legacy Blocks. In legacy blocks, the transaction signature and the public key are stored in the scriptpubkey location. The problem is that the signature and public key take up about 60% of the 1MB space on a block. If, after transaction verification, we can move these 2 elements to a separate location, we will have more space on our block to fit in more transactions.


How SegWit Works


Blocks with the SegWit feature have two parts: the base block containing the transaction information and the extended block containing the transaction witnesses — signature and public key. This solution is compatible with the main Bitcoin network, but requires nodes to upgrade their software to include this feature. SegWit also prevents Transaction malleability — changing the transaction ID while the transaction verification is ongoing. A feature that makes it easy for Layer 2 solutions and Side chains to work effectively.

Side Chains

Side Chains are Blockchains connected to another Blockchain through a two-way peg. A 2-way peg means a peg can enter the sidechain from the leading Blockchain and a peg back to the Blockchain from the sidechain. Sidechains are responsible for their security, have miners, and operate a consensus mechanism that differs from the main chain.

Key Player #2 — RootStock

RootStock — A Bitcoin Sidechain


Rootstock (RSK) Network, the oldest Bitcoin Layer 2, implements side chain technology. It is secured by over 60% of Bitcoin’s Hash power through a Merge-Mined Proof of Work. With merge mining, the nodes that mine Bitcoin transactions equally mine RSK transactions with no added cost and are rewarded with the transaction fees in the Block they mine.


RSK adds Ethereum-like features to the Bitcoin Network. It is backward compatible with Ethereum, providing low-level entry to Ethereum developers who wish to build decentralized applications on RSK. Smart contracts deployed on RSK are written in Solidity and work correctly on the Rootstock Virtual environment (a slight variation of the popular EVM). Rootstock is pegged 1:1 to Bitcoin, and transaction fees on RSK are paid in BTC. To get rBTC tokens, users must lock up an equivalent amount of BTC tokens on the mainchain for it to unlock on the sidechain. This process is decentralized but takes up to 17 hours to gain 100 confirmations.


Rootstock is growing fast. According to Defillama, it has over 180M in TVL and up to 14 active protocols consisting of liquidity-provider platforms, Lending platforms, DEXs, and Cross-Chain Platforms. Its developer and partner ecosystem has built over +140 dApps.


Find out more about RootStock here

Key Player #3 — Stacks

An open-source blockchain layer anchored to the Bitcoin Network.


Image of Stacks


Stacks effectively links Bitcoins to the DeFi world, offering NFTs and Blockchain Naming Services (BNS) possibilities. Stacks’s Clarity programming language introduces dApps, allowing smart contracts to be deployed on the Bitcoin Network. The Clarity language performs a function similar to Solidity, with security enhancements and user protection against bugs and exploits.


Stacks connect to Bitcoin through a consensus called the Proof of Transfer on a 1:1 block ratio. Bitcoin miners spend Bitcoin to participate in mining and creating new blocks on Stack instead of spending computational power in Bitcoin’s Proof of Work.


According to Defillama, the Stacks Ecosystem has experienced unprecedented growth in the past year. Its TVL stands at $98M, an impressive 75% increase over the past year. New protocols, about 11 to be precise, have launched, focusing on Liquid staking, lending, and Yield farming, giving users novel ways to put their Bitcoin to work and earn passively.

Key Player #4 — Merlin Ecosystem

Merlin Ecosystem


Layer-2 solutions are secured layers built on Bitcoin. Merlin ecosystem is one such secured layer. It aims to achieve two goals: “making Bitcoin fun again” and expanding the Bitcoin staking Ecosystem.


Merlin’s CEO — Jeff Merlin’s catchphrase, “Make Bitcoin Fun Again,” translates to building and integrating a variety of DeFi, gaming, and social activities into Bitcoin. These assets can realize unique value through DeFi, GameFi, and SocialFi, increasing the enjoyment and value of using Bitcoin. At the same time, Merlin Chain allows users to trade Bitcoin ecosystem assets faster and lower costs. Bitcoin will not just be a store of value but also a platform for diverse and rich user experiences.


Enhancing the Bitcoin Staking Ecosystem: The second goal is to advance the Ecosystem. Over 27% of Ethereum is staked, and the aim is to replicate and surpass this success for Bitcoin. Its ecosystem projects — Solv and Stone are planning to strengthen and expand Bitcoin staking and re-staking opportunities, providing Bitcoin holders with a wide range of passive income options.

Key Player #5 — Payment Channels

Image of Payment Channels


Initially introduced in 2015, Payment channels apply a set of rules on top of the Bitcoin protocol called payment channels. These rules allow users to make micro-payments independent of the blockchain.


Payment Channels are created using Bitcoin scripts and secured by a Hash Time Lock Contract (HTLC). This security prevents participants from cheating during the transaction period. However, suppose anyone tries to cheat by trying to exit the channel because of the time lock feature. In that case, the other user can override this process and claim all the funds in the channel, penalizing malicious actors.


Let’s assume 2 users wish to make payments using the Payment Channel.

  • They would open an off-chain payment channel.
  • Transfer funds from the main chain to the payment chain. The transferred funds must be greater than the transaction on the payment channel. This ensures that the users have enough funds to conduct transactions.
  • Both users can now make transactions and record these transactions on the payment channel ledger.
  • When the users finish their transactions, they display their channel ledger on the Bitcoin Blockchain; afterward, all transactions are updated accordingly.


In the end, everything these 2 users have done is summarised into 2 transactions — one for opening the channel and the second for channel settlement.


Suppose our hypothetical users are not the only participants in this channel. What will the network look like? Will there be a need to open up more payment channels? How secure will the network be with more participants?


Because the channel is flexible, new users do not have to open a separate payment channel. Instead, transactions pass from one person to another until they reach the desired point. There will also be no security compromise. The HTLC has advanced security features that strictly ensure the created transaction reaches its desired node according to what is specified by the user who initiates the transaction.


Bitcoin’s Lightning Network has implemented payment channel technology and can offer about 10,000 transactions per second.

Lightning Network


Presently, its TVL, according to Stelareum, stands at roughly $350M — the largest of all Layer 2 solutions. However, concerns lie in the need for significant capital to be locked up in the payment channel. There’s also a risk of centralization since nodes will need considerable capital to maintain the payment channel for a long time.


Gain more insight on how Lightning Network works here

Section 3— Future Outlook for Layer 2 Solutions

Layer 2


It is difficult to predict the landscape of layer 2 solutions in the coming years as the ecosystem is highly dynamic and can go any length. Nevertheless, with available infrastructures, I will give my honest opinion on how this ecosystem will fare in the future.

Future of RootStock

IOV Labs, an organization working with RootStock, is giving the community a preview of what to expect. With RIF flyovers, they have already reduced the time required to transfer Bitcoin from its mainnet to the Rootstock network from 17 hours to a matter of minutes.


Also, they are one of the pioneers of Zero-Knowledge proofs on Bitcoin. RIF RollUps are in the testnet stages but have great prospects. The RSK Rollup solution is a fork of ZKSync Lite V1 by Matter Labs. It is a payment-only Layer 2 solution built on RootStock. It will use the ZKSNARK proof (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) to prove that batches of transactions sent to the main layer are correct.


  • Interoperability struggles within Bitcoin. exSat is building what they describe as a “docking layer” to foster interoperability between all L2s and Bitcoin. ZKM, an interoperability protocol, released its GOAT Network a few weeks ago to use its community nodes as sequencers.

Privacy on Bitcoin

Liquid Network aims to improve privacy and confidentiality in Bitcoin transactions. Since its launch, It has introduced confidential features that obscure the amounts and types of exchanged assets. Currently, there’s development in the aspect of atomic swaps, which will enable trustless asset exchange on the platform.

Conclusion

The future of Layer 2s is not limited to what I have addressed. I believe that with time, more use cases will be unlocked by new and existing protocols, enabling Bitcoin reach its highest peak.


Have any questions? Comment below and I will answer them for you!