Miner Centralization

Hey Stackers! I love this community and want to pitch in to help on what I see as the number one priority right now.

The current game theory of how Stacks mining is designed is leading to a low # of miners and low mining throughput. Below I will explain how to increase the number of miners and the total mining throughput.

Let me first explain the problem as I see it.

The fixed cost of bidding for a block drives a stable equilibrium of a small # of miners. There’s no shortage of those who want to mine. They just drop out because it’s only profitable to be the largest.

I have first hand experience of this. I was a miner for a bit and then drove up my % of the pie until I was #1 for an extended time. At that point I was unprofitable & forced everyone else into unprofitability. Then it became a game of chicken. I blinked as I didn’t want to keep losing $. This is something every miner experiences.

The key to solving this imbalance is that miners should only send bitcoin transactions once it is clear that they have won the round. This minimizes the # of tx’s per round (only the winner sends), and it ensures the fixed cost of the bitcoin tx fee doesn’t favor larger miners.

How do you accomplish that? You have “bid to mine” transactions occur on the Stacks chain with $STX posted as collateral. The miner that wins the round then posts the transaction, & thus isn’t wasting tx fees on blocks not won.

This solution can be applied to the current situation, where fixed cost tx fees drive smaller miners into unprofitability. See my post explaining it: Stacking: a New Consensus Algorithm for Blockchains - #60 by shea256

This problem needs more prioritization than it currently is getting and I’m happy to contribute because I want to see Stacks grow during this bear market and beyond. Scaling chains for Stacks is awesome, but first we need to focus on the big issues with the main chain.

I’m happy to draft a SIP and join any working group who wants to take this forward.

Lastly, thank you to the entire Stacks community. We have one of the best communities in crypto and that’s no accident. Let’s keep making strides forward to improve what we’ve built on!

16 Likes

I actually love this idea and can see this leading to a huge number of miners (100x or more–as many as there are Stackers with 1000 STX worth of collateral), as well as profitability for miners.

I think something like this may have been difficult to do at the launch of Stacks Mainnet because there is some added technical complexity, but should be a lot easier now.

The key here is that the bid would be required to have collateral which would make the incentives function similar to the current Nakamoto-style consensus design (e.g. you can spend more to have a higher chance, you would just have to run multiple miners, but the number of miners you can run is limited by how much capital you have posted as collateral). We could even use DLCs (see DLC Link) to post Bitcoin as collateral.

The main drawback of this model is that only one transaction is posted, meaning you can’t have the same Bitcoin drip we have now, although I think the current status of the network very few people are event able to participate in the custodian-less stacking (Stacking Club says the minimum is 130k per slot right now–this is unreachable for 99% of users). So this drawback won’t affect the vast majority of users/holders, it will essentially be the same as most holders need to use Stacking pools anyways. One fix for this would be having everyone paying out in a synthetic Bitcoin, ideally with a trustless peg-out using something like DLCs. Or it could use Magic Bridge to atomic swap BTC and STX, which would also allow for recurring mining more easily to swap your STX back to BTC (this is needed in current mining anyways), then swap the BTC sent from the miner to STX and disburse it to all of the stackers.

Miners would be profitable in this model because you don’t lose anything from bidding, and you can set your profit expectation. E.g. you could bid 90-99% of the value of the block reward to lock in your profit. On the other side, APY’s would not be affected very much. Currently the avg. SATS bid per block is 1.9M = 1,073 STX (note I am not sure if this SATS # includes fees). In this new model it would likely be 950-999 STX in SATS bid per miner, close enough. In any case, current APYs for both miners and stackers are getting eaten into due to by BTC fees. In this model there’s less BTC fees so more profits to go around.

So, unless the mining dashboard includes fees I think it’s slightly less BTC going to stackers but only 7% less, which would mean 10% APY → 9.3% APY. HOWEVER, APY’s can be doubled by doubling the block reward, and inflation can be erased by bringing in new users and liquidity. Ultimately having 1000x miners would cause STX to 10x and bringing in so many users the inflation would turn negative in the presence of new capital coming in.

Another big value of this is that it would require a solution so that all users can use stacking without a pools/custodian, so there are multiple wins to happen from this new model.

6 Likes

If this increases number of miners and overall throughput without compromising security, I think it is worth soberly considering and pursuing this idea.

I’d be happy to contribute towards a SIP!

10 Likes

Maybe you didn’t stack enough STX? I assume the current miners are profitable even though not through the immediate block rewards.

I don’t think that fees are a big issue at the moment. Playing with the mining calculator and setting the sats/byte to 0 does not change anything at the current height of commits (and low btc fees).

Using only 1 btc tx per block would mean that each miner has to pay the total amount of 1.9m sats when they win and 0 when they don’t instead of always the same amount over time in the current setup. Does this discourage continuous mining?

I still believe that a first step for improvement of the current situation would be to help miners to more easily change their commits and create mining pools like described here: Mining Pool Proposal · Issue #3146 · stacks-network/stacks-blockchain · GitHub However, it looks like the current setup has established an equilibrium where “poor” new miners have a hard time to join the mining activities.

To change the consensus algorithm, it is important to better define the problems and the goals. Do we want 1000s of miners? Then mining pools could be a good solution. Do we want to enforce that miners include more txs in blocks? Then more hard forks could help (maybe).

6 Likes

Thanks Shea for proposing the idea. Making mining “less risky” for smaller miners will encourage a lot more miners to participate. More participants combined with “random selection” is def a way to strengthen Stacks.

One thing that really appeals with this approach is that it makes it more difficult for a “pissed off” whale to come in with $200,000 “pocket change” and cause havoc to the chain “just for kicks”.

This was one of my bigger concerns.

6 Likes

I was the largest miner at this point

2 Likes

That means that you contributed most to the unprofitability if the total sum of committed bitcoins of all miners was more than the expected revenue from the block rewards.

Current miners might have enough “external” income to run mining in the way it is happening now.

5 Likes

Yes and do you see how this is a problematic design / poor stable equilibrium? It means that any newcomer miner makes everyone unprofitable until someone drops out.

5 Likes

Yes, I see that. For a short period of time this probably does not hurt. However, if miners don’t lower their commits at all, it is bad. There is no incentive to lower them because it would decrease their probability to win.

Does the proposed mining pool change this? Or changing to a 1-miner-pays-all model?

We need some kind of collaboration like in neoswap where all miners bring their resources, do an exchange and everybody is happy.

3 Likes

Thanks @shea256. I think we’re all in agreement on the problem, and that we want a solution that incentivizes a competitive equilibrium of many more miners (100+). Daemon wants to help drive this conversation forward, and get to a point where a solid SIP exists that the community can consider adopting. To that end, I have a couple of questions on some of the details of your proposed model:

If I understand correctly, the way this new mining model would work is as follows: to start a miner must run a Stacks node and Bitcoin node, same as today. In order to be eligible to compete, a miner must also post an amount of STX as collateral that is equal to the STX coinbase reward (currently 1000 STX). Each sortition cycle the miner offers some amount of BTC that they are willing to pay in exchange for mining the next STX block. Sortition is run using the VRF (same as today), but only the winning miner that is chosen actually spends the BTC bid, while all other miners retain their BTC bids.

Is that all correct? If so:

  • Does the amount of BTC I bid still influence my probability of winning?
  • Am I correct that the strategy to get an advantage via scale with this model is to run as many individual miners as I can given the amount of STX I can post as collateral?
  • If I’m also stacking, couldn’t I still choose a bid amount that is unprofitable for majority of other miners in order to crowd them out, but still leaves me profitable because of BTC I am earning back from stacking?
  • How does this actually affect Stacking? Why would it lower the barrier for noncustodial stacking? One would expect more or less the same amount of BTC spent per STX block in a competitive market using this new model, so I don’t see how stacking dynamics would change meaningfully.

Thanks again for already creating a great discussion around this.

3 Likes

Following the idea of collaboration in neoswap style, here is a rough idea:

Miners publish a price for the total block together with the share of the block reward they would like to receive and are ready to pay:

Miner A thinks the block is worth 2.5m sats and wants 50% of the rewards, Miner B thinks it is 2m sats and wants 50%, Miner C thinks it is 2m sats and wants 25%.

In the current model the total commit would be 1.25m + 1m + 500k = 2.75m sats
The weighted average price for the block would be around ~2.2m sats. Using that price the commit used to calculate the probability of winning the block should be 1.1m for miner A, 1.1m for miner B and 550k for miner C.

In this new model, my naive mind hopes that miners who overprice the block rewards subsidise the probability to win of miners that underprice the block rewards creating an incentive to increase profit for miners and creating space for new miners.

With the increase of the number of miners and lower commits we get more into the problem of the btc transaction fees. So, the proposed change to 1 btc tx per block is important.

5 Likes

One other question too:

In this model Ryan proposes, what happens if the winning miner refuses to commit the block?

What I’m getting at is if the cost to commit a block is low, then the security guarantees will subsequently be low as well. In this model, it looks like the cost to commit a block is somewhat similar to now, however the cost to bid, or be included in sortition, is functionally zero. I’m trying to think through what security ramifications this would therefore have.

3 Likes

The collateral is seized by the protocol if the miner doesn’t send the btc and commit the block.

4 Likes

Yes it is still proportional.

No. A single miner can have multiple bids, proportional to the amount of stx put up as collateral.

Yes this can still happen, but because btc tx fees are reduced from “high regardless” to “pay only if I win” then there is no high “small blind” or “big blind” required to play, to use poker terminology. This levels the playing field between large and small miners.

This effects stacking by increasing the stacking reward. The reason is that the participants in the market equilibrium should be willing to pay more for the block reward as they no longer have to pay btc fees each block. Thus there is a miner surplus that is created and the competition between miners drives up the bid until the miner surplus becomes the stacker surplus. For example, if btc transaction costs are 5% of the amount of btc spent, this update would decrease the costs by 5%, driving the amount spent to stackers up by 5%.

3 Likes

Thanks Ryan, this helps clear some things up. I think miners would pay more per block in this scenario because the expected value per block doesn’t need to take into account capital spent on blocks lost. Unlike now, a miner could bid 99.9% of the block reward in this model and still be profitable.

For the collateral slashing, is that only done in the case that a miner fails to commit their block? Would there be any other scenarios where a miner could be slashed?

3 Likes

Happy to share my ideas in this discussion: Limit miner’s max BTC bid per block for horizontal scaling

Like Bitcoin, PoX is applied by Nakamoto-style consensus, so game theory is applied, and under the assumption that everyone is rational, they get incentives from the network in proportion to their resources.

There is one thing we overlooked here. That’s a resource limitation.

For Bitcoin miners, they buy higher performance miners to maximize their hash rate. Of course, the performance of miners continues to improve over time, but in order to reach a high hash rate in a shorter time, miners scale horizontally by purchasing more miners.

In a similar case, there is a deposit of 32 ETH to participate in the ETH 2.0 PoS verification process. In order to participate as a validator, you need to deposit at least 32 ETH, but even if you deposit more ETH, you will have an equal position, leading to horizontal decentralization.

In other words, in the case of Bitcoin, it is the time factor that limits the computing power, and in the case of Ethereum, 32 ETH.

Let’s introduce it to PoX. We use BTC to participate in the mining process. At this time, BTC has the advantage of being able to easily participate in mining because anyone can easily access it if they have enough money.

However, if we apply the limit of bidable BTC per block to impart fairness to miners, it will naturally induce miners to horizontally scale to obtain larger potions. At the same time, the Stacks network nodes will naturally expand as well.

Of course, compared to before, the frequency of BTC transactions increases, which consumes a lot of transaction fees, which can be bad for Stacker’s return, as Ryan said. However, this is consistent with our vision in terms of helping the Bitcoin network come alive. So from a big perspective, both ecosystems are win-win.

++ If there is a mining software or dashboard with a simple UI/UX for the public, it will be of great help to the mining participation. We talk about easy participation in mining, but in reality, it is very difficult for normal people without expertise to set it up. Such as one-click miner setup tool with auto-mining software upgrade.

9 Likes

A subset of Stacks miners would randomly be determined as potential winners for a given block and then they would post commitments, in this model? Or would it be first-come-first-served slots?
EDIT: might have gotten mixed up between applying the limit to the # of miners who can win a block and applying the limit to the amount a single miner can bid.

1 Like

@ryan Curious to get your thoughts on if this proposal would change your angle at all… pool-participants sharing in the cost of one Bitcoin tx fee feels like a step in the right direction but seems like the poor stable equilibrium would still exist between a few pools and a potential newcomer pool.

As @friedger mentioned, I think we want 1000’s of miners or as many as possible, as can be profitably incentivized to participate.

@GM-Chung I’m thinking both ETH PoS and this proposal of limiting BTC bids to increase horizontal scaling doesn’t really change much since the scaling has a relatively low cost of just spinning up more software instances compared to the more costly scaling of PoW hardware.

I wonder if an algo can be devised that makes it more costly for a rich entity to spin up more instances - assuming extra Tx fees isn’t enough. Like say the higher the total number of miners there are, the lower the maximum allowed BTC per-block bid level. In this way a whale with lots of BTC would not benefit much from spinning up a lot more nodes, and at the same time other new mining entities would be benefit to begin mining, which increases the number of miners and also lowers the max amount of BTC per-block bid allowed for all miners.

And like Bitcoin’s difficulty adjustment maybe there should be a smoothing factor where these parameters are averaged over some number of blocks, if it helps in some way like making short term gaming the system more difficult.

4 Likes

Miners coming and going also affects Bitcoin PoW and this is smoothed/controlled with the difficulty adjustment algo. Can we devise something similar like a "cost adjustment" algo that changes cost limits for all miners based on the total number of participating miners? Eg, it could lower the max allowed BTC bid per miner per block as the number of miners increases and vice versa.

I guess it’s sorta an artificial way of making sure all participating miners have a chance of making a profit per each block even if new/more miners show up.

2 Likes