Stacks Nakamoto is upgrading, a butterfly ready to emerge.

CN
11 months ago

We can continue to pay attention to Stacks and observe whether it can truly become a Bitcoin L2 and effectively utilize the dormant BTC as a smart contract platform.

Disclaimer: The content of this report reflects the author's views, is for reference only, and is not a recommendation for buying or selling tokens or using protocols. Any content in this report is not investment advice and should not be understood as such.

Unveiling New Possibilities on the Bitcoin Network

In early 2023, "Ordinals" introduced to the Bitcoin network sparked a new debate on how to treat the network's block space. In May of the same year, the demand for BRC-20 surged, causing a temporary inability of the Bitcoin network to process blocks, forcing the world's largest centralized exchange, Binance, to temporarily halt Bitcoin withdrawals.

The name "Ordinals" comes from the word "ordinal," meaning "numbers arranged in order," and it is a protocol created by Casey Rodarmor in January 2023, which adapted the Bitcoin script to enable the attachment of arbitrary data to the smallest unit of Bitcoin, known as "sats." The introduction of Ordinals allowed for the storage of text, images, voice, video, and code on the Bitcoin blockchain, naturally leading to the emergence of many PFP and NFT projects in the Bitcoin ecosystem, similar to Ethereum (Learn more).

As of April 24, the top 10 NFT collections by market capitalization; Source: Coingecko

Now, over a year after the introduction of Ordinals, three NFT projects issued on the Bitcoin network have entered the top 10 in terms of NFT market capitalization (NodeMonkes, Runestone, and Bitcoin Puppets), demonstrating the potential as a viable smart contract platform.

Bitcoin L2 and Stacks

This has also led to a surge in L2 projects on the Bitcoin network. According to defillama's data, as of the writing of this article (April 15), there are 11 projects classified as "Bitcoin sidechains," with a total TVL close to 900 million USD. While there is controversy over whether these projects are actually considered L1 for the Bitcoin network, the rapidly growing TVL and number of projects reflect the increasing market interest in the Bitcoin narrative.

Among these projects, the recent development of Stacks is particularly unique. It is not only an OG project launched in 2017, but also has been aiming to introduce smart contracts to the Bitcoin network since 2021. In this article, we will explore the recent developments of Stacks and the upcoming major upgrade "Nakamoto Upgrade."

The Beginning of Stacks - Blockstack

Munib Ali's TED talk video in 2016; Source: TEDx Talks

In 2017, Dr. Muneeb Ali completed his degree, published a white paper on Stacks (then known as Blockstack), and successfully raised 52 million USD in a token sale on CoinList. Prior to this, he and his early team had directly built a protocol and application called Onename on the Bitcoin L1, which could create decentralized identities and profile pages on the Bitcoin network. These experiences helped shape the idea of Stacks in 2017 and inspired the team to create a more powerful platform.

Blockstack noticed the overreliance of the existing internet on centralized data storage and management, and aimed to use blockchain technology to create a decentralized network, giving users sovereignty over their own data and creating a blockchain layer for developers to easily build dApps, similar to Ethereum.

In 2019, the token of the Blockstack ecosystem, Stacks (STX), received approval from the U.S. Securities and Exchange Commission (SEC) under Regulation A+, successfully raising 23 million USD. This was the first token sale approved by the SEC, attracting considerable market attention.

From 2018 to 2020, the Stacks team focused on building a solid project infrastructure. Stacks is a cross-chain consensus blockchain seamlessly integrated with the Bitcoin network, aimed at enabling programmable features on Bitcoin. The team also developed the custom programming language Clarity for Stacks. During this period, Stacks raised funds from prominent investors such as Union Square Ventures, Harvard Endowment, Winklevoss Capital, and Naval Ravikant.

Stacks 2.0

"I think Bitcoin is the best, most decentralized monetary layer. Currently, 1% of all circulating Bitcoin is issued on Ethereum in the form of wrapped Bitcoin (wBTC), which means users need to use Bitcoin in smart contracts. Instead of wrapping Bitcoin in some smart contract platform, why not bring smart contract functionality to the Bitcoin network?" -- Excerpt from 『Bitcoin DeFi? It's a Thing, Says Stacks Founder Muneeb Ali, Decrypt』.

In January 2021, Blockstack launched the Stacks 2.0 mainnet, becoming the Stacks network. As indicated in Muneeb Ali's interview, the starting point of Stacks 2.0 was to bring smart contract functionality to the Bitcoin network without modifying Bitcoin. The design of this chain inherits the decentralization and security of the Bitcoin network while adding smart contract functionality to improve the network's scalability.

Proof-of-Transfer (PoX)

Proof of Transfer Process; Source: stacks.co

Stacks' consensus mechanism - Proof of Transfer (PoX) can be seen as an extension of Proof of Burn and is crucial for inheriting the security of the Bitcoin network. Proof of Burn refers to a consensus mechanism in a Proof of Work (PoW) environment, where cryptocurrency is burned to mine.

Unlike the "Proof of Burn" where miners burn Bitcoin, in "Proof of Transfer," miners send Bitcoin to STX holders participating in the Stacking process. Miners can participate in the mining process by running Stacks nodes, and Stacks nodes use the Bitcoin network as an anchor chain to generate and mine blocks. The Proof of Transfer mechanism is as follows:

  • Registration: Miners register as candidate miners by sending consensus data to the network.
  • Commitment: Registered miners participate in mining by sending Bitcoin to STX token holders.
  • Election: Miners are selected using a Verifiable Random Function (VRF), and the selected miner creates a new block on the Stacks blockchain.
  • Assembly: The selected miner creates the block and receives STX tokens as a reward.

Miners selected through the election process are required to record the hash values of all new transactions on the Stacks chain in the Bitcoin block and follow the Proof of Transfer to complete the incentive system for Bitcoin miners and Stacks chain maintainers. The operation of "Stacking" is similar to "Staking" on a Proof of Stake (PoS) network, with the difference being that Stacking involves locking STX to receive tokens anchored to BTC as a reward. The specific roles of miners and Stackers are shown in the following diagram:

Roles of miners and Stackers; Source: stacks docs

[Miners]

  1. Miners send BTC to Stackers to receive transaction fees and block rewards in STX.
  2. The probability of each miner being selected through VRF is determined based on the proportion of BTC sent by the miner.
  3. The selected miner wins the right to create new blocks and propagate microblocks on the Stacks chain.
  4. The selected miner receives STX and transaction fees as block rewards.

[Stackers]

  1. Stackers lock their STX for a certain period.
  2. They can choose to independently Stack or pool with other Stackers.
  3. Stackers provide their BTC address to receive BTC rewards, and the probability of receiving rewards is proportional to the amount of locked STX.
  4. The locked STX for Stacking is unlocked after the initially set lock period ends.

Bitcoin L2?

The significance of Stacks 2.0 lies in enabling Stacks to function as a smart contract platform on the Bitcoin network with the launch of the mainnet and the introduction of the Proof of Transfer mechanism. However, there is some controversy over calling it L2 on the Bitcoin network.

  • Stacks 2.0 has its own token and an independent security budget, which is fundamentally different from the Bitcoin network.
    • Security budget: Resources allocated for maintaining network integrity, including mining reward funds, operational costs, network fees, etc.
  • In L1, assets are not deposited or withdrawn by security and validators, as in Ethereum and other ecosystem L2s.

For these reasons, it is difficult to categorize Stacks 2.0 as traditional L2. However, Stacks also cannot be classified as a sidechain, as transactions on the Stacks chain ultimately have to settle on the Bitcoin network. The unique structure of the Stacks chain led Stacks co-founder Muneeb Ali to refer to it as "Layer 1.5" in a Decrypt interview in 2021.

Since the Bitcoin network was not originally designed as a smart contract platform, initiatives to introduce smart contracts or improve scalability have not been as successful as Ethereum and EVM chains. Referencing the article "BITCOIN LAYERS - Tapestry of a Trustless Financial Era" published by Spartan Group in December 2023 can provide further insight into the differences between Bitcoin L2.

The three dilemmas of Bitcoin L2; Source: BITCOIN LAYERS — Tapestry of a Trustless Financial Era

As shown in the above image, the three dilemmas of Bitcoin L2 include:

  1. Open Network: Adoption of an open network rather than a consortium model.
  2. No New Token: No introduction of new tokens.
  3. Full VM/Global State: Adoption of "Global State" rather than a limited off-chain contract form.

Stacks can be seen as meeting conditions 1 and 3, but it does not meet condition 2 for a Bitcoin L2 solution. In contrast, the Lightning Network meets conditions 1 and 2, but due to the use of "local consensus" to record transactions on a peer-to-peer network separate from the main chain, it does not meet condition 3.

Moving towards Stacks 3.0, Nakamoto Upgrade

Existing Issues with Stacks

The unique structure of the Stacks chain, as mentioned above, is the reason Stacks can function as a smart contract platform on the Bitcoin network, but it also brings some issues to the system, including:

  • Security Model

    • The Stacks chain has an independent security budget, defined by BTC paid by Stacks miners, unlike the security budget of the Bitcoin network.
    • This makes the security of the chain highly dependent on the budget of Stacks miners, increasing the possibility of security risks.
  • Performance and Scalability

    • The connection structure between the Stacks chain and the Bitcoin network (such as the Proof of Transfer mechanism) helps improve decentralization and security but limits on-chain performance and scalability.
    • Particularly, the process of creating new blocks through miner elections links the block generation cycle of the Stacks chain to the Bitcoin network, resulting in very high transaction confirmation delays.
    • This is not only a user experience issue but also the root cause of difficulty in Stacks dApp development.
  • MEV Issue

    • Bitcoin miners with a significant proportion of Bitcoin hash rate can review commitment transactions sent by other Stacks miners in the Bitcoin blocks they mine (transactions where BTC is sent to participate in STX mining), ensuring they receive Stacks rewards and transaction fees.

Main Goals and Design Changes

Main Goals

The Nakamoto version is a major upgrade planned for the Stacks chain this year to address the above-mentioned issues and improve the performance and security of the chain.

  • Fast Blocks

    • The time for user-submitted transactions to be mined and confirmed within a block is reduced from several tens of minutes to a few seconds.
    • After the Nakamoto upgrade, by separating the miner election process from the block generation mechanism, miners are allowed to generate multiple blocks before the next miner election process.
  • Transaction Security through Bitcoin Finality

    • Transactions on the Stacks chain are secured by the hashing power of the Bitcoin network.
    • This means transactions are settled on the Bitcoin network, ensuring the immutability of transactions on the most secure network.
  • Improved MEV Resistance

    • The BTC bidding mechanism to obtain STX rewards has been improved to address the MEV issue during the miner election process.
    • The miner election algorithm has been changed to remove the advantage of Bitcoin miners over Stacks miners.

Changes to Block Generation Mechanism and Stacker Role

Before the Nakamoto upgrade, the ratio of blocks generated on the Stacks chain to Bitcoin blocks was fixed at 1:1, resulting in slow block generation and transaction confirmation times.

After the Nakamoto upgrade, the mechanism of "Tenure-based block production" will be introduced to speed up block generation. A block on the Stacks chain is no longer directly tied to a Bitcoin block but allows miners to generate multiple Stacks blocks within their tenure (i.e., within the Bitcoin block generation cycle). This mechanism reduces block generation and confirmation time to around 5 seconds, significantly improving the scalability of Stacks.

The blocks generated at this time will be verified by Stackers. Before the Nakamoto upgrade, Stackers only locked (Stacking) STX tokens to contribute to the economic security of the Stacks network. However, after the Nakamoto upgrade, Stackers will take on the role of signers, responsible for verifying, storing, signing, and propagating each Stacks block generated during the miner's tenure. The interaction between miners and Stackers is shown in the following diagram:

Interaction between miners and Stackers (or signers) after the Nakamoto upgrade; Source: stacks docs

  1. Miners send BTC to Stackers to participate in the Stacks miner election process.
  2. When a new miner is elected, a "tenure change" transaction occurs, granting the new miner a new tenure.
  3. During the process of creating and verifying blocks per second, miners must collect signatures from Stackers.
  4. Block validation requires at least 70% of Stackers to sign the block.

As shown in the diagram, miners require signatures from Stackers to create the next block, and Stackers need to sign to receive rewards under the Proof of Transfer mechanism and unlock the STX tokens they are Stacking.

Changing Chain Structure to Achieve Bitcoin Finality

During the tenure change (or miner election) period, signers (Stackers) prevent miners from arbitrarily forking the Stacks chain by only signing the most recently generated block. This means Stackers are responsible for supervising miners, verifying previously generated blocks, and ensuring new blocks are based on the latest block generated.

Additionally, when submitting transactions (tenure change transactions), miners must include an indexed block hash, which includes the hash value of the first Stacks block recorded in the previous tenure and the hash value of the block itself. This ensures that the state of the Stacks blockchain is recorded in Bitcoin blocks, with each miner performing the same work, ensuring the continuous recording of the history of the Stacks blockchain on the Bitcoin network.

Relationship diagram between Bitcoin blocks, Stacks blocks, and inventory maps; Source: stacks docs

Therefore, the relationship between Stacks blocks and Bitcoin blocks is as shown in the diagram. Transactions submitted on the Stacks chain during the Nth period will be written into Bitcoin blocks in the N+2 period, achieving Bitcoin finality. From the user's perspective, the structure of the chain is similar to what we know as L2, with transactions confirmed within a few seconds, while settlement on the Bitcoin network takes about 30 minutes.

This system also brings positive changes to the security budget of the Stacks chain. The mechanism for Stacks block validation occurs through signatures from at least 70% of Stackers, increasing the security budget of Stacks by up to 70% of Stacking assets. Once transactions are settled on Bitcoin, the security budget can reach up to 51% of Bitcoin's mining power.

In summary, the mechanism of Stacks after the Nakamoto upgrade:

  • When miners submit tenure change transactions, they must include an indexed block hash with the hash value of the first block recorded in the previous tenure.
  • Signers will force miners to generate the next block based on the last block signed in the previous tenure.
  • Transactions submitted in the Nth tenure will be written into Bitcoin blocks in the N+2 tenure, achieving Bitcoin finality.

After the Nakamoto upgrade, the transaction speed of the Stacks chain will be greatly improved, while achieving Bitcoin finality to ensure the immutability of data. For users, this means faster transaction confirmation speeds, and for the system, it means getting closer to a true Bitcoin L2, inheriting the security of Bitcoin.

Addressing the Bitcoin MEV Issue

Before the Nakamoto upgrade, the MEV issue in the Stacks chain mainly occurred in the following ways. Bitcoin miners with a significant proportion of Bitcoin hash rate, such as F2Pool, could review commitment transactions submitted by other Staking miners in Bitcoin blocks to adjust their bid amounts, ensuring they receive block rewards and transaction fees. This behavior reduced Stakers' BTC rewards and undermined trust in the mining process.

The Nakamoto upgrade introduces several new miner selection criteria to improve the fairness of the block mining process.

  • Miners' recent participation in blocks

    • Miners must have a record of participating in the recent 10 blocks to be eligible for selection during tenure change.
    • This criterion can promote stability in the miner community and prevent attempts to steal block rewards.
  • Median of Past Bids Method

    • The probability of miners being selected is calculated based on the median of all BTC bids recorded in the past 10 blocks.
    • This criterion prevents miners from obtaining block rewards by submitting abnormal bids.
  • Absolute Bid Total

    • The miner selection process is based on stable economic standards, considering the absolute value of the bid total rather than bid variables based on the immediate mining environment.

By introducing these MEV prevention standards, the Nakamoto upgrade will increase the transparency and trustworthiness of the Stacks blockchain mining process.

Planning for the Nakamoto Upgrade

Nakamoto upgrade roadmap; Source: nakamoto.run

Since the release of sBTC and the Nakamoto whitepaper at the end of 2022, the Stacks Foundation and related developers have been working on the Nakamoto upgrade for a long time. As shown in the above diagram, since the features of Nakamoto were finalized in February 2024 and integrated into the testnet (referred to as Nakamoto Milestone 0.3, codenamed Argon), the updates for the Nakamoto upgrade have been progressing rapidly. The first phase of the Nakamoto upgrade is now live on the mainnet, and further upgrades will be rolled out.

The Nakamoto upgrade consists of two phases, each involving a hard fork. The process is divided into "Instantiation" and "Activation" stages, allowing time for final adjustments after the Nakamoto update before full activation, such as bug fixes to eliminate disruptions caused by changes in the on-chain environment.

Original Plan

  • Phase 1: Instantiation (Started on April 22)

    • POX-4 (an upgraded version of the Proof of Transfer mechanism) contracts and most of the code included in the Nakamoto version will be applied, but the features will not be enabled.
    • At least two Stacking cycles will be left for signers and partners to register the POX-4 contract. During this period, it will be verified whether signers registering the POX-4 correctly validate blocks and determine if they can enter the activation phase.
  • Phase 2: Activation (Expected to take place between May 15 and May 29)

    • This phase will apply the Nakamoto update, including the system based on signers, fast blocks, and Bitcoin finality, and activate Nakamoto rules.
    • Nakamoto rules refer to the overall logic that distinguishes before and after the Nakamoto upgrade.

Nakamoto release schedule; Source: Nakamoto Launch: Testnet and Mainnet Rollout Overview

Planned Changes

The first phase of the upgrade (Instantiation) started on April 22, and assuming no major bugs are found and instantiation is completed, the second phase was planned to start in mid-May. However, after the start of the first phase, some defects were discovered in the signer resiliency/recovery system, leading the Stacks Foundation to announce a modification to the original plan on May 1. The key points are as follows:

  • The initial activation phase of the Nakamoto upgrade only included a basic signer recovery system.
  • The plan to upgrade to an advanced signer recovery system was to be deployed at the end of 2024 after the Nakamoto upgrade activation, but after signers were onboarded and made progress during the instantiation phase, it was determined that an advanced signer recovery system was needed.
  • Therefore, an additional 8 weeks of development time will be added before the Nakamoto upgrade activation phase. The signer recovery system code will be completed on July 15, and the Nakamoto upgrade version will be activated on August 28.
  • Work includes:
    • Enhancing miner recovery capabilities for signer timeouts and errors
    • Strengthening signer response and processes for key loss situations
    • Improving the creation and extension of miner tenures
    • Improving prevention of network uncertainty and flash block handling

Revised Nakamoto release timeline; Source: stacks.org

According to the revised plan, code development will be completed on July 15, 8 weeks later, and the activation phase of the Nakamoto upgrade, originally scheduled for mid-May, will now begin approximately 3 months later on August 28. The good news is that the sBTC upgrade scheduled for the third quarter will not be delayed and is expected to take place in the fourth week after the activation phase begins.

sBTC - The Final Puzzle Piece for L2 Implementation

The Nakamoto upgrade is expected to be fully activated in May, with the aim of significantly improving the performance of the Stacks chain and achieving Bitcoin finality for Stacks blocks. However, to truly become an L2 for the Bitcoin network, the Nakamoto upgrade is only half the success.

Differentiating standards for Bitcoin L2; Source: light tweet

After the Nakamoto upgrade, Stacks will have an environment similar to Sovereign Rollup. However, it is only when the native asset BTC of the Bitcoin network is brought into the chain and utilized that it can function as a true Bitcoin smart contract platform and L2. Stacks founder Muneeb Ali stated in the same tweet that moving BTC in and out of the Bitcoin Layer is the hardest part and explained that sBTC is the closest trustless bridge solution, a decentralized public group of signers that can peg BTC without modifying the Bitcoin L1.

sBTC bridges the BTC asset between the Bitcoin network and the Stacks chain based on two main attributes

  • 1:1 Redeemability: sBTC and BTC can always be redeemed at a 1:1 ratio unless the Stacks chain ceases to operate.
  • Open Membership: Anyone can join the sBTC protocol, and no centralized entity can control BTC.

Previously, there were BTC-related assets on the Stacker chain, such as xBTC and aBTC, similar to Ethereum's wBTC (wrapped BTC), but they were based on bridging through centralized custodians requiring multi-signature. sBTC, on the other hand, uses Stacker as a group of signers in a trustless manner to bridge BTC through the Proof of Transfer mechanism.

How sBTC works (1); Source: stacks docs

How sBTC works (2); Source: sbtc.tech

The update and implementation plan for sBTC is scheduled for the third quarter of 2024. The Nakamoto upgrade and the sBTC update are key milestones for Stacks as it ambitiously aims to become the preferred smart contract platform for the Bitcoin network. We can continue to monitor Stacks to see if it can truly become a Bitcoin L2 and effectively utilize the dormant BTC as a smart contract platform.

Source: BITCOIN LAYERS — Tapestry of a Trustless Financial Era

References>

免责声明:本文章仅代表作者个人观点,不代表本平台的立场和观点。本文章仅供信息分享,不构成对任何人的任何投资建议。用户与作者之间的任何争议,与本平台无关。如网页中刊载的文章或图片涉及侵权,请提供相关的权利证明和身份证明发送邮件到support@aicoin.com,本平台相关工作人员将会进行核查。

Share To
APP

X

Telegram

Facebook

Reddit

CopyLink