mattyTokenomics

Jan 0211 min read

Q4 2022 STX Mining Report

As of Dec 31 2022; Stacks Block 89,349
by @mattyTokenomics

Introduction

Stacks uses a unique consensus mechanism called Proof of Transfer (PoX) through which the Stacks chain ultimately settles to the Bitcoin blockchain. PoX is conceptually similar to Bitcoin's PoW. In PoW, miners spend electricity for a proportional chance to win a BTC block. In PoX, miners spend BTC (recycled electricity) for a proportional chance to win a STX block. Since mining STX involves sending native BTC transactions on the BTC chain, the very act of mining STX is the act of writing Stacks’ history onto the BTC chain itself.

In other words, via PoX, there is no other way to add transactions on to the Stacks chain history other than to write that history to BTC’s chain.

Settling to BTC's chain means Stacks inherits much of Bitcoin's security and immutability, however the decentralization of Stacks mining itself also plays a role in its security. If you’re interested in the finer details, you can learn more about PoX, how STX transactions settle to Bitcoin's chain, and Stacks' attack vectors from this PoX Twitter thread.

The BTC spent by STX miners in the PoX consensus mechanism is distributed to stackers, generating a native yield for holders of STX distributed in native BTC. Similarly to how the decentralization of STX miners plays a role in security, the decentralization of STX stackers plays a role in the security of sBTC - native BTC deployed on the Stacks chain. sBTC makes native BTC programmable without requiring trust in any centralized custodian, or federated network of centralized custodians, and without requiring an alternative L1 chain which does not ultimately settle to the Bitcoin chain itself (such as tBTC on ETH does). You can learn more about sBTC in particular from this sBTC Twitter thread.

This quarterly stacking report covers the current state of Stacks mining and is not intended as a deep dive into how PoX, mining, or stacking work. For more in depth reports on STX mining decentralization see this initial in-depth STX mining report from July 2022 or this SIP forum post for mining improvements.

You can also read the Q3 2022 STX Mining Report here.

Unless otherwise specified, this report covers the time periods below

  • Past Year: Q1 2022 - Q4 2022

  • Past Quarter: Q4 2022

1. Block Frequencies

While STX blocks aim to settle 1:1 to BTC blocks, and BTC blocks settle on average every 10 minutes, events such as flash blocks mean that occasionally there are BTC blocks with no STX blocks. As a result, STX blocks generally take slightly longer than 10 minutes.

Work in progress to bring subnets to Stacks, mainnet expected later in Q1 2023, which combine a) the security benefit of settling to the Bitcoin chain each BTC block, with b) the speed benefit of transaction finality in 1/10th the time.

Past Year Minutes per STX Block:  11.4
Past Quarter Minutes per STX Block:  11.4

2. Number of Unique Miners

Not every miner mines every block - this measurement looks at the number of unique addresses that have mined STX in at least one block during the time period in question.

Past Year Unique STX Miners:  71
Past Quarter Unique STX Miners:  26

3. Number of Typical Miners & >50% attack Miners

When people think of decentralization for mining, they typically think of two things:

  • The total number of miners in an average block

  • The number of miners required to execute a >50% attack (51% attack) in an average block

As a point of comparison, the largest 2 mining pools of Bitcoin mined more than 50% of blocks in December 2022, meaning (in theory) it would take 2 parties to collude. Recent stats of BTC mining pool hash power shares show a similar picture, with 2-3 pools required to collude to reach >50% of all pool’s hash power.

In BLUE, the total number of miners per block.
In
ORANGE, the number of miners required for a >50% attack.

Past Year Total Miners per Block:  6.9
Past Quarter Total Miners per Block:  5.8
---
Past Year Miners >50% Attack per Block:  3.4
Past Quarter Miners >50% Attack per Block:  2.7

During the past quarter, STX mining has become relatively more centralized. This is to be expected during a bear market for both BTC/USD and STX/BTC, but is comparable to Bitcoin’s degree of mining centralization, and improving mining decentralization is being taken seriously by the Stacks community. You can join the conversation here.

4. Gini Coefficient of Miner Activity

The Gini coefficient is a popular measurement for quantifying inequality. It ranges in value from 0 (perfect equality) to 1 (maximum inequality). Looking at the Gini coefficient of miner's commitments is another way of expressing the relative balance (or imbalance) of small miners vs large miners.

For example, if every STX miner was the same size, the Gini value would be 0. But if mining has heavily dominated by just a handful of miners, the Gini value would approach 1.

In BLUE, the Gini coefficient of miner commitments per block.

Past Year Average Gini Coefficient:  0.171
Past Quarter Average Gini Coefficient:  0.256

The increasing Gini coefficient in the past quarter, also reflects less miner decentralization. Want to help improve things? Get up to date on the latest proposals and involved here.

5. Number of Txs per Block

The number of transactions in an average block indicates the demand for transactions to be included in STX blocks. Just like BTC mining, STX miners earn revenues from a block reward, and from transaction fees. While fees (which we'll look at next) tell the most direct part of the story, tracking number of transactions can show if changes in fee revenue are healthy (due to more chain usage) or unhealthy (fees increasing due to congestion or other issues even though demand is not increasing).

In BLUE, the total number of processed transactions per block.

Past Year Average Txs per Block:  53.2
Past Quarter Average Txs per Block:  61.1

It remains promising for Stacks overall, that despite a bear market in BTC/USD and STX/BTC prices, usage of the STX chain has remained relatively constant, with a slight growth in the past quarter, helped by a flurry of BNS '.btc' domain name purchases.

6. STX Miner Fees as % of Total Rewards

Just like BTC miners, STX miners earn both a) a fixed block reward and b) a variable amount of fee revenue from the gas fees users of the network pay.

While gas fees are not inflationary, issuing block rewards to miners is inflationary. Miners need an incentive to mine - so if a blockchain is to become sustainable in the long run, with a near-zero rate of inflation, miner compensation must increasingly come from gas fees compared to block rewards. For example, BTC plans to fade out block rewards entirely (in about 2140), though the necessity of "tail emissions" is still a topic of debate, and at least some (albeit theoretical) evidence that fees can never fully replace the need for block rewards.

Regardless, the more revenues miners earn from fees as opposed to from block rewards, the more sustainable the chain is without requiring higher levels of inflation from block rewards.

In BLUE, the percent of total miner rewards earned from gas fees. A value of 50% would represent miners earning just as much in gas fees as they earn in inflationary block rewards.

Past Year Average Fees as % of Rewards:  0.88 %
Past Quarter Average Fees as % of Rewards:  0.5 %

While the total number of STX transactions has held constant or slightly increased in the past quarter, this has not translated into higher fee revenues for STX miners as a percent of total rewards. Increasing fee revenues for miners will require either some form of a) artificially setting a minimum transaction fee, or b) growing network usage even more.

Option A would be ill advised rather than a free market for transfer fees develop as network usage grows. There are, however, quite a lot of high impact releases in the near future of Stacks' roadmap that stand to enable much greater levels of network usage, including the introduction of sBTC, whose peg-in and peg-out transactions on the Stacks chain may increase both recurring network transactions and total transaction gas fees.

7. Miner Profit Margin

While an individual miners' profit ultimately depend on a variety of specific factors including how they mine, when they mine, other miners’ behavior's, market forces, and random chance, we can objectively quantify the aggregate profit margin that miners in total are earning.

To mine STX, miners spend sats (BTC), and earn STX in block rewards and gas fees. By denominating their STX rewards in sats (BTC) at the market value of the time they earn the rewards we can track profit margins as:
(Sats Rewards Earned - Total Sats Spent) / Total Sats Spent

For example a value of 10% indicates that for every 100 sats spent on mining (including BTC gas fees), miners are earning 110 sats in rewards.

In BLUE, the aggregate profit margin miners earn per block.

Past Year Average Profit Margin:  12.4%
Past Quarter Average Profit Margin:  9.9%

Overall, profit margins have been lower this past quarter than the past year - somewhat expected during a bear market for both BTC/USD and STX/BTC.

And yet even despite these rough market conditions, during Q4 profit margins still averaged nearly 10% for miners, and ended 2022 at virtually that same level.

If you are a BTC miner that would like to more about STX mining, please get in touch via Twitter, Discord, or Telegram.

8. BTC (or USD) Required to Breakeven for 1 Cycle

One of the biggest deterrents to new miners starting to mine STX is the initial capital requirements to do so. This is because miners of STX must not only bid native BTC for a chance to win each block, but also spend BTC gas fees on those native BTC transactions each block. These costs can add up for individual miners over the course of a full STX cycle (2,100 STX blocks).

For example, if BTC gas fees are 5,000 sats per block (0.00005 BTC per block), then bidding on each block in a 2,100 block cycle would cost 0.0105 BTC in gas fees alone. Mining profitably would require spending even more BTC, as the profits of mining must overcome the “fixed cost” of Bitcoin network gas fees.

Past Year BTC Required to Breakeven 1 cycle:  1.18
...in USD at current BTC/USD:  19,521
Past Quarter BTC Required to Breakeven 1 cycle:  0.81
...in USD at current BTC/USD:  13,406

Work is in progress to enable non-custodial mining pools (2.1 adds support for several critical requirements), but for now, trustless mining pool are not yet possible. While capital requirements have come down considerably for new miners to breakeven (dropping nearly 50% since Q3 2022), mining profitably above breakdown would require even more capital than required to breakeven.

This cost remains a large deterrent to additional miners joining - a specific deterrent that non-custodial mining pools will go far to address. There is currently grant funding available for parties interested in building, maintaining, and/or operating non-custodial mining pools.

Conclusion

The bear market for crypto continued in Q4 - certainly FTX’s implosion did not help. Given the decline in BTC/USD and STX/BTC, it's expected that STX mining would become a bit less decentralized.

Positive signs remain though. Mining profit margins remained at nearly 10% in Q4 on average, and ended 2022 at that level. Furthermore, usage of the Stacks network as measured in number of transactions held steady and even slightly grew on average during Q4.

Finally, a number of significant features from the roadmap are expected or Q4 2022 - Q1 2023, such as Stacks 2.1, subnets, and sBTC, which contain necessary features to support non-custodial mining pools and facilitate higher network usage than ever before.

If you are interested in mining STX or improving decentralization and security, please get in touch or join the community conversation.

Appendix

Author

mattyTokenomics has more than a decade of experience designing economic models for multi-billion AUM hedge funds and VC funded startups. In the Stacks ecosystem, he has worked with Trust Machines, Stacks Foundation, Mechanism, ALEX, Zest, NeoSwap and others on their tokenomics and consensus mechanisms - including for Stacks itself. He has authored approved community tokenomics proposals for DeFi protocols Arkadiko and ALEX, mentors founders at the Web3 Startup Lab, and is an occasional angel investor.

Get in touch at https://linktr.ee/tokenomics

Additional Resources

  • More details on PoX, Stacks security, attack vectors, and settling to Bitcoin

  • More detailed report on STX mining decentralization and how to attract additional miners

  • SIP (Stacks Improvement Proposal) forum discussion on STX mining, and possible proposals to increase decentralization:
    https://forum.stacks.org/t/miner-centralization/13217

Data Sources

Share this story