Miner Centralization

This is why decentralized mining pools are IMHO a better solution. Even if your proposal made mining more affordable, it doesn’t create very much room for more participants. Namely, the winning miner still has to pay the BTC fee, and that still prices out many would-be miners (also, recall that miners still have to mine consistently even when they don’t win in order to prevent discount-miners from monopolizing the chain). Moreover, something that’s missing from your proposal is the logic that determines how the STX collateral level is determined. I’d imagine that it would fluctuate with miner demand? If so, then the need for miners to accumulate and stake STX is also an economic barrier-to-entry that has not been addressed.

By contrast, decentralized mining pools with taproot would amortize the BTC fee across the participants, so even a transaction fee of 0.1 BTC could be funded by charging 0.001 BTC to the 1,000 participants behind the block-commit transaction (something you can achieve with taproot).

This is not only a predictable outcome, but was known before the system launched. All miners pay a fixed opex in each round, so naturally that puts an upper bound on the number of profitable miners if the price of the inputs (BTC) and outputs (STX) are fixed. The only way around this is to decouple mining participation from maintaining an on-BTC UTXO chain, thereby freeing miners from paying a fixed opex each round. This is achieved by decentralized mining pools, since the opex is shared across arbitrarily many mining participants. This is not achieved in your proposal – each miner must still must pay a fixed opex: either a BTC fee or, as you mention, opportunity cost of staking their STX.

People need the freedom to exit pools and form their own if they don’t like how the current pool is working. It’s not only a check on the power of pools, but also a release valve for innovation: if you can build a better pool, the current pools shouldn’t be able stop you. Also, pools as I’ve described them require taproot to work (so you can have lots of participants without creating a massive BTC transaction), so it wasn’t an option to do this when the system launched.

2 Likes

How about making a change to the weighted random function where instead of using the stacked amount directly, you’d use the inverse of that amount as the weight, so that smaller stackers instead get a larger chance to get the rewards, even if they get lesser rewards.

This would discourage large miners, but it would also mean more people can stack with a lower starting fee.

1 Like

Can you link to the mining pools SIP/spec?

I’m struggling to see how this is not a contradiction. If pools are sufficiently decentralized, why would someone need to create a better one?

I’m very happy to see this. Even though I don’t agree with everything on the technical side, your contribution brought life back into this forum, and I would argue that an active community that discusses technical concerns is even more important than the protocol that supports it.

Shouldn’t the winning probability be in proportion to the BTC bid? So the bias towards large miners is created by the BTC tx fee?

If so, could the probability function just be adjusted so it becomes more fair in presence of tx fees?

One might argue that reducing the spent BTC of non-winners is premature optimization as long as the winner can’t be accurately determined. I had a lot of mining transactions where the algorithm determined that I had won. But after weeks without payout, I think it’s most likely that I didn’t. I think the consensus algorithm should first work more accurately to determine the winner before conditionalizing on the top of this.

So anyone who wants to mine will first have to have STX in order to post the “bid to mine” transaction?

I think it’s an important advantage of STX over all the PoS schemes around that there is no chicken-egg situation. No one needs to get past gatekeepers that will sell them STX in order to participate. This is an important factor for a global equilibrium. I’m reluctant when it comes to sacrificing the possibility for every BTC user to participate right away.

1 Like

Thanks for your comments!

To me this is only an aesthetic concern and not a true concern. Every miner will in practice be able to acquire Stacks. Even if they cannot use a centralized exchange, which is a really unrealistic assumption, they can use a dex to do a swap from STX to BTC.

I’m skeptical of decentralized mining pools for a few reasons.

First, they greatly increase the complexity of the system between the individual small miner and the mining process.

Second, I’d be concerned about the networks for the “decentralized mining pools” not having any points of control or disruption, even if they are part of a network that collaborates to participate in mining.

I would bet that in practice there are quite a few hiccups and centralization points that in practice lead to consolidation and centralization of mining power.

I also agree with the dust fee mining. This set a clear standard for my proposal. This allows miners to scale based on network activity without significant disruption to Bitcoin yield. Also, it seems that there will be good synergy if @xan’s Coinbase Rewards related SIP is added to give a little more power to the current situation.

2 Likes

I don’t agree it’s merely aesthetic. Right now, STX can to a great extent serve a requirement I often hear from potential new adopters: Being able to run smart contracts “on Bitcoin”. The current STX ecosystem makes BTC holders first-class citizens who can probabilistically convert their BTC to STX right through the blockchain protocol without any additional requirements.

With the proposed change (as I understand it - to me there were some open questions) STX would move more towards the gazillions of smart contract platforms where you can buy yourself in in order to run smart contracts.

Thus, I think we would lose an important characteristic that makes STX unique.

Maybe your proposal can also work if it is provided as an option in addition to direct (BTC to STX without any hoops and loops) PoX mining?

1 Like

You don’t buy yourself in to mine. You still pay btc to mine. The stx is only used as collateral / as a backstop. Assuming the miner is honest and sends the tx when he wins the block, the stx isn’t even used at all. The collateral is only necessary so that the miner can be punished if they do not produce the block. In fact, you only need a collateral that exceeds the amount you’re bidding in btc at any given time. That means the amount you’re bidding in btc across blocks far exceeds the amount of collateral you ever need to hold. This is very much a btc driven mining protocol and very close to the existing system. It just has much lower fees and levels the playing field for miners of every size.

There’s no SIP for one yet, but Daemon Technologies is working on one. Stacks 2.1 adds two missing pieces of the puzzle.

In the example I outlined above, a pool could suffer an irrecoverable failure if:

  • there aren’t enough block-commit signatories online
  • the BTC funds somehow get stolen (e.g. enough keys get compromised)
  • a bug is discovered in the smart contract that governs it
  • the pool becomes dominated by a few whales

The way to rectify these failures is to start a new pool. Also, the upside for pooled mining isn’t limited to the STX block reward. Because the pool is governed by a smart contract, the smart contract can create its own additional incentives for participation, such as:

  • varying the STX distribution (e.g. is is pro-rata? is it granted as a lottery? is part of it invested in a charity or a dev fund?)
  • granting SIP-010 tokens or SIP-009 NFTs to participants, which have non-zero value
  • participation in the pool contract’s governance

Think of a mining pool as a DAO. It does all the same things a DAO would, in addition to getting BTC holders to coordinate crafting block-commits and Stacks blocks.

1 Like

I guess that’s a matter of opinion. While it is true that more code will be required, I don’t think the code is very difficult to reason about. Also, the design space (and business models) for decentralized pools is vast, and adding support for them doesn’t require tearing up the existing consensus algorithm (which has been extensively vetted) with a new untried one.

This is pretty easy to achieve. When you register with the pool, you simply supply a network address (IP address, DNS name, API endpoint, whatever) through which your pool client will be in touch with other pool clients. It is obviously possible to build robust p2p networks this way – Stacks (and Blockstack before it) have operated as such for years.

And replacing the tried-and-tested consensus protocol with one that isn’t even spec’ed out (let alone audited or implemented) is somehow less risky? :wink:

1 Like

Yes you do – staking the STX this way is an opportunity cost. You said so yourself up-thread. Also, how much STX needs to be locked up to participate? Do you have concrete numbers?

The staking opportunity cost is on top of the main cost, which is the sending of the BTC.

Remember, you send the same BTC per block on average, so what you sacrifice in terms of BTC is the same.

It would be low, just enough to cover the number of outstanding bets, with a safety factor for price movements. So if we use 2x as the safety factor, and we assume that bets are of size 0.004, then one would have to have 0.008 BTC worth of STX as collateral per outstanding bet, which would be about 500 STX. If a miner can have up to 100 outstanding block bets at once (the time window for winner selection), then the miner would have to have 50,000 STX as collateral.

Exactly – you have to buy your way into mining by paying the opportunity cost of bonding your STX, which is what I believe @blindcite was saying (and you were contesting).

It sounds like rich miners can just buy up all of the slots by partitioning their STX into small miners that they control? If so, then this doesn’t appear to make mining any more accessible than it already is. Also, what happens if there is more STX available to bond for mining than there are available? Fixing the price of slots to be a function of BTC (instead of miner demand) isn’t really viable, since that just pushes the problem towards off-chain solutions for acquiring slots at their fair market value (but by doing nefarious things, like bribing miners off-chain to exclude other would-be miners’ attempts to bond their STX).

2 Likes

Jude, with 5 miners currently mining at their current rate, 50,000 stacks would be required for each miner and only 250,000 stacks would be required across all miners. This is an insanely low amount of collateral. It’s not even a concern. I feel like we’re crossing wires here.

Jude, you can dislike the proposal but I am asking we get on the same page for a few things and work with actual numbers. Being worried about 250k of collateral for 0.02 btc per block worth of mining is missing the point imo.

I’m trying to understand your proposal, @shea256. Asking how it works under various adversarial settings is an attempt to do this.

1 Like

Ok great, good to know, I was a bit confused because I thought you were criticizing the proposal without approaching it with an open mind.

My apologies if my explanation wasn’t thorough or clear enough.

I will come back and explain all of this more clearly.

Thanks for starting a vigorous and much needed debate @shea256 ! Agreed that the ecosystem should view the state of mining as an existential threat: it’s hard to imagine Stacks being a top-10 project with just a handful of miners.

It might be for you but needn’t be for others. On paper, I agree that by the framing above, one might say Ethereum and Stacks have similar miner centralization. But in practice, the raw number does matter. First, the effort and communication overhead for 3 solo miners to coordinate (in case of Stacks) isn’t the same as that for say 3 large pools in Ethereum or Bitcoin. Second, perception does matter: casual users, developers or investors looking at number of miners on Stacks will compare it against number of miners on other networks, and will judge the project on that basis – whether you like it or not.

Besides, we should be striving for more miners and more independent entities they represent: some of the comments here make it seem like one has to come at the expense of the other, that needn’t be the case.

My attempt to summarize the different proposals in this thread so far:

  • From @shea256 : rather than send burn commitments, miners put up STX collateral to signal intent to mine. Only the winning miner actually spends BTC. There’s potential security concerns because of a circular dependency on Stacks: previously Stacks consensus is only dependent on Bitcoin transactions; in this scheme Stacks consensus would take a dependency on state on Stacks
  • From @GM-Chung : place a cap on miner BTC commitments. This has negative implications for Stacking yields because of higher Bitcoin transaction fees.
  • @XanDtikoff 's now withdrawn SIP that proposed changing the coinbase rewards: there was some confusion around the SIP’s goals. It seems the primary goal was to increase the security budget and unclear if it would have had any impact on number of miners.
  • @muneeb et. al are working on another proposal (I’ve seen it referred to as the “dust mining SIP”). It’s not published yet but my understanding of the basic idea is to create two classes of miners: one that mine regularly like today, and another who would just be sending dust BTC. And the consensus algorithm would basically pick a dust miner something like 10% of the time. This is similar to GM’s proposal in some regard, but limits the impact on Stacking yield. Did I get that right?

This is all in addition to the already planned changes in Stacks 2.1 which would enable easier creation of decentralized mining pools.

Ryan for your proposal, I think the key question is around security right? The other details, while important, seem downstream of that: as in, unless there’s a path to make the VRF changes dependent on Stacks state without compromising security, the rest of the details wouldn’t matter? If so, perhaps we should narrow the discussion on that first?

4 Likes

Yes I think that’s right.

From my perspective, if my proposal can be implemented securely, then it should be preferable.

That said, I wouldn’t want to push it forward if there were security issues.

If that were the case, I would support @GM-Chung’s proposal to put a max cap on each BTC commitment.