I am pleased to present Gridcoin's first Bluepaper section that covers Expected Time to Stake, Net Weight, and related concepts. On September 9th I posted a preview copy of this bluepaper section about 90% complete and asked for input. We have received a number of really good suggestions that have improved the clarity of the document.

Again I would like to thank my co-authors, @ILikeChocolate and @snipatomic, for helping put together a first class paper. Thanks to Nutney, @h202 and @hotbit for many good suggestions.

The timing of the release of this paper is good in that Gridcoin CBR is less than 15 days away. Time to get sharp on staking! Please see my earlier post on UTXO optimization, which should also be helpful to folks at https://steemit.com/gridcoin/@jamescowens/utxo-size-vs-efficiency-for-upcoming-constant-block-rewards.

Here is a modified recap from the earlier post on the bluepaper...

This bluepaper formally documents in a mathematically rigorous way the new expected time to stake algorithm I coded which is in wallet version 3.7.12.0+, and covers the staking process in Gridcoin's version of PoSv2 from a probability point of view (not security). This paper covers the following areas:

Basic Staking Probability

* Difficulty and Staking

* Estimated Time to Stake (ETTS) by the Expected Value Method

* Retargeting Algorithm

* Net Weight vs Difficulty

* Difficulty and Staking * Estimated Time to Stake (ETTS) by the Expected Value Method * Retargeting Algorithm * Net Weight vs Difficulty Cooldown

* Cooldown Correction for ETTS

* Staking Efficiency

* Cooldown Correction for ETTS * Staking Efficiency ETTS in the Gridcoin Wallet Version 3.7.12.0+

* Hybrid Approach for ETTS

* Hybrid Algorithm for ETTS

* Expected Value vs. Hybrid Approach

* Variable Probability Versions of ETTS

Note that the concepts in this paper are applicable to other PoSv2 coins, with appropriate modification of the constants. Here is a link to the pdf version of the paper. It has been written in LaTeX anticipating eventual submission to arXiv.org, and integration with other bluepaper sections.

https://drive.google.com/open?id=1NwEBSKuG2IvZXPvzbTEvZLpaN2JCP_nK

You will recognize all of the thumb rules I have published here on Steemit during the past few months, useful for ETTS calculations and the upcoming CBR. For ready reference here are the important ones. (Note I have changed the formal mathematical variable names back to words to be easier on folks.):

For a wallet with n equally sized UTXOs...

(UTXO Value) = Balance / n

For ETTS...

(ETTS without cooldown) = (10000/Balance) * Difficulty

or (ETTS without cooldown) = (1/960) * ((net weight) / Balance)

(ETTS with cooldown) = ((cooldown time) / n) + (ETTS without cooldown)

where (cooldown time) = 2/3 day

Net Weight...

(net weight) = 10000000 * Difficulty

UTXO size for desired efficiency

(UTXO value) = 15000 * Difficulty * (1/E - 1), where E is the desired efficiency % as a decimal, i.e. 95% is 0.95.

Note that E = (staking frequency with cooldown) / (ideal staking frequency without cooldown) which is also

E= (ETTS without cooldown) / (ETTS with cooldown)

ETTS modified for different "confidence levels" besides the 63% for the expected value version...

(ETTS with cooldown at Confidence P) =((cooldown time) / n) - ln(1 - P) * (10000/Balance) * Difficulty

In particular, the 80% level used in the wallet gives

(ETTS with cooldown at 80%) = ((cooldown time) / n) * (16000/Balance) * Difficulty

I hope this paper provides some much needed clarity in this subject area and will be of good use as a reference.