ooc mentioned we have now inadvertently introduced an effective fee with the cap, will have to look at the value of this and work out best way to handle it.
.. and Meni just did all that:
If you cap sd so that it is never more than X, you should use instead
[(1-a)/(1-a*wd^(1-a)*X^(a-1)]*(wd*B/D)*(sd/wd)^a
and it only took a few minutes, too (insert jealous grumbling here).
It would have taken more without my
silicon overlord. Or less if it did a better job with the final simplification.
I don't think it would be off topic if you showed us how you derived that?
Wlog we assume wd*B/D=1. The pdf of sd for sd>=wd is wd/sd^2 and the payout is (sd/wd)^a. So without a cap and without a constant factor, the expected payout is
\int_{wd}^{\infty}(wd/sd^2)(sd/wd)^a\ sd
This is 1/(1-a), and thus we need a constant factor of (1-a) to make this equal to 1.
With sd capped to X the integral becomes
\int_{wd}^{X}(wd/sd^2)(sd/wd)^a\ sd + \int_X^{\infty}(wd/sd^2)(X/wd)^a\ sd
The second term is (X/wd)^(a-1) and the first term (by subtracting the primitive function at the endpoints) is (1-wd^(1-a)*X^(a-1))/(1-a). Add to get [(1-a*wd^(1-a)*X^(a-1))/(1-a)], so the constant term should be [(1-a)/(1-a*wd^(1-a)*X^(a-1))].
Meni has already done this for standard PPS, but I'm not sure if his derivation applies to random variables with infinite variance.
It's not. It would be interesting to figure out if it's possible to bound the bankruptcy probability with infinite variance, I'm inclined to think that it's impossible.
Now I'm not sure if the probability of bankruptcy is 1, or if it is bounded but only polynomially.
Discussion of the variance of this will follow.
With solo mining, the relative variance is roughly D/wd. With the uncapped pay-on-target payout, it is a^2/(1-2a). With the capped formula, the variance is
-1+((-1 + a)^2 X (-wd^(2 a) X + 2 a wd X^(2 a)))/((-1 + 2 a) (-wd^a X + a wd X^a)^2)
Which for a>1/2 grows like X^(2a-1). Whatever the variance, as long as it is finite it can be plugged into the PPS safety net analysis.
With a cap you can even make a greater than 1. Solo mining is essentially this with a = infinity and X = D. Normal PPS is X = wd and a can be anything.