diff --git a/pool/base.php b/pool/base.php index 583ebcf6..4acf3de0 100644 --- a/pool/base.php +++ b/pool/base.php @@ -99,7 +99,7 @@ function howlongago($sec) return $des; } # -function howmanyhrs($tot, $days = false) +function howmanyhrs($tot, $days = false, $dh = false) { $sec = round($tot); if ($sec < 60) @@ -118,10 +118,35 @@ function howmanyhrs($tot, $days = false) { $dy = floor($hr / 24); $hr -= $dy * 24; - $des = $dy.'d '.$hr.'hr '.$min.'m '.$sec.'s'; + if ($dh == true) + { + if ($min >= 30) + $hr++; + $ds = ''; + if ($dy != 1) + $ds = 's'; + $hs = ''; + if ($hr != 1) + $hs = 's'; + $des = "${dy}day$ds ${hr}hr$hs"; + } + else + $des = $dy.'d '.$hr.'hr '.$min.'m '.$sec.'s'; } else - $des = $hr.'hr '.$min.'m '.$sec.'s'; + { + if ($dh == true) + { + if ($min >= 30) + $hr++; + $hs = ''; + if ($hr != 1) + $hs = 's'; + $des = "${hr}hr$hs"; + } + else + $des = $hr.'hr '.$min.'m '.$sec.'s'; + } } } return $des; diff --git a/pool/page_payout.php b/pool/page_payout.php index b6574cea..a99f09fd 100644 --- a/pool/page_payout.php +++ b/pool/page_payout.php @@ -14,7 +14,16 @@ function dopayout($data, $user) if (isset($data['info']['currndiff'])) $nd = $data['info']['currndiff']; $nv = number_format($nd, 1); - $nvx = number_format($N*$nd, 1); + $nvx = ''.number_format($N*$nd, 1).''; + $phr = $data['info']['p_hashrate24hr']; + $hr = 'is ?'; + $hrt = '?'; + if ($phr != '?' && $phr != '' && $phr > 0) + { + $hr = 'for the last day is '.dsprate($phr).''; + if ($nd > 0) + $hrt = ''.howmanyhrs($nd / ($phr / pow(2,32)), true, true).''; + } $pg = "

Payouts

@@ -28,7 +37,16 @@ The $n1 value the pool uses is $t times the network difficulty when the block is Transaction fees are included in the miner reward.
Pool fee is 0.9% of the total.

-How do the payments work?

+PPL${n1}S acts like the reward 'ramps up' when you first start mining.
What actually happens?


+The $n means it takes that long to reward your shares.
+The ramp isn't missing rewards, it's delaying them to reduce variance.
+Each share is rewarded in all the blocks found in the $n after the share.
+That's simply how it reduces variance. Each share's reward is averaged out over the $n after it.
+The pool hash rate $hr which means the $n 'ramp' is roughly $hrt.

+ +Continue reading below for more detail about how it works:

+ +How do the PPL${n1}S payments work?

The $n means the pool rewards $t times the expected number of shares, each time a block is found.
So each share will be paid approximately $ot of it's expected value, in each block it gets a reward,
but each share is also expected, on average, to be rewarded $t times in blocks found after the share is submitted to the pool.
@@ -48,7 +66,7 @@ A ckpool restart will also end the current shift and start a new shift.
A network difficulty change will also end the current shift and start a new shift.

So, what's the $n value?

-The current Bitcoin network value for $n1d is $nv and thus $n is $nvx
+The current Bitcoin network value for $n1d is $nv and thus $n is $nvx
Bitcoin adjusts the $n1d value every 2016 blocks, which is about every 2 weeks.

When a block is found, the reward process counts back shifts until the total share difficulty included is $n.
Since shares are summarised into shifts, it will include the full shift at the end of the range counting backwards,