"; echo "
$title
"; echo "
"; } $showrental = (bool) YAAMP_RENTAL; $algo = user()->getState('yaamp-algo'); $total_rate = yaamp_pool_rate(); $total_rate_d = $total_rate? 'at '.Itoa2($total_rate).'h/s': ''; if($algo == 'all') $list = getdbolist('db_coins', "enable and visible order by index_avg desc"); else $list = getdbolist('db_coins', "enable and visible and algo=:algo order by index_avg desc", array(':algo'=>$algo)); $count = count($list); if($algo == 'all') $worker = getdbocount('db_workers'); else $worker = getdbocount('db_workers', "algo=:algo", array(':algo'=>$algo)); if ($showrental) $services = getdbolist('db_services', "algo=:algo ORDER BY price DESC", array(':algo'=>$algo)); else $services = array(); //////////////////////////////////////////////////////////////////////////////////// $coin_count = $count > 1 ? "on $count wallets" : 'on a single wallet'; $miner_count = $worker > 1 ? "$worker miners" : "$worker miner"; WriteBoxHeader("Mining $coin_count $total_rate_d, $miner_count"); showTableSorter('maintable3', "{ tableClass: 'dataGrid2', textExtraction: { 3: function(node, table, n) { return $(node).attr('data'); }, 6: function(node, table, n) { return $(node).attr('data'); }, 7: function(node, table, n) { return $(node).attr('data'); } } }"); echo << Name Amount Diff Block TTF*** Hash** Profit* END; if($algo != 'all' && $showrental) { $hashrate_jobs = yaamp_rented_rate($algo); $hashrate_jobs = $hashrate_jobs? Itoa2($hashrate_jobs).'h/s': ''; $price_rent = dboscalar("select rent from hashrate where algo=:algo order by time desc", array(':algo'=>$algo)); $price_rent = mbitcoinvaluetoa($price_rent); $amount_rent = dboscalar("select sum(amount) from jobsubmits where status=1 and algo=:algo", array(':algo'=>$algo)); $amount_rent = bitcoinvaluetoa($amount_rent); } foreach($list as $coin) { $name = substr($coin->name, 0, 12); $difficulty = Itoa2($coin->difficulty, 3); $price = bitcoinvaluetoa($coin->price); $height = number_format($coin->block_height, 0, '.', ' '); // $pool_ttf = $coin->pool_ttf? sectoa2($coin->pool_ttf): ''; $pool_ttf = $total_rate? $coin->difficulty * 0x100000000 / $total_rate: 0; $reward = round($coin->reward, 3); $btcmhd = yaamp_profitability($coin); $pool_hash = yaamp_coin_rate($coin->id); $real_ttf = $pool_hash? $coin->difficulty * 0x100000000 / $pool_hash: 0; $pool_hash_sfx = $pool_hash? Itoa2($pool_hash).'h/s': ''; $real_ttf = $real_ttf? sectoa2($real_ttf): ''; $pool_ttf = $pool_ttf? sectoa2($pool_ttf): ''; $pool_hash_pow = yaamp_pool_rate_pow($coin->algo); $pool_hash_pow_sfx = $pool_hash_pow? Itoa2($pool_hash_pow).'h/s': ''; $min_ttf = $coin->network_ttf>0? min($coin->actual_ttf, $coin->network_ttf): $coin->actual_ttf; $network_hash = $coin->difficulty * 0x100000000 / ($min_ttf? $min_ttf: 60); $network_hash = $network_hash? 'network hash '.Itoa2($network_hash).'h/s': ''; if(controller()->admin && $services) { foreach($services as $i=>$service) { if($service->price*1000 < $btcmhd) continue; $service_btcmhd = mbitcoinvaluetoa($service->price*1000); echo ""; echo ""; echo "$service->name"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "$service_btcmhd"; echo ""; unset($services[$i]); } } if(isset($price_rent) && $price_rent > $btcmhd) { echo ""; echo ""; echo "Rental"; echo "$amount_rent BTC"; echo ""; echo ""; echo ""; echo "$hashrate_jobs"; echo "$price_rent"; echo ""; unset($price_rent); } if(!$coin->auto_ready) echo ""; else echo ""; echo ''; echo $coin->createExplorerLink(''); echo ''; $owed = dboscalar("select sum(balance) from accounts where coinid=$coin->id"); if(YAAMP_ALLOW_EXCHANGE && $coin->balance+$coin->mint < $owed*0.9 ) { $owed2 = bitcoinvaluetoa($owed - $coin->balance); $symbol = $coin->getOfficialSymbol(); $title = "We are short of this currency ($owed2 $symbol). Please switch to another currency until we find more $symbol blocks."; echo "id}\" title=\"$title\" style=\"color: #c55;\">$name ({$coin->algo})"; } else { echo "$name ($coin->algo)"; } echo "$reward $coin->symbol_show"; $title = "POW $coin->difficulty"; if($coin->rpcencoding == 'POS') $title .= "\nPOS $coin->difficulty_pos"; echo ''.$difficulty.''; if(!empty($coin->errors)) echo "$height"; else echo "$height"; if(!YAAMP_ALLOW_EXCHANGE && !empty($real_ttf)) echo ''.$real_ttf.''; elseif(!empty($real_ttf)) echo ''.$pool_ttf.''; else echo ''.$pool_ttf.''; if($coin->auxpow && $coin->auto_ready) echo "$pool_hash_pow_sfx"; else echo "$pool_hash_sfx"; $btcmhd = mbitcoinvaluetoa($btcmhd); echo "$btcmhd"; echo ""; } if(controller()->admin && $services) { foreach($services as $i=>$service) { $service_btcmhd = mbitcoinvaluetoa($service->price*1000); echo ""; echo ""; echo "$service->name"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "$service_btcmhd"; echo ""; } } if(isset($price_rent) && $showrental) { echo ""; echo ""; echo "Rental"; echo "$amount_rent BTC"; echo ""; echo ""; echo ""; echo "$hashrate_jobs"; echo "$price_rent"; echo ""; unset($price_rent); } echo ""; echo '

 *** estimated average time to find a block at full pool speed
 ** approximate from the last 5 minutes submitted shares
 * 24h estimation from net difficulty in mBTC/MH/day (GH/day for sha & blake algos)

'; echo "

";