# Slot leader schedule & historical assignments

I’m hoping for a layman explanation about how Oroborus Praus goes about slot leader assignments and how it relates to gambler’s fallacy.

I flip a coin 10 times and it lands heads all 10 times. The 11th flip still has a 50/50 chance of landing heads, regardless of the 10 previous flips. Gambler’s fallacy would make you believe that the 11th flip has a greater chance of being tails, because there is no way it’ll land 11 times heads in a row.

When the cardano protocol goes about slot leader assignment, is the probability similar to that of flipping a coin, in that the history of assignments has no impact on future assignments?
Is there some memory built in that makes up for bad or good luck in the past?

Could you please source any answer back to the original documentation and not provide ‘I think’ answers.

Thanks

I got asked this by a delegator by email during an unusually long “losing streak” when our pool was in its adolescence. I recalled this posting which confirmed, via the IOHK developers, that the block assignments (or frequencies, as observed by an individual stake pool) are not “independent events” (as in your coin flips)…

… but related events characterised by this process of distributing pseudo-random numbers:

My maths background is only at the Engineering level (I’m not a theorist) so here is how I explained it to that delegator along with the references above:

That would be true if the selections of where to produce each block were independent, like the unrelated coin tosses… which in the case of Cardano Ouroboros they are not. The random events follow a Poisson distribution which, as I understand it, like coin flips is also binomial and covers all possibilities eventually.

How those possibilities manifest is beyond me but the math assures that all possibilities applicable to a unique staking key will be covered, “as time approaches infinity” & more so the farther you go. The more time you give it, the more the distribution will look uniform… but will always look “clumped” under close observation.

My empirical observation has borne this out very well: during that dry period we had a about ⅓ chance of producing a block each epoch and we got zero blocks for 9 epochs. The probability of this happening was pretty low (⅔ ^ 9 ≈ 2.6%). After that we entered an period of similar length & improbability: our block production was “rounded up” from an expected 1-point-something to produce at least 2 blocks in every single epoch, several epochs in a row. In the interest of providing a practical example, you can look up our pool & see it’s making our current results look stunning but that’s mainly in response to that prior deficit.

Of course you would need more than just a “flip” after a “flop” to prove what I am saying, but the initial observations of apparently random character do start to look deterministic over time, as well as being mathematically provable if you can understand the Poisson reference above (I have to take those assurances on face value from the experts and maybe the IOHK lads can confirm them again here). Rather than coin tosses, it’s more like all stake pools cover a different walking path each epoch through a field of probability where every patch of ground eventually needs to be covered equally.

8 Likes

This is very nice explanation!

2 Likes

Hi @COSDpool,

I am not sure if you are looking for someone to post their experience of the process here, but I’ll do it anyway (what follows are very rough numbers).

Until receiving IOG’s delegation, our pool had about 400k ADA on it, with a 1/5 chance of minting a block per epoch (give or take).

With its current size, 3.6M ADA, the pool has a nearly 1/1 chance of minting a block every epoch.

In 8 epochs we minted 7 blocks, with <= 400K delegation, thereby vastly exceeding the expectations. After that…The Desert of the Tartars ! The “dry” streak continues (it has now been 5 full epochs), even in the current one (247) with the above mentioned huge increase in active stake. To me this confirms the deterministic nature of the process: each epoch may be independent, but if you had a streak of good ones, expect a period to compensate for that

1 Like

Hi Adrem, I haven’t gone through the detail of the slot leader selection works, but I would be very surprised if there was some sort of deterministic way to predict how many blocks and when a pool other than the one you control will mint. This would imply that a delegator could pre plan in advance how to hop between pools and in the extreme beat the purpose of decentralisation. This would essentilly mean that every delegator would be shifting his/her stake all the time thereby concentrating the stake on the “best” pool at every epoch… this would just be chaos!

Also you’d be surprised that human beings actually are very bad at determining what is random and what is not. If asked a human to write a sequence of heads and tails a human is more likely to write a sequence that alternatives between heads and tails , such as HTHTHTHTH, whereas a truly random sequence needs runs of heads and tails to be random. Something like HHTTTHTHTHTHHHHHHHTTT is actually more random than HTHTHTHTHTHTH !

So in short, just ignore the short term, know that in the long term if you stick around you’ll be at an average and focus on running a reliable pool and write guides on why there are streaks

Delegators can and should monitor the performance of the pools they delegate to. ‘Hopping’ between pools is not possible by definition though, as delegation preferences take effect after 2 full epochs, and constantly switching would result in no rewards for the delegator at all.

What we are talking about here is different: the assignment of a slot to a pool has a probability which is linked to sigma (the proportion of stake over the total of the staked ADA). The more delegation you have, the more likely it is that you are assigned a slot to mint a block into. It appears that over time (as you say) that probability will even out, but this is different from saying that the probability will be the same (provided your delegation stays the same) each epoch.

In other words: we are not looking at a ‘memory-less’ Markov Chain. Let’s go to your coin toss example, and frame it slightly differently:

A population of wolves is estimated to be roughly divided in 50% white coat, and 50% dark coat;

If my sampling is random and representative and I have done enough of it, over time I should be able to confirm statistically that the wolf population is indeed half white and half dark. This is true irrespective of the fact that my sampling events are independent of one another: of course if I only sample in an area where all wolves are white, I end up lacking independence and I violate the assumption of randomness of my sampling as well, therefore, my sampling ends up being not representative of the true colours of the wolf population;

Even if sampling is done correctly, it is still possible to oversample for one of the two colour variants (due to the random nature of your effort): this is where more sampling is needed. In your example, with a truly unbiased coin, each toss is assumed independent, but it is still possible, although highly improbable, to get HHHHHHHHHHHHHHH. At this point, if the system is memory-less it would still predict a .5 chance of H vs T for the following toss. However, frequentist statistics predict that over time the distribution of tosses should be nearly .5H and .5T. It follows that it is reasonable to expect a higher probability of T after a streak of HHHHHHHHHHHHHHH.

In conclusion, I think we are saying very similar things

Cheers,

A

Hey, good discussion!

The delegator actually still makes return from the old pool for the 2 epochs after he chose to switch to a new pool. So there is no loss income from switching.

In terms of markov chain or not, I would expect it to be a markov chain. So the odds of producing blocks in this epoch are not dependent of whether the pool produced in the previous epoch.

And after a HHHHHHHHHHH the odds of getting a Tail is still just 50% as long as there is no bias.

Cheers

For the individual toss, yes. But when we comment on lucky or unlucky streaks for a pool, we are commenting on sampling. You are on the dot when you say it evens out through time, but that’s because we have more data (more epochs, more samples = better representation of truth).

Markov Chains have no assumptions, as they are tools that belong in Bayesian stats. Every iteration of the chain places itself in a parameter space and attempts to give predictions based on it. In the next iteration all the pregress information is ‘forgotten’. This is not the case here. But I am no statistician, and I am not convinced this is a topic of interest for many.

Yes, but this is provided that the new delegator waits at least long enough (2 epochs) for their original delegation preference to take effect.

Agreed, good discussion going

Cheers,

A