Oct 09•10 min read
As of October 10th, 2022; Stacks Block 79,155
by @mattyTokenomics
Stacks has a unique consensus mechanism called Proof of Transfer (PoX) which results in the Stacks chain settling directly 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. This process means that the very act of mining STX is to write its history into the BTC 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. You can learn more about PoX, how STX transactions settle to Bitcoin's chain, and Stacks' attack vectors from this Twitter thread.
This quarterly mining report covers the current state of Stacks mining and is not a deep dive into how mining itself works. For a more in depth report on STX mining decentralization see this initial STX mining report from July 2022 or this SIP forum post for mining improvements.
Unless otherwise specified, this report covers the time periods below
Past Year: Q3 2021 - Q3 2022
Past Quarter: Q3 2022
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 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.5
Past Quarter Minutes per STX Block: 11.1
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: 78
Past Quarter Unique STX Miners: 25
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
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 should be (and is being) taken seriously by the community. You can join the conversation here.
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.139
Past Quarter Average Gini Coefficient: 0.199
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.
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 even though demand is not).
In BLUE, the total number of processed transactions per block.
Past Year Average Txs per Block: 51.0
Past Quarter Average Txs per Block: 55.0
It is 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 very large growth in recent activity (a flurry of BNS '.btc' domain name purchases).
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 increasing 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.
Regardless, the more revenues miners earn from fees as opposed to from block rewards, the more sustainable the chain is without requiring inflation from block rewards.
In BLUE, the percent of total miner rewards earned from gas fees. I.e. a value of 50% represents miners earn just as much in gas fees as they earn in inflationary block rewards.
Past Year Average Fees as % of Rewards: 1.26%
Past Quarter Average Fees as % of Rewards: 0.45%
In this case, we can see that 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. Luckily, there are quite a lot of high impact releases in the near future of Stacks' roadmap that stand to enable much greater levels of network usage.
While an individual miners' profit ultimately depend on a variety of specific factors including how they mine, when they mine, random chance, and others, 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.
However, more recently, profit margins have surged to reach a peak of over 50%, and at the time of this report, are still in range of 20%. This is a promising sign that though mining has become less decentralized in the past quarter, miners seem to have overcorrected, and there are currently quite large profit margins by historical standards available to miners that resume operations.
If you are a BTC miner that would like to more about STX mining, please get in touch via Twitter, Discord, or Telegram.
One of the biggest deterrents to new miners 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 requires spending even more BTC.
Past Year BTC Required to Breakeven 1 cycle: 1.22
...in USD at current BTC/USD: 23,345
Past Quarter BTC Required to Breakeven 1 cycle: 1.41
...in USD at current BTC/USD: 26,925
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, and it requires considerable capital (1.41 BTC or about $27k) to mine one cycle at an expected breakeven profit margin. Mining profitably would require even more capital. This is clearly a large deterrent to additional miners joining.
It's no secret that Q3 of 2022 has been a bear market, not just for crypto but for most risky assets. Given the decline in BTC/USD and STX/BTC, it's expected that STX mining would become a bit less decentralized.
Largely, that is what played out during this past quarter. Currently, blocks are mined by an average of about 6 miners, and it would take about 3 of those miners to collude to initiate a >50% attack.
Positive signs remain though. Historically high profit margins for miners indicate miners have overcorrected, and all else equal an increase in miners, and return of profit margins to historical averages, is likely. Furthermore, usage of the Stacks network has held steady and even slightly grew this quarter, despite the bear market. While that has not yet translated into greater fee rewards for miners, this is inevitable if usage growth continues.
Finally, a number of significant features from the roadmap are expected or Q4 2022 - Q1 2023, such as Stacks 2.1, subnets, and more, which contain necessary features to support non-custodial mining pools and facilitate higher network usage than ever before.
These signs point to a possible bright future for STX miners when a bull market returns. In the meantime, miners still enjoying profit margins of nearly 10% this quarter (and twice that in recent weeks) during this bear market.
If you are interested in mining STX or improving decentralization and security, please get in touch or join the community conversation.
mattyTokenomics has a decade of experience designing economic models for multi-billion AUM hedge funds and VC funded startups. He has been in crypto since 2015 and Stacks since 2017. In the Stacks ecosystem, he has worked with Trust Machines, Stacks Foundation, Mechanism, ALEX, Zest, NeoSwap and others on their tokenomics and consensus mechanism improvements for Stacks itself. He authored the first community tokenomics proposal for Arkadiko, mentors founders at the Web3 Startup Lab, and is an occasional angel investor.
Get in touch at https://linktr.ee/tokenomics
More details on PoX, Stacks security, attack vectors, and settling to Bitcoin:
https://twitter.com/MattySTX/status/1491780402016669696
More detailed report on STX mining decentralization and how to attract additional miners:
https://twitter.com/MattySTX/status/1545392831560404995
SIP (Stacks Improvement Proposal) forum discussion on STX mining, and possible proposals to increase decentralization:
https://forum.stacks.org/t/miner-centralization/13217
Mining commits and coinbase rewards: https://app.onstacks.com/
BTC transaction gas fees: https://www.blockchain.com/api/blockchain_api
STX transactions and gas fees earned per block: https://stacksonchain.com
Market prices for STX and BTC: https://www.coingecko.com/api/documentations/v3