Stacking: a New Consensus Algorithm for Blockchains

I have mentioned this on Twitter already but perhaps this is the better place to get an answer.
Larry mentioned how this new algo would benefit STX holders since they invested in the project. Currently, STX investors are penalised due to the lockup and due to the higher price they paid (Yes I am aware that price can go up). My point is this: If you really care about the initial STX buyers that have provided capital to Blockstack recently AND if this new consensus is starting before the unlocking period ends AND returns are based on amount of STX, then those locked holders should receive a return proportional to their entire STX allocation, not simply how much of the x/24 they currently have.

2 Likes

The term mining here is still a bit confusing, particularly through its use wrt the whole AppMining. There is also an instruction on GitHub on how to run a BS node (will that be updated in a timely fashion after the fork or not necessary?). I am still not quite clear as to whether I will, one way or another, be able to run a validator and earn STX/BTC/XYZ for it with this new algorithm? I’d like to as currently it seems only app creators get rewarded.

1 Like

This is a very good effort. I see it as a new evolution . Now I have few questions/clarifications listed below:

1)In SIP-001 one of the highlights ,according to me was leader election , which is a random selection using cryptographic sortition algorithm. The basic structure for leader election through tunable proofs is that for some Stacks block N , the leader is selected via some function of that leader’s proof-of-work and total cryptocurrency burnt in a previous block N’ on the underlying burn chain . Now with with no burns here, will it just be replaced by no of transfers ?What will be the changes in the leader election?

  1. Also , in SIP-007 . I saw there is a line which states “Use the verifiable random function (also used by sortition) to choose 5 addresses from the reward set. These 5 addresses are the reward addresses for this block” . I assume, since VRF is used, random 5 addresses has been picked up here. But why 5? Is there any reason ?

  2. In Sip-001 fair mining pools were ensured and In the Stacks blockchain, peers can enhance their preferred fork’s chain quality by contributing tunable proofs to their preferred chain tip, wherein users can collectively generate a proof to select a chain tip to build off of and receive a proportional share of the block reward without needing to rely on any trusted middlemen to do so. Does this proportional share of block rewards still holds good? How do we ensure fair chain quality here ?

  3. Will the Selfish Mining Mitigation strategies proposed in SIP-001 still hold good here?

  4. Final one clarification, just for my understanding. Currently we are utilising BTC chain since it is stable. In future, any issues comes with BTC, we can still migrate to another stable Base chain , since STX will be a virtual chain . Is my understanding correct? Or is there any plans to get rid of base chain and launch STX as a separate chain with its native consensus algorithm ?

3 Likes

Only liquid STX can participate in Stacking and a significant percent of STX should unlock by the time this launches on mainnet. I totally see your point about someone buying on exchanges today but market dynamics are outside our control. Existing investors are also free to purchase on exchanges (if exchanges exist in their jurisdiction) and can make calculations both on existing liquid STX and from the lens on a new holder. Still early days in general :slight_smile:

2 Likes

Excellent questions @HariniRajan!

The leader election algorithm will have the same behavior, but with two changes:

  • There will no longer be a PoW component to the tunable proof. In fact, tunable proofs will be dropped altogether – the probability of being selected as the leader for the epoch will be proportional to how much BTC the miner transfers.
  • Instead of strictly burning the BTC, a miner will send the BTC to a set of outputs in the leader block commit transaction (unless, per SIP 007, Stacking isn’t active or the miner is working on a non-dominant fork).

The number of recipients determines how many outputs a leader block commit transaction has. A larger number means that the Stacking cycle can complete faster, but it also means the transactions are larger and blocks have a higher floor price (denominated by the BTC transaction fee), and have a higher chance of not making it into the current block (since they are bigger). A smaller number lowers the floor price and makes it more likely for the transaction to be mined in the next block, but makes the Stacking cycle take longer.

The number 5 was chosen because it makes it so miners can cycle through all possible Stack rewards addresses (each of which corresponds to 94K STX) about once per month, without making the block commit transaction too big.

Fair mining pools are still happening. As before, users would submit user support burn transactions that indicate which block they want to vote for. As of right now, user support burn transactions always burn their BTC, even if Stacking is happening. The burns count towards the total amount of BTC transferred for the target block, so they work to increase the probability that the miner’s block wins, as before. If the block wins, then each address that sent a user support burn would receive a fraction of the STX coinbase proportional to the fraction of BTC it contributed for the block (where the denominator is the sum of the miner’s BTC transfers and all BTC sent by user support burns for that block).

So, I haven’t submitted this to an economist yet, but I think Stacking improves the defenses against selfish mining over SIP 001. With Stacking, the STX holders themselves stand to receive rewards in BTC if there exists a single publicly-disclosed chain with at least 80% mining power. In particular, Stacking gives rational STX holders a non-zero budget for sending user support burns to help honest miners (equal to the expected amount of BTC they’d receive from Stacking). As long as STX holders spend less than this budget in user support burns to help ensure that the honest coalition receives 80% mining power, then STX holders still earn BTC. In other words, Stacking ought to ensure that a selfish miner would have to have 25% of the honest coalition’s mining power, plus the additional mining power that can be bought with whatever the expected Stacking rewards will be.

Yes! Our engineering thesis has always been to build on the most secure chain. If a better chain can be found, we’ll migrate to it.

The only way I could see this happening is if (1) all existing chains are later found to be sufficiently insecure, and (2) we can come up with a more secure design and implementation. I’m not too worried about this, because the security of Bitcoin comes not only from mining power, but also from network effects and incentive systems like Stacking that encourage honest participants to cooperate to produce a good chain (and to be vigilant against dishonest participants).

4 Likes

Hi everyone, congrats on the development! Few quick thoughts:

Positive:

  • Transferring is way more efficient than burning
  • I think the UX aspect is big for people. They can see BTC accruing in their STX wallet, aka they want more STX. Could get creative with the marketing here “Stack Sats with Blockstack” etc.
  • I like the threshold “>0.02% of STX to earn BTC”. This could be a potential buying pressure, especially if STX grows in value.

Unsure:

  • Modeling around how much BTC will accrue to STX holders, how much BTC has to be sent by validators, what happens to BTC that is sent by validators if they don’t lead a round and the value accrual around STX with BTC being more in focus here.
  • The effect of unlocks on the 0.02% threshold over time
  • The effect of major exchanges allowing their STX holders to accrue BTC.

Apologies for any spelling errors. On mobile

4 Likes

Thanks, Tom!

I totally agree that economic modeling is important. Some quick info:

The amount of BTC is tied with mining inflation. So if say 28M STX are entering the ecosystem in year 1 then at say price x that means:

total value of BTC payouts = 28M STX * (price of STX)

If you own 1% of the STX liquid supply then you can potentially earn 1% of the total value for that year (paid out by the network monthly) if you’re an active participant.

The above example assumes 100% of the liquid supply is participating. If a lower number say 50-60% of the liquid supply participate then the payout for folks who are actively participating goes up.

For monthly unlocking, in my view, the best way to model this is as percent ownership of liquid STX supply because for most people the percent ownership is not going to fluctuate too much. Yes, your STX unlocked but STX of others unlocked as well. Buys/sells on the market do not impact your percent ownership. There are corner cases here where some large institutional investors with longer unlock windows than others but these are sophisticated investors and not the general case.

We expect pooling to be the main use-case by custody partners and wallets/exchanges. People below the 100K STX line (94K initially to be precise) would have a strong incentive to pool with others either directly or through a wallet/exchange.

Hope this helps!

EDIT: A note here that please read all disclaimers about forward-looking statements etc at the top of this post and also the legal disclaimers on SIP-007. We’re just having hypothetical discussions here and answering questions about a proposal. This is just a SIP and not accepted/adopted yet.

3 Likes

Okay would love to see it in action so I may become a stacks miner. we’ll see. nice work.

Wrote this quick proposal RE Stacker pooling: A quick proposal for Stacker pooling

3 Likes

Read it, great that miners can pool in their stacks to reach the required 94k. Multisig wallets makes it simple for poolers to receive their bitcoin without risking any of their Stacks. Lets buy get some stacks!

Thanks for your answer Muneeb. While it is disappointing, it was not unexpected - and as you said - by the time this goes live, a significant amount would have been unlocked anyhow. I only mentioned it because Larry so highlighted the “advantage” for investors of this new system. That was slightly disingenuous. No need to window dress - we’re adults.

1 Like

What kind of hardware are we looking at for the validators? Ever-expensive POW hardware or home-computing style POS hardware? Makes a big difference.

1 Like

Talking about the economic model. Please let me know if my understanding is correct.

Assuming Status Quo:
MCap: $23,833,511.00
Current Circulation: 246,000,000
Current Price: $0.10
Amount of inflation in STX: 28,000,000
Which is currently worth: $2.800.000
Assuming one owns the required 94.000 (which is currently way higher than 0.02% - closer to 0.038%)
Return would then be $1064/year AKA around 11% return

However, this is assuming that the 94000 = 0.038%. Should 94.000 = 0.02% and Circulation be 470m, then ROI would be much less, at around 6%. This would be a similar ROI to POS returns of, say, Tezos but seems to be at the lower end of the spectrum. Are my calcs entirely off? Did I miss anything?

Also, I recall there being talk of a max threshold of 2 or so bn of STX in 2050. Sure, we’re all Keynesians, but eventually, inflation will be halted. What then? Or is that for our children to figure out?

4 Likes

Congrats on the development team!

Clarifying question:

So for STX holders, they stake STX to validate the Stacks blockchain, and in return get 1) a STX inflation reward proportional to their stake, 2) transaction fee from any STX transfers, and now 3) a BTC reward paid by people who sign up for an id (and pay BTC). Is this correct?

Unsure about:

In one of the responses, Muneeb mentioned limiting the # of STX that can be used to participate in this Stacking. Why not limit the number of slots and allocate them on an auction model? Isn’t this a fairer distribution of slots vs. first come first serve (can I hog all the Stacking slots on Day 1 by being a large holder)?

3 Likes

Home computers, not expensive hardware. Stackers are not doing any heavy computations, just running a node and signing messages.

4 Likes

It’s not first-come first-serve. Every STX holder can participate (through pools if your holding is below the threshold). So there are no “slots” over which there is competition, we designed this with enough bandwidth that everyone can participate (directly or through pools).

6 Likes

No.

There are two types of participants in the consensus algorithm:

  1. Stacks Miners: They mine newly minted Stacks and are spending Bitcoin in PoX fashion. Miners write blocks and get transaction fees on top of newly minted Stacks.
  2. Stacks Holders (Stackers): They hold the current liquid STX supply, run full-nodes, and receive Bitcoin payouts. They do not write blocks and do not get transaction fees. They also don’t spend Bitcoin (but receive it).
5 Likes

This is the current circulating supply on CMC and is incorrect. Circulating supply from https://explorer.blockstack.org is the most accurate and it’s ~508M.

It’s around $518 for your example, assuming $0.10 price and 100% participation. If the Stacker participation is lower this can be higher.

Main difference from PoS is that the payouts are in Bitcoin.

That’s the maximum threshold for year 2050. Inflation is supposed to continue at the minimum level beyond that. Also, a future governance and hardfork will likely decide what will happen beyond 2050.

3 Likes

Congratulations team, this looks like a potential breakthrough at first glance. Just one basic question as of now related to @jason’s point. When you say there are no slots over which there is competition, does that mean it gives every STX holder a right to participate in the pools (assuming not able to meet individual threshold)? However small their holding might be.

2 Likes

Thanks. I have modelled the ROI over a few years and unless the interest earned is reinvested, ROI decreases initially by around 25 basis points. If interest is reinvested, one can kind of maintain the yield. However, since one’s eligibility of returns is based upon having a multiple of 1/5000th, (currently, multiples of 94k STX), this means that a node operator cannot use her additional STX herself and has to find someone else to do it for her. This is analogous of the Tezos rolls, where a baker gets ops assigned as a multiple of the amount of rolls she owns. Currently, this amount is 8000XTZ and equivalent to around $10k. Now, 94k in STX are currently worth around the same, $9.4k. However, market cap is, and now I am using your numbers Muneeb, around $50m. Assuming that STX has much further to go than the puny 50m it is worth now, let’s use Tezos current MarketCap as an example $922m, and let’s assume that this will be reached in 4 years at inflation of 28m per year, we would have a STX price of around $1.42, making the 94k STX “rolls” worth around $133k. We are talking 14x more difficult for a node operator to reinvest his return than on Tezos given the same market cap, which is not very attractive and will divert capital to other places. Sure, a node operator can always “pool” together but ideally a node operator wouldn’t have to ask another node operator. I’m not sure what made the team chose the 0.02% threshold, I can only assume that beyond that, BTC transaction costs might become too high to justify paying puny node operators… I have no solution, but the threshold seems high. Disclaimer - I may not have read all the documents you issued on the idea and thereby missed the explanation on why a maximum of 5000 nodes is desired.

3 Likes