Today I’m going to talk about a special L2 project, because it’s not Ethereum’s L2, it’s Bitcoin’s L2. We talked about BRC-20 in previous issues, which is the popularity of Ordinals. Then the public began to focus on the Bitcoin expansion issue that had not paid much attention before, and people were surprised to discover the existence of Stacks. When people were accustomed to thinking that Stacks was also a short-term Internet celebrity product, they did not know it. Stacks has been working quietly on the road of building BitBit’s second-layer network for nearly 10 years. Its current market value is approximately US$900 million, ranking around 50.

In the first and second episodes of the previous program, we introduced Bitcoin and Ethereum, and we know some of the problems on the Bitcoin chain. Although we can make some simple scripts, they are not Turing complete, and it is also difficult to use them. , so the smart contract of Ethereum appeared. But this does not mean that applications cannot be made on the Bitcoin chain. In fact, the Bitcoin chain has been upgraded many times with expansion plans, as shown below

Then let’s talk about how Stacks expands its capacity.

Stacks (formerly Blockstack) is a layer 1 blockchain solution designed to bring smart contracts and decentralized applications (DApps) to Bitcoin (BTC) without changing its security and stability. STX tokens are used to power smart contract execution, process transactions, and register new digital assets on the Stacks 2.0 blockchain. So it can be defined as Stacks is an innovative Sidechain model. Compared with ETH's Rollup solution, the so-called "native Layer 2", both package multiple transactions into a batch and submit it to the blockchain for verification. This approach can effectively reduce the number of transactions on the blockchain, thus improving overall performance.

Stacks’ technological innovations and advantages

Stacks is an independent blockchain based on the Bitcoin blockchain, created in 2013 by Muneeb Ali and Ryan Shea. Adopting the "Proof of Transfer" (PoX) protocol, utilizing the security of Bitcoin and Stacks tokens (STX) to implement smart contracts. Early focus on DApps development and combining Bitcoin security to provide a decentralized experience. With Bitcoin congestion and high fees, Stacks began researching the use of Bitcoin’s second-layer technology (such as Lightning Network) to expand network throughput and transaction speed, and launched Stacks 2.0 to achieve high throughput, low cost, and instant settlement of transactions. .

How did Stacks get started?

The evolution of Stacks began in 2013. The project was created by founders Muneeb Ali and Ryan Xie. Stacks is the outgrowth of Muneeb's doctoral thesis, which detailed a framework for an internet that could be built around the Bitcoin blockchain. This framework is called Blockstack. Initial research and development was made possible thanks to participation in the 2014 Y Combinator batch. Muneeb Ali and Ryan Xie raised early funding from Union Square Ventures, Naval Ravikant, SV Angel, Winklevoss Capital and others.

The project raised $47 million in 2017 through a token offering of Stacks Cryptocurrency, and $23 million in 2019 through a first-ever SEC-qualified U.S. Reg A offering and a concurrent Reg S offering. More than 4,500 Stack holders participated in these issuances, including USV, Lux, DCG, Winklevoss Capital, Blockchain Capital, Foundation Capital, Hashkey, Fenbushi, etc. In 2020, Blockstacks changed its name to Stacks, and launched the Stacks 2.0 mainnet compatible with Clarity smart contracts in January 2021.

Stacks solves major difficulties in building on Bitcoin

There are two fundamental challenges in building applications and smart contracts on Bitcoin:

•Scalability: The Bitcoin blockchain has limited transaction capabilities. Bitcoin takes 10 minutes to create a block.

•Secure Contracts: To protect the security of the Bitcoin blockchain, the smart contract scripting language is very limited.

Stacks has solutions for both problems. Rather than deploying smart contracts directly on the Bitcoin chain, Stacks executes them on its own layer 1 blockchain and uses only Bitcoin for settlement.

How does the Stacks blockchain communicate with the Bitcoin blockchain? A novel consensus mechanism called Proof of Transfer (PoX) allows Stacks miners to write new blocks on their own blockchain using the mining energy consumed by the same miners on the Bitcoin blockchain. Therefore no further energy consumption is required.

Achieving speed at the micro (block) level

For decentralized applications, speed is of the essence. The Bitcoin blockchain is known to be slower than most top chains that support smart contracts. Since every block produced on Stacks must be stored on Bitcoin, it can be assumed that the speed of Stacks must be less than or equal to the speed of Bitcoin. To solve this problem, Stacks designed a mechanism that allows its blockchain to make the most of the time between two blocks produced on Bitcoin via smaller intermediate blocks called microblocks. These blocks can take advantage of faster confirmation speeds, and when Bitcoin confirms a block, microblocks can be settled from Stacks to Bitcoin and provide finality. Microblocks therefore increase speed while leveraging the security of the Bitcoin network.

Smart contracts require Clarity

The Stacks blockchain uses the Clarity programming language to power smart contracts. Clarity differentiates itself from the most common smart contract languages ​​for two main reasons:

•Decidable languages: Turing (in)completeness is a property of a machine that theoretically (cannot) solve any problem if it can be coded. However, the time required to solve "any" problem is obviously unknown and not necessarily upper bounded. Turing-complete programming languages ​​like Solidity have a wide range of technical possibilities but remain mostly unused. In fact, the gas cost consumption model reduces the theoretical scope of programming design and encourages developers to choose simpler and more minimalist smart contract structures. However, Turing-complete languages ​​increase the surface area for errors and make it more difficult to write hacker-proof code. Clarity coding language is decidable (Turing incomplete). This makes it more secure and makes it easier for developers to see what the code will do before running it.

• Explain code: This attribute allows non-technical users who cannot audit the smart contract code to see exactly what will happen to their balance in the UI before running the smart contract.

Proof of transfer (PoX) and staking

The traditional proof-of-work mechanism on the Bitcoin blockchain basically works like this: Miners spend computing power guessing the hash of the next block, and the first person to do so receives Bitcoin as reward for their efforts.

All Stacks transactions are settled in Bitcoin. This enables Stacks transactions to benefit from the security of Bitcoin. Since the Stacks blockchain needs to broadcast its block headers to the Bitcoin blockchain, implementing the proof-of-work algorithm on Stacks means additional energy consumption.

Stacks has chosen a more energy-efficient mechanism, using Bitcoin as the “digital energy” used by Stacks miners in place of computing power. This mechanism is called Proof of Transfer (PoX), and it allows leveraging and scaling any Proof of Work chain, such as Bitcoin.

This consensus mechanism involves two parties: miners and stakers.

•Miners: With PoX, miners do not need to convert electricity and computing power to earn block rewards and transaction fees. Instead, they transfer Bitcoin, a proof-of-work currency, to holders of Stacks tokens. This enables holders of Stacks tokens to earn Bitcoin from consensus. This process is called staking. Leader election occurs on Bitcoin and new blocks are written to the Stacks blockchain. Their cost function is represented by the number of Bitcoins they commit to transfer on the Bitcoin blockchain. The miner (also known as the "leader") who mines the next block in the Stacks blockchain is selected using a verifiable random function, and the number of Bitcoins transferred by the miner relative to other miners scales with the number of Bitcoins. Increase. In addition to transaction fees, the elected miners will also receive currency base rewards in the form of STX tokens. To avoid incentive misalignment when mining on the Stacks blockchain rather than the Bitcoin blockchain, the coinbase reward for each block decreases over time in accordance with the Bitcoin halving schedule.

• Stakers: They temporarily lock their STX to support the security and consensus of the network. As a reward, stakers earn BTC, which miners transfer as part of PoX. Depending on the amount of STX they hold, they can choose to stake independently or join a staking pool. STX holders (or pools) that control certain threshold amounts of STX will be able to publish signed messages, lock their STX tokens for a period of time, designate a Bitcoin address to receive funds, and signal (vote) on the Stacks chain version /fork as current. This information is useful to (honest) miners on the network. The staker provides a Bitcoin address to receive Bitcoin rewards sent by the miners.

STX miners participate in leader elections by sending transactions on the Bitcoin blockchain, the verifiable random function VRF randomly selects the leader for each round (while giving higher BTC bids more weight), and the leader writes on the Stacks chain Enter new block.

STX holders can participate in the consensus and receive BTC rewards by participating in a process called "Stacking". The process is for users to lock their STX for a reward period (approximately two weeks), run or support a full node, and send useful information on the network through STX transactions. STX holders who actively participate in Stacking will receive Bitcoin rewards for that cycle.

1. PoX miners bid on the Bitcoin layer to become the leader of the next block. They participate in the bidding by spending Bitcoin and are rewarded with STX tokens.

2. Once PoX miners win the leader bid, they will start creating new blocks and adding them to the Stacks layer. This process is achieved through chain anchoring, which binds information in the Stacks blockchain to information on the Bitcoin blockchain.​

3. In the Stacks layer, the new block contains all the latest transactions and status changes. These transactions and state changes are broadcast to the entire network and verified and confirmed by other nodes.

4. Once a new block is confirmed, it is added to the Stacks blockchain and all relevant parties can see the latest status.

The interaction between the Stacks core layer and the Bitcoin layer is achieved through a process called "chain anchoring." Chain anchoring is the process of binding information in the Stacks blockchain to information on the Bitcoin blockchain. This process ensures that all transactions and state changes that occur in the Stacks network can be traced back to the Bitcoin blockchain and can be proven to be recognized and protected by the Bitcoin network.

Specifically, each Stacks block contains a hash that points to the previous Stacks block and a pointer to the previous Bitcoin block. This hash is generated by combining the hash of the previous Bitcoin block with the hash of the previous Stacks block. This way, each new Stacks block will contain a hash in its header pointing to the previous Bitcoin block, tying the two networks together.

How is PoX different from Proof of Stake (PoS)? The first difference is that miners and stakers are not the same entity, whereas in PoS they can overlap. Additionally, miners actually spend tokens to participate in miner elections, while validators in PoS help achieve consensus by binding their capital in the form of native tokens. Contrary to the PoS blockchain, the Stacks blockchain can be forked because it is not affected by the "weak subjectivity" problem. Weak subjectivity means that no miner/validator can identify the "correct" chain without trusting other nodes. The ability to fork allows the blockchain to survive severe failures that could severely impact the functionality of the PoS chain. Finally, participants participating in the consensus (i.e. stakers) are rewarded in a different token (BTC) than the token locked in the blockchain (STX).

How does Stacks compare to its peers?

The projects that can be considered closest to Stacks are Liquid Network, Lightning Network and RSK. However, Stacks represents a uniqueness that differs from each of these three projects in the following characteristics:

•Stacks the history of blocks stored on Bitcoin. This makes the Stacks blockchain different from sidechains like the Liquid Network by giving Stacks a higher level of security. A malicious attacker who creates a private fork on Stacks would expose themselves before the Stacks block is finalized on the Bitcoin blockchain. Honest miners can then take action to stop the attack.

•STX tokens are not pegged to BTC. Unlike the Liquid Network, the value generated on the Stacks blockchain acts as a security without providing incentives to maintain the peg between Bitcoin and sidechain tokens.

•Stacks transactions are independent of Bitcoin transactions. Since Stacks is not a layer 2 solution like the Lightning Network, its utility extends beyond pure scalability improvements to Bitcoin

•Stacks miners are independent from Bitcoin miners. This makes Stacks different from merged mining chains like RSK, whose network security relies on a subset of Bitcoin miners, which in some cases may become a single entity with significant decentralization aspects. significance.​

Ecological situation

Stacks was originally an open source project initiated by Bitcoin builders. The developers behind it have extensive experience in building applications and protocols based on the Bitcoin network. There are now more than 30 independent entities and developers. Stacks is currently the BTC L2 The most ecologically rich among the projects. As of March 2023, the official website lists a total of 88 projects, including 8 key projects.​

Then let’s look at the token distribution:

The total number of tokens is 1.818 billion, and they have all been unlocked. The current currency price is around 0.6 US dollars, and the peak price in 2021 was 1.3 US dollars. In fact, its decline this time is not like other currencies, which has dropped 90%. , but only about half. This shows that his resilience is quite good, and the project team’s own ratio is not high, only 3.8+6.6+7.4=17.8.

The current TVL on the chain is 35 million US dollars, which has increased recently due to BRC20. This data is actually very average.

 

In conclusion, there is huge room for development in BTC’s L2 project

The number of BTC currently cross-chained to the Ethereum network through various solutions is approximately 165,000. The top 100 BTC holding addresses marked by Binance Exchange’s BTC holdings total 375,000 BTC. BTC holders who are willing to bear the risk of centralized custody are also relatively receptive to BTC L2. Based on this, it is speculated that BTC L2 TVL can reach the level of 500,000 BTC under optimistic circumstances.

At present, the total number of BTC on Stacks is only 2,700, and the potential value of BTC has not yet been released. BTC L2 still has huge room for development. If the BTC L2 TVL can reach 500,000 BTC, then based on the current BTC price, a value of US$13.5 billion will be released, which is 3.7 times the current second-layer TVL of Ethereum. Stacks, as the most prosperous second-layer project in the Bitcoin second-layer ecosystem, may be the biggest beneficiary.