Browse Source

php - update payout explanation

master
kanoi 9 years ago
parent
commit
c469ad83c0
  1. 2
      pool/inc.php
  2. 63
      pool/page_payout.php

2
pool/inc.php

@ -91,6 +91,8 @@ span.login {float:right;margin-left:8px;margin-right:24px;}
span.hil {color:blue;} span.hil {color:blue;}
span.user {color:green;} span.user {color:green;}
span.addr {color:brown;} span.addr {color:brown;}
span.hdr {font-weight:bold;text-decoration:underline;}
span.nn {font-weight:bold;color:red;}
span.warn {color:orange;font-weight:bold;} span.warn {color:orange;font-weight:bold;}
span.urg {color:red;font-weight:bold;} span.urg {color:red;font-weight:bold;}
span.err {color:red;font-weight:bold;font-size:120%;} span.err {color:red;font-weight:bold;font-size:120%;}

63
pool/page_payout.php

@ -2,20 +2,55 @@
# #
function dopayout($data, $user) function dopayout($data, $user)
{ {
$pg = '<h1>Payouts</h1>'; $t = '<span class=nn>5</span>';
$pg .= '<table width=75% cellpadding=0 cellspacing=0 border=0>'; $ot = '<span class=nn>1/5</span>';
$pg .= '<tr><td class=dc>'; $n = '<span class=nn>5Nd</span>';
$pg .= 'We use PPLNS (pay per last N shares)<br><br>'; $n1 = '<span class=nn>N</span>';
$pg .= 'The N value used for PPLNS is 5 times the network difficulty'; $bc = '+101 Confirms';
$pg .= ' when a block is found,<br>'; $bm = 'Matured';
$pg .= 'but includes the full shift at the start and end of the range,<br>'; $nd = 0;
$pg .= 'so it usually will be a bit more than 5N.<br><br>'; if (isset($data['info']['currndiff']))
$pg .= 'Shifts are ~50min long, however, when we find any pool blocks<br>'; $nd = $data['info']['currndiff'];
$pg .= 'the current shift ends at the point the block was found.<br>'; $nv = number_format($nd, 1);
$pg .= 'A ckpool restart will also start a new shift.<br><br>'; $nv5 = number_format(5.0*$nd, 1);
$pg .= 'Transaction fees are included in the miner payout.<br>'; $pg = "<h1>Payouts</h1>
$pg .= 'Pool fee is 0.9% of the total.<br>'; <table width=75% cellpadding=0 cellspacing=0 border=0><tr><td>
$pg .= '</td></tr></table>';
<span class=hdr>What payout method does the pool use?</span><br><br>
We use <b>PPL${n1}S</b> (<b>P</b>ay <b>P</b>er <b>L</b>ast $n1 <b>S</b>hares)<br><br>
<b>PPL${n1}S</b> means that when a block is found, the block reward is shared among the last $n1 shares that miners sent to the pool, up to when the block was found.<br>
The $n1 value the pool uses is $t times the network difficulty when the block is found - '$n'.<br><br>
<span class=hdr>How much of each block does the pool reward?</span><br><br>
Transaction fees are included in the miner reward.<br>
Pool fee is 0.9% of the total.<br><br>
<span class=hdr>How do the payments work?</span><br><br>
The $n means the pool rewards $t times the expected number of shares, each time a block is found.<br>
So each share will be paid appoximately $ot of it's expected value, in each block it gets a reward,<br>
but each share is also expected, on average, to be rewarded $t times in blocks found after the share is submitted to the pool.<br>
i.e. if pool luck was always 100% then each share is expected to be rewarded $t times.<br><br>
If pool luck is better than 100%, then the average share reward wil be better than $t times.<br>
If pool luck is lower than 100%, then the average share reward will be less than $t times.<br><br>
<span class=hdr>What's a shift?</span></br><br>
When your miner sends shares to the pool, the shares are not stored individually, but rather summarised into shifts.<br>
Shifts are ~50min or less in length, however, when we find any pool blocks the current shift ends early,<br>
at the point the block was found.<br>
A ckpool restart will also end the current shift and start a new one.<br><br>
<span class=hdr>So, what's the $n value?</span><br><br>
The current Bitcoin network value for $n1 is <b>$nv</b> and thus $n is <b>$nv5</b><br>
Bitcoin adjusts the $n1 value every 2016 blocks, which is about every 2 weeks.<br><br>
When a block is found, the reward process counts back shifts until the total share difficulty included is $n.<br>
Since shares are summaried into shifts, it will includes the full shift at the end of the range counting backwards,<br>
so it usually will be a bit more than $n.<br><br>
<span class=hdr>When are payments sent out?</span><br><br>
The block 'Status' must first reach '$bc' on the Blocks page, and then is flagged as '$bm', before the reward is distributed.<br>
The block reward is sent out manually soon after that.<br><br>
</td></tr></table>";
return $pg; return $pg;
} }
# #

Loading…
Cancel
Save