You are viewing a single comment's thread from:

RE: A quick rule of thumb formula for calculating expected time to stake

in #gridcoin7 years ago (edited)

Do you have a relatively large or small balance? If you have a large balance you will need to ensure you have it split up among several UTXOs to ensure you don’t get caught by the 16 hour cool down. The whole amount in the UTXO selected must be staked. That UTXO is not available for staking again for 16 hours.

Sort:  

I think in the grand scheme of things my balance should be considered small.

According to your formula i should stake ~ once every 7 days, but my last stake was 16 days ago, and before that 5 weeks went by between stakes.

Its probably just the luck of the draw.

A better explanation of UTXO's would be nice. My balance is split in about 100 small amounts from 1.2 to 60 GRC, adding up to my grand total. Would it be better for me to add them together into a few bigger amounts?

One of the redditors claims he started to stake with his small balance after consolidating the wallet, what you do just by sending whole balance to yourself.

Also, expected time to stake =/= certainty to stake within that time

OK, I think I'll try to consolidate my wallet into larger chunks of e.g. 500 GRC, and see if it makes any difference.

And I completely understand that expected time to stake is not equal to actual time to stake. There is a good deal of randomness to the staking process, nothing is guaranteed.

At difficulty 1 a 500 GRC UTXO has each a chance to stake at least once within 34 days of only ~82%, I would consider bigger UTXOs. 2000 gives you a 82% chance to stake at least once within 8.5 days, while expected time is ~5 days.

There should be very little difference whether you have 4 x 500 or 1 x 2000, (4x500 should allow for slightly more frequent stakes due to 16h cooldown time) but not everything is understood yet. While we have done several calculations, as far as I know nobody tested actual wallet behaviour.

My capacity of making bigger UTXO's is somewhat limited by the amount of GRC that I own :)

The real question is, is it better to have one 600 UTXO or 10 x 60 UTXO's?

I suspect the 1 x 600GRC UTXO will stake more often than the 10 X 60GRC UTXO's, but statistically this shouldn't be true?

I know you end up getting your interest and your DPOR's anyway (as long as you stake at least once every 6 months), but I want to have some degree of regularity to my staking, if at all possible.

The miner loops through all eligible UTXOs essentially every 16 sec (it is actually every 8, but there is a quantum of 16 sec applied to the transaction times, so it is effectively every 16) and tests for whether the candidate hash is less than the target * coinweight.

This is a series of Bernoulli trails with probability p for each trial where p = target * coinweight / maxhash.

If you have a small balance, such that you are going to stake only once every few days, it makes little sense to have more than a few UTXO’s for staking, because the expected TTS is beyond the 16 hour staking cooldown.

What happens if you have one UTXO originally and then take your coinweight (i.e. balance * 80) and chop it up into 10 UTXOs? Then for each miner loop you are going to run up to 10x as many bernoulli trails with 1/10 of the probability for each one compared to the original. And you have to remember, the probability for each one of these is pretty small...

For an expected TTS of 1 day (10000 GRC), that is 24*3600/16 quanta, or 5400 trips through the miner. So with one UTXO, the “coin toss”will have been thrown 5400 times, and with 10 the “coin toss” will have been done up to 54000 times over that day when the success (stake) happens.

Note that the probability of success after k trials of a coin p is geometricallly distributed.

Let’s put it together. For Bernoulli trials, the expected value of the number of throws is 1/p.

So for a one day expected TTS for one UTXO, this would be 24*3600/16 throws=5400. So p=1/5400. If you split your balance into 10 UTXO’s evenly sized, then p for each UTXO goes down by a factor of 10. So each p is now 1/54000. Now asking the question of what the expected number of throws is for that p? It is 54000! What? ten times as long? No. Remember that the miner every 16 seconds loops through ALL UTXOs very quickly and then goes back to sleep, so 54000 trails are done as 5400 groups of 10 spaced at 16 sec intervals. This gets us back to 1 day.

The bottom line is that from an EXPECTATION perspective, chopping up UTXO’s into finer ones results in the same expected time to stake, IGNORING the 16 hour cooldown effect.

Thank you for this very detailed response :)

To be 100% certain requires an infinite amount of time. The expected value is the mean of a distribution, after all..