At Trust Machines, our goal is to develop the biggest ecosystem of apps built on Bitcoin. Given this, you can guess why we're dedicated to spreading the word about Bitcoin layers and other scaling solutions that will ultimately expand the number of use cases on the world's first blockchain.
That's why every week, we'll dive into different cutting-edge solutions aimed at addressing Bitcoin's scalability challenges. We want to give Bitcoin builders and users the knowledge they need to unlock Bitcoin's full potential through scaling solutions, like those you have read about in our Learn Center.
In the first edition of "Scaling Solution of the Week," we are excited to feature subnets by Hiro, a groundbreaking scalability solution for Stacks that recently launched on mainnet just two months after the release of subnets alpha.
Defining Scaling Solutions
Given that it's our first "Scaling Solution of the Week" post, let's define what we mean by "scaling solutions."
Scaling solutions allow blockchain network expansion, enhancing output and efficiency without compromising existing operations. To increase transaction throughput in blockchain, second-layer protocols (sidechains, off-chain layers) are developed on top of main chains. As a result, they help expand use cases on blockchains and enable the development of dApps, DeFi protocols, smart contract functionality and more that could be challenging on the L1 blockchain. Blockchain scaling solutions can include L2s (layers built on top of layer 1), sharding and additional protocols that contribute directly to a blockchain's infrastructure.
Secure scaling solutions are necessary for any blockchain, including newer blockchains like Ethereum, but it's particularly important for Bitcoin. The high security and decentralization of the Bitcoin blockchain and its consensus mechanism has meant that Bitcoin has faced scalability challenges since its invention.
A number of scaling solutions, however, have enabled dApps and additional protocols to be built on Bitcoin's primary network over the years. These include L2 solutions like the Lightning Network to the implementation of new infrastructure developments like Segregated Witness (SegWit). Together, all of these solutions have enabled everything from optimizing the number of transactions per second on the Bitcoin network to NFTs on-chain.
What are Subnets and How do They Work?
A subnet is generally thought of as a segmented portion of a larger computer network that is composed of up of a group of devices with similar characteristics or capabilities. By isolating and controlling certain network segments, it acts as a small network within or on top of a larger one, enhancing security and network performance. Subnets are similar to splitting up a large network into more manageable sections, allowing for effective data transfer and device connectivity while preserving the integrity of the entire network.
Much of that context also applies to subnets on blockchain. In the context of cryptocurrencies and blockchain platforms, subnets refer to the segmented or isolated sections of a larger blockchain network. These subnets enable specific groups of nodes to operate independently within a designated subset of the blockchain network.
Some of the more well-known examples of blockchain subnets include the Avalanche network subnets, in which the Platform Chain (P-Chain), the Contract Chain (C-Chain) and the Exchange Chain (X-Chain) serve as three blockchains that are part of Avalanche's Primary Network subnet. Each of these subnets has their own validators that must also validate the Primary Network main Avalanche subnet. Avalanche subnets can also each host multiple blockchains with the use of virtual machines.
Ultimately, the biggest thing that subnets offer is the ability for blockchains to scale. If we're looking specifically at the Bitcoin blockchain, subnets could address the following network concerns:
- Scalability: As the network encounters an increase in transaction demand, Bitcoin's constrained block size and block interval provide scalability difficulties. Subnets could solve this problem and enable parallel transaction processing. As a result, the network's transaction throughput could be greatly increased, allowing Bitcoin to manage a greater amount of transactions effectively.
- Transaction throughput: As Bitcoin becomes more and more popular, the number of transactions has significantly increased, causing congestion and longer confirmation times. By decreasing the backlog of pending transactions and accelerating confirmations, subnets could contribute to an increase in transaction throughput.
- Transaction costs: The Bitcoin network may be less useful for microtransactions or lower value transfers due to high transaction costs. By streamlining transaction processing, lowering congestion, and thus lowering transaction fees, subnets could address this and increase the usability and accessibility of Bitcoin for additional users and use cases.
- Confirmation Times: Faster confirmation times are vital for the use of Bitcoin in a variety of applications. By enabling more effective transaction processing, ensuring that transactions are confirmed more quickly, and decreasing the amount of time users have to wait for their transactions to be included in a block, subnets could speed up confirmations.
In this particular case, Hiro's subnets are aiming to achieve many of these components for the Stacks blockchain.
Hiro's Subnet Solution: Scalability on Stacks
Hiro's subnets acts as an L2 scaling solution for the Stacks blockchain. In this case, you can think of Stacks as an L1, and subnets are an L2 on top of Stacks layer-1. Each subnet has its own unique smart contract that allows it to interface with Stacks.
Essentially, users can deposit their Stacks assets into a subnet by initiating an L1 transaction, and the subnet's specific smart contract would hold their assets in escrow until users want to withdraw those assets to settle back to L1. A federated system of miners also serves as a consensus mechanism for the current implementation of subnets, and signatures are validated on the L1 chain when the majority of the federation signs each issued subnet block. While this federation is fully trusted, Hiro has indicated that the future development of subnets will explore additional trust models.
Ultimately, the benefits that subnets offer to high throughput workloads can enable developers to build more efficiently on Stacks.
The alpha implementation of subnets earlier this year included support for multi-miners, Stacks 2.1 compatibility, enhanced throughput and faster block confirmation times. In the months leading up to launch, Hiro Systems made significant progress in areas like microblock handling, contract versioning and bug removal.
Overall, subnets aims to improve the overall network resilience and security of Stacks while minimizing congestion, fees, and confirmation times. Hiro's Developer Advocate Max Efremov gave a walkthrough of how subnets work using a hypothetical NFT marketplace, demonstrating how subnets can help developers build additional use cases on Bitcoin.
Subnets and Blockchain Scalability
Scalability is a vital component of Bitcoin's success as a global financial asset and the network's future expansion. Hiro's mainnet launch of subnets marks a significant advancement in the continued search for scalable solutions.
As we begin our "Scaling Solution of the Week" series, we are dedicated to providing developers and consumers with the knowledge and resources they require to effectively improve Bitcoin's scalability. In doing so, we can make sure that Bitcoin remains at the vanguard of decentralized finance and more by continuously researching, creating, and bringing novel solutions like subnets into effect. In turn, this will revolutionize the way we exchange and interact with value on a global scale.