Analysis of first Bitcoin reward cycle for Stacks

The first reward cycle for earning Bitcoin from consensus is currently on-going on the Stacks blockchain. A reward cycle is 2000 blocks or roughly 2 weeks. The next reward cycle is expected to start in approx 450 Bitcoin blocks. Hiro team is doing an analysis of the first reward cycle using publicly available Stacks blockchain data and we’ll share that here when it’s complete. I wanted to discuss a few quick points:

  • So far 26.93 BTC (~$1.2M USD) has been spent by miners for this cycle. Total reward slots per cycle are 4000, meaning 2 Bitcoin addresses per block are randomly chosen for the rewards based on the stackers who are participating in consensus.

  • Approx 110M STX participated in this cycle taking 44% of the 4000 reward slots, where as 56% of the slots were unoccupied and the corresponding BTC rewards for those slots were burned. Due to certain potential miner incentive corner cases, the minimum level of stacking participation is 25% of the liquid supply and if less than 25% of the supply participates (as we’re currently seeing in the first cycle) then the unoccupied reward slots go to a burn address. If more than 25% of the supply participates in future cycles then we will not see any burn.

  • Given that less than 25% supply was participating and 56% of the reward slots were going to a burn address, stackers noticed more payouts coming to them in the early part of the cycle. This is because all burn slots occur towards the end of the cycle. In other words, only the first 44% slots had rewards going to stackers and the remaining 56% slots towards the end were all burns. If more than 25% of the liquid supply participates then reward addresses for the stackers will be randomly distributed through out the cycle (vs front-loaded at the start of the cycle).

It’s early days of this brand new consensus mechanism (we’re literally in the first reward cycle!) but I’m excited to see the protocol work as intended out in the wild. There is a forum post that summarizes some learnings from Stacking so far. You should check it out and leave any feedback. A reminder that my company, Hiro PBC, does not control the Stacks blockchain and any potential improvements need to go through the SIP process and accepted by independent miners (Hiro is not involved with the SIP committee and is not a miner on the network). Thanks and happy stacking to those who are participating!

9 Likes

@muneeb Thanks for your review.

Could you share some thoughts about mining with the community? The STX community on reddit is disgusting some aspects of rewards about mining
(https://www.reddit.com/r/stacks/comments/lou4ae/which_is_more_worth_it_stx_stack_or_stx_mining/)

I would love to know if the rewards are paying the bitcoin investment on mining economics. Because of an economics analysis, the reddit community conclude that a single miner that spend the minimum BTC amout for each mining block would end up spending $65k for each cycle of STX mining.

  • From documentation, initial recommended amount is 11K Sats or ~$6
  • But what about the BTC TX fee? At current price ($25), isn’t this something that A)impacts APY and B) is NOT represented by the 26.93 BTC spend in the first cycle (i.e. the amount transferred to Stackers)?
  • The way I’m reading it, a miner would need to spend a total of ~$30 per block and then would only have ~1% of being selected as a miner unless they wanted to increase the amount of money spent
  • At 2100 blocks per cycle, that is a ~$65K investment to compete across all blocks

Hope hear from you soon.

Regards
Jonathas

That sounds about right to me. For any mining operation (here and in other chains), there’s going to be “goldilocks zone” where the expected reward is going to exceed the mining cost. Commit too little resources, or too many, and it operates at a loss.

For example, miner SPP1DJ1JE2V8HYHTRHPWD7603XHJ3F7421KBC4TE produced 36 canonical Stacks blocks on the last 144 sortitions, meaning it contributed 29.26% of the total mining power of the network (it is currently today’s strongest miner). It paid 1111110 sats per Stacks block, or about $561, meaning its daily burn is about $80,800. Keep in mind that the initial mining bonus is active, so its coinbase rewards are actually 2446.4 STX, or about $2,565. So, this miner is making just over $92,300 in STX, for a daily profit of about $11,500.

Miners adjust how much they burn over time, based on other miners’ burn rates. For example, this same miner just reduced its burn rate to 606000 in the last block it won.

You can explore this information with the Stacks dump tool (data is online here), or with my script here.

1 Like

@jude thanks for your response.

I may be missing something, tell me if I’m wrong, but have you included the transactions fees in your calculation?

I did some math here, let me share with you.

Today the reward per block is around r = $2,565.

The current mining commit in dollars is: 4,583,000 sats = $2,210

Let x be the “investment” (in dollars) a miner do every time he commits a transaction.

Let P be the expected profit a miner has (the estimated profit). (Expected value - Wikipedia).

Let p be the probability of being chosen to receive the reward of r= $2,565 in STX.

Let y be the transaction fee on the bitcoin blockchain.

p = x/(x+$2,210), admit that the miners will not increase their commitment for simplicity.

So we have the expected profit being:

P = p*r-(x+y),

P = 2565*x/(2210+x) - x -y.

Let consider that the average transaction fee is around $30,

P = 2565*x/(2210+x) - x - 30.

Using wolfram alpha (https://www.wolframalpha.com) we can calculate which “investment” x would deliver the maximum profit over the time

That being said, the profits are currently being negative. I think in your analysis you did not consider that transaction fees.

On the other hand, we can estimate which transaction fee would turn the mining activity profitable.

We just have to solve the inequality:

  1. 2565*x/(2210+x) - x -y>0

  2. x>0

Wolfram alpha helps us to solve it:

Look at appendix (1)

Plotting the inequality, we have:

Look at appendix (2)

We need y to be “below” the curve to have some profit on mining activity. If the transaction fee is bigger than $12, there is no profit.

Let’s say we have $10 as fee for a transaction, so our best profit would be:

Look at appendix (3)

The optimum point is to commit $170, and the profit would be only $3. Remember that this is the “expected” profit per commitment of a miner.

Look at appendix (4)

Appendix bellow:
wolfram_appendix
That been said I think the rewards must be bigger than the current rate

to encourage new miners to join the party. On the other hand, as more miners join the network, the bigger will be the amount of satoshis committed in one single block, meaning that, or the STX price should go up (but this is a market decision, and you have no control of that), or the rewards should increase. This is simple math.

For me, the mining activity is an unstable equilibrium. (If the activity is profitable, the amount of miners will increase, if the amount of miners increase, the amount of sat/block will increase and the mining activity will no more be profitable, forcing some miners to leave, as they leave, mining will be profitable again attracting new miners […], but the network security will be affected since the number of miners will not be stable).

For me there is something wrong with the STX mining economics, let me know what you think about my analysis.

Regards.

(I only can include one image on my post that’s why i used it as appendix)

1 Like

Let’s summarize the last analysis in an algebraic way (for the math guys).

Let r be the reward per block that the chosen miner receives (in dollars).

Let x be the “investment” (in dollars) a miner do every time he commits a transaction.

Let P be the expected profit of a NEW miner willing to enter in the game with an “investment” x .(Expected value - Wikipedia).

Let z the current total commitment per block (before the new miner).

Let p be the probability of being chosen to receive the reward of r.

Let y be the transaction fee on the bitcoin blockchain (assume $30).

P = p*r-(x+y),

P = r*x/(z+x) - x - 30.

We want P>0 *(the miner must have profit). We know that z>0 and x>0.

Solving with wolframalpha

algebra_wolphram

There will always exist an upper bound limit to z given an reward r and an investment x that will limit the growth of the mining network.

Yup, that makes sense. I was a little confused by your first post (got hung up on why p = x/(x + 2210), when the probability of sortition is x/all_btc_sent), but your explanation with the z term fixed my understanding.

I think this is true for all PoW blockchains as well (which is what PoX and PoB emulate). Spending more and more electricity in PoW offers diminishing returns; the amount of electricity spent will approach the revenue generated (or, as an economist might put it, MC = MR).

For me, the mining activity is an unstable equilibrium […snip…]

Do you mean a dynamic equilibrium? From the rest of the description, it sounds like you’re describing a negative feedback loop – each miner’s commitment will approach whatever value will cause it to break even (which may mean it ceases mining, but in doing so, lowers the barrier to entry for other miners).

Also, not sure if you’re aware of this, but if the y term is so high that no miner can afford mine, the system automatically grants the missed coinbase reward to the next miner. That means that if there’s a period of b blocks where there is no sortitions, then the reward for the miner who mines in block b+1 will be b * r. Unless something is well and truly wrong with the markets, there is always going to be a small value of b where b * r > y.

1 Like

Hello @jude, thanks for your contribution,

My statement about equilibrium is not related to “control theory”. I’ve just enhanced the fact that there will be no accomodation for new miners, meaning that the numbers of miners will be limited by the intrinsic economic dynamics of mining activity. I’ve run some simulations here and I would like to share with you.

I’m considering now an “steady state” at a given instant of the mining activity, instead of considering the point of view of a NEW miner as stated in my last post.

So, let’s say that in a given moment, there are some miners, competing for a reward r, commiting x as “investment” and paying a transaction fee y. Let z be the total commitment per block.

My hypothesis here is that at the “steady state” all miners are in profit or at least not losing money. We can ask ourselves, which “investment” x would accomplish this hypothesis.

Let’s do some math:

Let P be the expected profit of a given miner

P = r*x/(z+x) - x - y.

For P>=0, we have

x>=y*z/(r-z).

Let’s analyse the limit case where a miner commits the minimum amount to not operate at loss (P=0).

xmin = y*z/(r-z). We know that z>0, r>0 and x>0.

We conclude that r>z, that is kind of evident, because the rewards of given mining activity should be bigger than the total spent in commitments.

Let’s simulate now with some real-values.

y = $30 and r=$2500 (values near to the current mining activity).

In this case we have:

xmin = 30z/(2500-z).

I’ve created a table for the exact understanding of this equation.
table

Varying z from 100 to 2499, we can calculate the minimum commitment that would put a miner in a non-loss condition. And we can also infer the maximum number of miners that will operate in a non-loss condition, since that means that all of them are operating with zero-profit, allowing a bigger “accommodation” of miners (N = floor(Z/xmin)).

The table also presents some scenarios, where there is a miner that commits xmin+Q. In this case, the table presents the expected profit P(xmin+Q) of that miner (Q is presented in a row below the table).

In fact miners who decide to compete and commit xmin+Q have poor returns as the total committed (z) approaches the value of rewards (r=2500). And after the point where z > 2200, there is almost no return for the miners.

That being said, I think there are some huge limitations of the growth of the number of active miners. Even in the non-stationary dynamics, we have to assume that a potential miner is willing to lose in order to compete with the active miners. This is against natural economic behavior.

I want to highlight some aspects of comparison between PoW and PoX. In the PoW miners will look to minimize the energy cost (i.e solar energy, mount operations in countries where the energy is cheap) in order to compete with the already active miners, but in the PoX i cannot see an variable that the miner can look for “minimize” since the bitcoin price is set by market.

Just to clarify, i’m not here playing the troll and saying that PoX doesn’t work, I’m new in the PoX ecosystem, and I was making some calculations to start mining. I hope our discussion may clarify it for me and for the community.

Regards,

Jonathas

Hi @jmpf,

Thank you for providing such an in-depth analysis! I think a lot of community members here who are interested in mining will look to this post as a basis for understanding the expected profits of mining.

Just to clarify, i’m not here playing the troll and saying that PoX doesn’t work, I’m new in the PoX ecosystem, and I was making some calculations to start mining.

I didn’t think you were trolling! :slight_smile: All I was trying to say earlier is that your findings are consistent with my own understanding of PoX (and PoB), and that the same analysis holds for the much-more-widely-understood PoW. That last part is relevant to me, because I often use the similarity between PoX and PoW’s mining mechanics to help new people understand PoX better.

Just wanted to address and qualify a couple of your findings here:

That being said, I think there are some huge limitations of the growth of the number of active miners.

Yup, that’s my understanding as well. Going by your analysis, it’s apparent that this is caused by y > 0, since if y = 0, then P > 0 always. The fact that there’s this “capital expenditure” to mining (in the form of a Bitcoin transaction fee) naturally means that miners need to make enough money to pay it off in order to break even. So, it makes sense to me that an increasing z can cause P < 0 for a miner, unless the miner makes an appropriate increase in its x.

Which brings me to this:

I want to highlight some aspects of comparison between PoW and PoX. In the PoW miners will look to minimize the energy cost (i.e solar energy, mount operations in countries where the energy is cheap) in order to compete with the already active miners,

The flip-side of this is that PoW mining has a much higher capital expenditure than PoX/PoB – you have to go out and buy a mining rig before you can see any payout, and then you have to buy electricity to run it and pay for its ongoing maintenance. You also need to re-invest your profits into growing your mining rig to keep it it competitive. The presence of many competing miners in PoW also drives up the capital expenditure, because they’re all competing to buy the same silicon from the same foundries (look at the rising cost for nvidia GPUs for Ethereum mining, for example).

While PoX/PoB don’t address the fundamental problem that mining has a capital expenditure, they do make it more approachable for the layperson than PoW. With regards to capital expenditures, PoX/PoB miners are competing for block space in the same way that PoW miners are competing to buy up silicon. But in PoX/PoB, there’s a much, much smaller time cost for getting started (you just need to buy Bitcoin), and a lot less risk (you don’t have to rent a building, there are no parts ship and assemble, there’s no upkeep cost, etc.).

but in the PoX i cannot see an variable that the miner can look for “minimize” since the bitcoin price is set by market.

I see this as a feature – PoX miners don’t get an advantage by mining in a particular place on the planet. This, combined with the comparatively lower capex for mining, makes PoX a more equitable mining proposition.

However, I can see a couple of variables miners can play with:

  • A savvy miner could stand to profit more by buying all of their BTC up front, if they believe that BTC will appreciate over their mining period. This way, they don’t have to buy BTC on the spot market each time they want to mine. Miners today already effectively do this (i.e. buy lots of BTC in one go so they can mine in B subsequent Bitcoin blocks), but this window size can be adjusted based on BTC price projections. Similarly, a savvy miner could switch to buying BTC on the spot market if they believe the Bitcoin price will drop over their mining window.
  • Not all Bitcoin blocks arrive in 10-minute intervals. It’s already difficult for miners to mine a Stacks block if the subsequent Bitcoin block arrives after a few seconds (this happens a couple times a day, especially given Bitcoin’s price rise, since new mining capacity comes online all the time). A savvy miner could adjust their mining software to be better able to accommodate these outlier “flash blocks”, such as by quickly sending a block-commit and aggressively replicating its block data in a bid to race the next Bitcoin block across the Internet. A particularly savvy miner could even set up a dedicated relay network to speed up their blocks’ propagation (Bitcoin miners do this today, for example).
  • Stacks miners can coordinate with Bitcoin miners to ensure that their block-commits are included in a timely fashion, or excluded if they’ll just be late (thereby avoiding paying a transaction fee for an invalid block-commit). This is facilitated today with BTC transaction fees, but I could see a world where a Stacks miner enters a business relationship with Bitcoin miners where they can pay their y-value in earned STX or USD or something else more favorable to the Stacks miner. Stacks miners could also lock in a fixed y-value over a given time interval this way, and get a guarantee that the Bitcoin miners will only include their block-commits if they’ll be valid for sortition.

There are probably others; these are just off the top of my head.

Anyway, I really appreciate you taking a closer look at the mining mechanics of PoX. I’m glad to see that we’ve been reaching the same conclusions :slight_smile:

2 Likes

Thanks for your attention, I think the most important economic topics about stx mining were discussed here. I hope the community can find value information and share their questions here in the future.

Regards,

Jonathas

1 Like