DeSpread

Posted on Nov 15, 2022Read on Mirror.xyz

Stacks 2.1 Upgrade is Approaching — Enhanced Connection between Stacks & Bitcoin

Written by GM Chung, Co-founder & CEO @DeSpread

The release of the Stacks 2.0 mainnet on January 14, last year, marks the advent of the era of the smart contract layer for Bitcoin. Based on a new consensus mechanism called Proof of Transfer (PoX), Stacks 2.0 has provided a new layer of transaction verification method using the liquidity of Bitcoin, enabling participating users of this process to gain new access to the largest and most decentralized capital funds in the crypto market called Bitcoin. In addition, the smart contract language called Clarity shows that it is able to safely build cases such as decentralized finance and NFTs on top of Bitcoin while also validating that the security benefits of Bitcoin can be availed of, and the utility of Bitcoin scaled up.

However, unlike the ideal realization by Stacks 2.0 mainnet, flash blocks generated by the unexpected activity of the Bitcoin chain, a rather high mining entry barrier, a stacking mechanism that degrades the user experience, and the Clarity API, which embodies only fragmentary functions yet, have been obstacles to the growth of the Stacks chain, which touts high connection with Bitcoin.

*Note: The approaching 2.1 upgrade does not include the scalability of the Stacks chain, and subnets are being developed as a related layer-2 solution.

Stacks 2.1: Enhanced Connection with Bitcoin

Stacks 2.1 is an important network upgrade version that has been prepared for the past two years since the mainnet rollout. Stacks 2.1 is slated to be released in the fourth quarter of 2022. This upgrade is prepared to significantly improve connection with Bitcoin, PoX mechanism, and Clarity smart contracts and will constitute a major solution to the above issues.

Then let’s examine the major changes and improvements resulting from the 2.1 upgrade and the corresponding impacts.

1. Stacking mechanism improvement

Proof of Transfer (PoX)

Through stacking, a unique feature of Stacks that differentiates it from other chains, users lock up the Stacks chain native token $STX to the network and earn native $BTC used (transferred) by miners in the Proof of Transfer (PoX) consensus process. Although it can be viewed as being like the Proof of Stake (PoS) reward method, a highly differentiating aspect is that one receives a different type of asset from the locked-up asset. This stage of stacking has the following characteristics:

• PoX -> PoB (Proof of Burn) conversion according to chain activity (i.e., PoX termination)

• Changes in the minimum participation amount depending on the amount of STX lockup in the network

• The number of locked STX tokens is static until stacking ends.

• A cooldown phase (wait time) for the subsequent participation when terminating stacking.

During the Stacks 2.0 mainnet rollout process, it could be observed that they wanted to introduce the proof of burn (PoB) as a consensus model for the initial Stacks mainnet. However, contrary to the purpose of introducing the PoB model with a more direct result to the issuance of Bitcoin by burning Bitcoin in the consensus process of Stacks at the time, public opinion in the community has heavily favored the use of Bitcoin for initial network activation rather than burning. As a result, today’s PoX consensus mechanism was employed for the initial bootstrap of the Stacks chain, but now, two years after the mainnet rollout, it is on track to transition to the PoB model.

However, with this upgrade, the Stacks core developers have again reflected the community’s opinion that acquiring Bitcoin through PoX is well-known as a unique differentiator for Stacks. Therefore, the approaching upgrade will remove the sunset phase (that is, PoX forever by default) that converts to PoB, with the prospect of further maintaining the current PoX model and deciding to convert to PoB through a separate community consensus in the future.

Subsequently, there are major improvements for the previously inefficient stacking user experience. In stacking, the minimum amount for participation differs in each stacking cycle depending on the total amount of STX lockup in the network. In the current stacking contract, once the lockup amount is determined at the time of participation, the amount cannot be changed until its termination. As a result, despite already participating in the stacking, there have been situations in which participation in the next stacking cycle does not occur against their intentions due to the minimum quantity condition that changes with each cycle. Also, for participation in stacking to even continue just before the selected cycle ends, one must pass a single unlock process and cooldown phase (wait time) before rejoining stacking. The cooldown phase lasts about two weeks and is as a factor in yield loss and complexity of the contract for protocols or users that use PoX as a yield generator.

The 2.1 upgrade addresses all these stacking inefficiencies at once. The new continuous stacking function to be rolled out will allow one to reapply for stacking participation in the ending phase without going through a two-week cooldown phase. A function to add a lockup amount (fine-grained lockup) will reduce the number of cases of losing yield from normal stacking participation not occurring due to the change in the existing dynamic minimum amount of participation. In addition, the function of “reclaim if no reward slots” for unused STX tokens that do not obtain slots through stacking participation will better preserve capital liquidity that is unnecessarily lost from the participants’ standpoint.

2. Mining mechanism improvement

OnStacks mining monitor

The Stacks network is an open membership system for anyone to participate in, allowing anyone with Bitcoin can participate in the mining process. With a structure very similar to the proof of work (PoW), PoX mining has the following characteristics:

• Bitcoin and Stacks full node setup required for mining

• When mining is successful, block compensation is paid after about 24 hours (100 blocks) through signed wallets

• Synchronization of block reward halving with bitcoin halving

• Bitcoins used for mining are transferred to the two stacker bitcoin wallets.

For individuals looking to participate in this process, no separate hardware equipment is needed, but employing a software setup such as building a full node with Bitcoin and Stacks is essential. In addition, since mining requires long-term competition based on significant capital infusion, individual participation can be cost-prohibitive. Currently, this is a major factor making it difficult for the Stacks network to attract many miners.

For the above reasons, the current mining mechanism is rather centralized (a small number of miners participating) due to high entry barriers, with a “decentralized mining pool” being proposed as a promising alternative to solve this problem. Notably, this 2.1 upgrade provides two key building blocks to implement this as follows: 1) Block reward wallet address selection function and 2) Taproot UTXO application in the mining process.

*Hypothetically, it is possible to implement a centralized mining pool even in the current 2.0 version.

In 2.1, one can receive rewards with either a contract address or a simple cold wallet address as a mining block reward wallet address. That is, the STX tokens obtained as mining rewards can be directly and proportionally distributed to pool participants through the contract without third-party intervention. In addition, owing to the Taproot UTXO, lower Bitcoin transaction fees can be incurred, while the Bitcoin transmission route of individual participants can be verified using the Taproot key, allowing for the formation of an efficient and decentralized mining pool.

3. Rolling out a new Clarity function

Stacks has an exclusive ability to read Bitcoin status through the Clarity language. However, the functions of the Clarity API that have been used since the 2.0 release so far are still in the early stages, with the following new functions to be added through this 2.1 upgrade:

Function 1. Increasing Bitcoin transaction usage

Explaing the Stacks 2.1 Network Update 

Function 2. Increasing Stacks of blockchain data usage

Explaing the Stacks 2.1 Network Update 

Function 3. Expanding off-chain data collection functionality

Explaing the Stacks 2.1 Network Update 

When the above functions are rolled out in a complex way, data manipulation on the chain, including bitcoin transactions, gets easier. Notably, with the PoX contract being moved to readily track PoX reward-related data, it will be possible for developers to develop various derivative products using stacking. In addition, the ease of bringing off-chain data to the Stacks chain will serve as a stepping stone to roll out multi-chain bridges and oracle solutions that are designed to provide diversity to the ecosystem.

*Currently, Orbit Bridge, Allbridge, and Magic Protocol are slated for release with the rollout of the 2.1 upgrades as bridge solutions.

4. Supplementing network stability

Going forward, a stable network environment is essential to well improve the stacking and mining mechanism through the 2.1 upgrades and enhance the diversity of Clarity smart contracts. After the release of the Stacks 2.0 mainnet, an unexpected side effect of network performance degradation was discovered, and the two bugs having the biggest impact are given as follows:

• Miner penalty due to median sortition logic error

• Flash block caused by Bitcoin’s sudden action

Basically, the miners who maintain the Stacks network must keep on using Bitcoin. As a result, miners often get BTC by re-stacking the STX rewards obtained through mining and reducing the BTC they must spend through what is referred to as discount mining. However, due to omissions caused by a bug in the current median sort of calculation method, there is a large difference between the amount of STX reward obtained and the minimum amount for participating in stacking, resulting in severe penalties for miners. This is one of the top improvements to the 2.1 upgrade, which will provide miners with high mining continuity.

Another bug involved the case where if two blocks were created simultaneously on the Bitcoin chain due to flash blocks occurring, stacks miners would miss the chance to mine those blocks, contrary to what was considered at the time of the design of the Stacks 2.0 mainnet. Notably, when flash blocks occur in the PoX preparatory stage, it turns out that the value that determines how much consensus is reached among miners in PoX rewards becomes low and thus has a negative effect on the Bitcoin rewards brought to the network. Accordingly, the 2.1 upgrade provides network immunity to flash blocks, which should significantly improve the overall efficiency of the network.

In addition, by improving the smart contract runtime cost, it gets easier to implement a contract that requires iterative processing, while the improvement of multi-signature provides convenience for the contract signing order.

Conclusion

Given that blockchain network growth is achieved through direct communication with the community in contrast to the existing centralized networks we are more familiar with, this is significant. After their rollouts, both Stacks and the mainnet have been subject to many discussions through forums to solve problems that occurred in the network, with the results soon coming to fruition.

Once the upgrade is ready for release, voting for the network upgrade will be held through community-created https://sip015.xyz and https://stx.eco pages. Voting is passed when more than a certain consent quorum is reached, after which full-scale activation is pursued based on the open testnet and miners’ software upgrades.

Stacks 2.1 release timeline

Through this 2.1 upgrade, we hope that a more robust connection between the Stacks chain and Bitcoin is presented while ultimately creating a new launch point for ‘unlocking the potential of Bitcoin’ and ‘direct Bitcoin usage’ that the Stacks ecosystem pursues.

DeSpreadWebsite | Twitter | Telegram | Facebook | Dashboard

DeSpread is a multi-chain ecosystem builders founded by blockchain content creators to help projects to accelerate together with the sustainable ecosystem. Our mission is to establish strong ecosystem foundation for anyone through eye-to-eye communication and education.

BitcoinStacks