Pages

Monday, 12 March 2012

2.1 Deepbit.net


0. Introduction
Deepbit.net is one of the earliest and (in terms of hashrate) largest Bitcoin mining pools. They offer both proportional and PPS payout. At current Bitcoin mining difficulty (D= 1496978) their PPS payout is 0.00003006055006366 btc per submitted share. This amounts to a 10% fee. Since PPS pools must be able to pay miners when there are a number of longer rounds, a greater fee than for a proportional payout is necessary. The proportional payout fee is 3%.


This post will not be about the impact of strategic mining on the earnings of full time proportional miners at the pool. This topic will be covered later. For the moment, I will discuss whether the statistics published on the pool website are consistent with expected statistics, and how Pay-Per-Share (PPS) payouts compare to proportional payouts on a pool of this size. 


1. Do Deepbit.net round lengths appear geometrically distributed?
Note: Data used in this post is available here as a .csv file. Each round is Unix time timestamped, and round lengths are divided by the Bitcoin difficulty (D) at the time.


Pooled mining round lengths should be geometrically distributed. Abnormally distributed round lengths were what made the Bitclockers.com statistics fakery so obvious. 
First, a visual inspection of the data compared to geometrically distributed random round lengths. Below I've graphed Deepbit.net round lengths, as a function of D at the time the block was solved, as a histogram, and as boxplots, compared with simulated rounds.



There is nothing obviously abnormal here. Deepbit seems to have fewer very short rounds, but this assertion needs more rigorous analysis. The Deepbit.net and simulated histograms are similar, and the medians, quartiles and outliers are comparable.

2. Theoretical comparisons - statistical parameters.
Mean, median, variance, skewness and kurtosis are all statistical parameters that can describe geometric distributions. Given D is the Bitcoin mining difficulty, then the theoretical geometric distribution statistics when D = 1/p  is large are: 

mean = 1/p = D
median = -1/log(D,base=2) ~ 0.693*D
std.dev. = sqrt((1-p)/p^2) ~ D
skewness = (2-p)/sqrt(1-p) ~ 2
kurtosis = 5-p+1/(p-1) ~ 6
The statistical parameters of Deepbit.net round lengths are:
mean = 0.9888214
median = 0.6907193
st.dev = 1.00679
skewness = 2.081238
kurtosis = 5.801744
Since the round lengths are already divided by D, D=1 so the parameters of Deepbit.net's round length distribution are quite close to the values expected for a geometric distribution.


 3. Theoretical comparisons - quantiles and empirical cumulative distribution function.
The cumulative distribution function (CDF) of a Bitcoin pooled mining round lengths describes the probability that a round will be solved after a given number of shares have been contributed. For example, a large probability means that most rounds will be solved when a large number of shares are submitted. Since shorter rounds are more common, we expect the CDF to rise rapidly, and then level out and approach 1 at larger round lengths. The comparison plot below on the right shows very little difference between the theoretical CDF for geometrically distributed variables and the empirical CDF (eCDF) for Deepbit.net round lengths. The ecdf is is defined as:
ecdf = n/max(n) where 'n' is the nth datapoint in a set of data ordered by size
The Kolmogorov-Smirnov test  can be used to compare an eCDF to a theoretical CDF.In this case:

If:
H0 = Deepbit.net's round lengths belong to a geometric distribution,
HA = Deepbit.net's round lengths do not belong to a geometric distribution, then
p value = 0.8706

This means we cannot reject H0 as a hypothesis, and provides more certainty that Deepbit.net's round lengths are distributed geometrically. 


This comparison can be made clearer on a QQ (Quantile - Quantile) plot. Quantiles are points taken at regular intervals from the CDF. In this case, the quantiles are  Deepbit.net round lengths/D and comparable quantiles calculated from a quantile function, using probability values evenly distributed between 0 and 1. The same number of theoretical quantiles are generated as there are empirical quantiles. The empirical quantiles are then plotted as a function of theoretical quantiles, and in this case the relationship should be y = x. From the plot below left we see that the relationship is indeed approximately y=x, and again indicates Deepbit.net's round lengths are likely to be geometrically distributed.


4. Is Deepbit's mean round length probable?

The question of a mining pools 'luck' and round length variance is one that always concerns new miners, who also often have no way to determine if a pools 'luck' is within reason or not. Happy for miners, the Central Limit Theorem (CLT) can help us determine the likelihood of a mean round length occurring as long as we have enough data in a sample. This can be done because the CLT states that a sufficiently large number of independent random variables will be approximately normally distributed, so we can calculate the probability using a normal distribution.

From the CLT:

population mean = sample mean
population std. dev. (sd) = sample sd / sqrt(number of variables in sample, n)

For Deepbit.net:
population mean = D
sample mean = 0.9888214
sample sd   = 1.00679
n = 837
population sd = 1.00679/sqrt(837) = 0.03479975
Deepbit.net has had some 'good luck' recently. Is it likely? With the use of with the use of software (in this case R ) we can calculate the probability of a sample mean of 0.9888214*D or less occurring when the population mean is 1.
> pnorm(0.9888214,1,0.03479975)[1] 0.3740194

This indicates that such a mean would occur in every 2.7 runs of 837 rounds - not unlikely at all. The graph below provides shows this more visually.
5. Is Pay-Per-Share worthwhile?
Leaving aside the question of how strategic mining significantly affects the earnings of full-time miners on proportional pools, is the extra cost of using Pay-Per-Share (PPS) necessary, when the pool has such a large hashrate? The effect of pool based variance on a full-time miner's earnings is decreased when the pool's hashrate increases, so wouldn't a proportional payout approach a PPS payout in a shorter period of time? And PPS payout out 7% less, wouldn't a proportional payout approach a PPS payout even sooner?

We can again use the CLT to solve this. Instead of using mean round length, instead we use mean payout, which is proportional to 1/mean(roundlength/D), and 1/standard deviation(roundlength/D). Since the fee for proportional mining is 3% and the fee for PPS mining is 10%:
proportional population mean = B/D*0.97, B = Bitcoins generated per round
PPS population mean = B/D*0.9
sample sd   = 0.9932562
population sd = 0.9932562/sqrt(n), n=number of rounds
Using R's optim function  we can find out the lowest number of rounds that will provide a given likelihood that a full-time proportional miner will earn more than a full-time PPS miner. If we would like to be certain that 95 times out of 100 for a certain number of rounds that a proportional miner would earn more than a PPS full-time miner over those rounds, then:
> sd.clt<-1/sd(Deepbit.roundlength)
> norm.clt<-function(x){
+ abs(pnorm(0.9,mean=0.97,sd=sd.clt/sqrt(x))-0.05)
+ }
>
> round(optim(1,norm.clt,method='Brent',lower=1,upper=1000))
$par
[1] 562
So 562 rounds would be sufficient to allow a full-time proportional miner a significant degree of confidence that she'd earn more than a PPS miner. The current Deepbit hashrate is 3800Ghps, which will solve about 51 rounds per day. So after 11 days a full-time proportional miner will be very likely to have earned as much as or more than a PPS miner. Below is the graphical illustration of this case.  

6. Conclusions

  • Comparisons of the empirical and expected statistical parameters for Deepbit's round lengths  show little difference.
  • Quantile and CDF comparisons likewise show expected results, and the Kolmogorov-Smirnov test indicates that the null hypothesis cannot be rejected.
  • Deepbit.net's current mean round length is slightly less than expected, but not improbably so
  • A fulltime proportional miner can be quite confident that they will earn at least as much as a PPS miner within 11 days (at the current pool hashrate).
It is very probable that Deepbit.net is being honest with its statistics and is paying miners fairly.

7. The Effect of 'Pool hopping' on fulltime proportional miners at Deepbit.net
This rather contentious issue will be addressed in a following post.





Donations help give me the time to investigate pools and write these posts. If you enjoy or find them helpful, please consider a small bitcoin donation:

12QxPHEuxDrs7mCyGSx1iVSozTwtquDB3r

No comments:

Post a Comment

Comments are switched off until the current spam storm ends.