To change topic slightly, @jude what are your thoughts on capping the btc bid size as @GM-Chung suggested? If you want to bid more you can place multiple bids across multiple transactions.
I think it’s a nice idea, but it’s basically equivalent to asking miners to pay a BTC transaction fee that is proportional to their PoX output. I’d expect this to lower the PoX payout, and possibly increase the number of pie slices you see on https://app.onstacks.com, but I don’t think it would change the number of independent mining entities (the pie chart would only give is the illusion that there were more). The rich miners who can afford to mine will just run multiple such entries.
Ok so we agree it should increase the # of mining entities, that’s good.
It should actually level the playing field for smaller miners because there is no longer a “big blind” that smaller miners cannot afford.
And to be clear, with this proposal, miners would still be able to mine with multiple “slots” and they’d appear under the same entity, just as is the case with stacking.
Currently there are 5 big miners and they spend a total of about 0.02 btc per block in aggregate.
On average, they spend 0.004 btc per block each.
Let’s say the bitcoin transaction fees are 0.0002 for these transactions (I’m not sure what they are I’m just guessing off the top of my head, someone can give me the actual figure).
That means that the existing large miners have a btc tx fee overhead of 5%.
A miner that wants to spend half this (0.002 btc per block) would have a btc tx fee overhead of 10% and thus would be quite a bit less profitable than the biggest miners.
At times I’ve seen the miners operating at near 0% profit or break even.
That means that with the current btc fee environment you simply cannot join the miner club unless you up the ante and decide you’re going to pay 0.004 btc per block.
Then everyone else would be 17% less profitable and you’d expect everyone to adjust their spend downward until an equilibrium is reached or you’d expect one of the existing miners to drop out.
The game of chicken would last some period of time until someone blinks.
This is the situation we’ve seen and would expect to continue to see.
I’m not surprised, because I wasn’t being sarcastic. It seems like in the 2.1 model having multiple mining pools is unnecessary and only serves to complicate things. If the long-term incentive is the largest mining pool has the advantage, why not just start out this way?
First of all, my personal opinion is that the problem of miner centralization does not affect the consensus security of the stacks network. In other words, even if there are more than 100 miners in the stacks network, the security is not fundamentally different from now.
Then the advantages of reducing the transaction of the btc network are:
- The transaction fee paid by stacks miners on the btc network can be reduced. The fee is basically a fixed value according to the setting. Up to now, the stacks block height is 62110, and the miners have consumed a total of 113.5 btc on the transaction fee of the bitcoin network (data sourced from Daemon Mining-Monitor
). The cost savings can be used as a positive incentive for miners on the one hand, and can be fed back to stacking users on the other hand
But I personally think the possible drawbacks are:
- Miners need to pay more mortgage costs to ensure their mining rights. In the original design, miners only need to burn btc, and the transaction will be reserved on the burnchain. But now more collateral needs to be locked for block production.
- The process of miner election has changed. The original process is to record the data on the stacks network first, and then decide who is the winner of this election according to the new block of the burnchain. This process change will lead to the difficulty of attacking the election. From attacking burnchain to attacking the network of stacks (maybe my understanding is wrong). This model is somewhat similar to Ethereum’s Layer 2. But for the stacks network, the sorting process requires data retention on the burnchain, so that decentralized verification can be done.
- The occurrence of flash blocks in burnchain will cause miners’ collateral to be confiscated, but flash blocks should be very common on the stacks network, because the average time for miners to generate blocks on the stacks network is at least 10 to 20 seconds.
Yeah we should certainly explore the security implications of the VRF implemented at the Bitcoin layer vs Stacks layer. BTW, the dust fee mining is sort of similar to GM-Chung’s idea i.e., instead of a cap on all bids, it places a cap on bids for 10% of the rewards and the cap is very low: a dust transaction.
What this effectively achieves is that it caps the potential negative impact on the stacking yield. The bulk of the mining dynamics (the 90% of the dynamics) remain the same but the “small miners” are grouped into a new category where they can mine with just BTC fee i.e., just a dust bid.
If you compare this to the idea of capping all bids, then the main difference is that capping all bids can lead to a situation where the stacking yield can drop a lot (a lot more BTC starts going to BTC fees than getting used as BTC rewards). However, with the “dust fee mining” proposal that maximum reduction in the stacking rewards is capped at 10%. However, it can still lead to 100+ new miners.
The math for that is simple. At the rate of 1000 STX per block, you’d allocate 10% i.e., 100 STX per block to the dust fee miners. That’s approx $100 USD per block at STX price of $1. Bitcoin average fees can be lower than $1 these days. (At higher BTC fees, say $2 per transaction you’d see approx 50 miners.) More importantly, as the network grows, at higher STX price the capacity to support more miners goes up even more. I think the discussion for the SIP of adjusting emissions in the bootstrapping phase (coming years) is also relevant here. Because if a SIP like this is adopted and the stacking yield takes a hit then it’d be nice to compensate for it by increasing the stacking yield for the coming years as well. The Bitcoin yield is a truly unique feature of the Stacks network and a high BTC yield attracts a lot of new developers and users to the network. We haven’t started fully tapping into the power of the BTC yield concept. Maintaining a healthy BTC yield in the coming years is important, especially as the network reaches escape velocity.
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.
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.
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.
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.
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?
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.
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.
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?
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.
First, they greatly increase the complexity of the system between the individual small miner and the mining process.
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.
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.
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.
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.
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?
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.
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?
Yes you do – staking the STX this way is an opportunity cost.
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.
Also, how much STX needs to be locked up to participate? Do you have concrete numbers?
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.
The staking opportunity cost is on top of the main cost, which is the sending of the BTC.
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 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.
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).