Decentralized Stacking Pools: Testnet Launch
Published by Rick Bartelink and Mitchell Cuevas on September 6th, 2023
With sBTC, the world will be introduced to powerful, programmable Bitcoin. sBTC will be the first Bitcoin-backed asset that allows developers and users to take their bitcoin and leverage it within a powerful, expressive, and decentralized layer (complete with smart contracts)!

This process relies on an economically incentivized group of open membership ‘signers’ to validate sBTC transactions. If and when sBTC is released on the Stacks mainnet, what are Stackers today, take on this extra responsibility to ‘sign’ sBTC transactions, and become ‘signers’ in addition to Stackers (and of course, still earn BTC for their efforts).

Being an ecosystem that’s ever-committed to decentralization, it's important that there are numerous options for Stacking such that this signing activity remains as decentralized as possible.

Enter: Decentralized Stacking Pools

Decentralized Stacking Pools will be an exciting addition to a lineup of Stacking options that already include various forms of centralized Stacking pools, non-custodial pools, and fully decentralized self-Stacking options.

Decentralized Stacking Pools

Working on a Critical Bounty with the guidance of the sBTC Working Group, the Degen Lab Team has built not only an open-source framework for Decentralized Stacking Pools, but is also introducing the first user-ready one now!
Instead of a centralized Stacking provider, Decentralized Stacking Pools are a Stacking solution that can be initiated by anyone. The process is automated via smart contracts. Two parties are involved: the liquidity provider and the participants. The liquidity provider deploys a smart contract that will possess and handle all of the Stacking Pool’s functionalities. As the name implies, the liquidity provider’s main job inside the pool is to provide liquidity to ensure that the rewards of future pool participants are safely covered in advance.

Participants are the people Stacking inside of the liquidity provider’s pool. Before choosing a stacking pool, a participant should critically evaluate whether a pool has enough liquidity locked to distribute rewards after the cycle ends. The Degen Lab pool will have around 10,000 STX, but anyone can setup a pool with the code if they want to. It's up to the stacker to determine whether a pool has sufficient funds. After choosing your stacking pool, the first requirement to Stack in a pool is to allow the desired pool contract caller to perform operations inside the pox-2 contract. After this, the stacker is able to join the pool and delegate the amount of desired tokens.

Distributing Rewards

During the cycle, when a reward is sent to the PoX address of the liquidity provider that deployed the contract, any pool participant is empowered to call a function that returns the amount of BTC (sats) transferred to that address and distribute the equivalent amount in STX from the smart contract deposit to the pool participants based on their weight in the pool’s total stacked amount. A percentage of the reward is shared with the smart contract’s liquidity provider as he locked the amount of STX to be redeemed by the other participants. This method allows the Liquidity provider to keep the BTC equivalent of the reward, while participants receive their share of the reward in STX.
If you want to know more about quitting a stacking pool, how rewards are calculated and distributed based on the delegated balance, and the rules for liquidity providers to recall extra funds or withdraw STX, you can view to the Decentralized Stacking Pool GitBook here.

STX-BTC Bridge

The STX-BTC Bridge provides the necessary liquidity for both the miners and the stackers without needing to go through centralized exchanges to exchange STX to BTC. This ensures there is enough balance available to facilitate trades for both parties, helping to maintain the stability and efficiency of the overall system. Since both parties want to exchange their assets with each other, the liquidity will remain balanced in both xBTC and BTC in the Magic Bridge and also a stable amount of xBTC in the DeFi pool the Bridge is using from. This balance is crucial for ensuring that trades can occur effectively and without any disruptions.

CoinFabrik Audit

With funding from the Stacks Foundation as part of the Critical Bounty, CoinFabrik worked with the Degen Lab team to perform a full security audit on the system. Wherever possible, we’re excited to support secure code and tooling within the ecosystem. The audit is complete and all known vulnerabilities have been effectively addressed by the Degen Lab team. You can find the full Audit here.

Join the Testnet

Visit the following step-by-step guide created by the Degen Lab team on how to join their Decentralized Stacking pool testnet. The Decentralized Stacking Pools are expected to go live by the end of next week but you can your hands on the testnet today. Follow the Degen Lab’s Twitter account to find out the exact date of the mainnet launch.

Drop in your email to stay in the loop on Stacks Foundation news