mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
payouts: use a new config variable for the minimum
This commit is contained in:
parent
b103cee988
commit
c28400a92e
4 changed files with 13 additions and 8 deletions
|
@ -19,6 +19,7 @@ define('YAAMP_FEES_MINING', 0.5);
|
|||
define('YAAMP_FEES_EXCHANGE', 2);
|
||||
define('YAAMP_FEES_RENTING', 2);
|
||||
define('YAAMP_PAYMENTS_FREQ', 3*60*60);
|
||||
define('YAAMP_PAYMENTS_MINI', 0.001);
|
||||
|
||||
define('YAAMP_ALLOW_EXCHANGE', false);
|
||||
define('YIIMP_PUBLIC_EXPLORER', true);
|
||||
|
|
|
@ -22,12 +22,12 @@ function BackendCoinPayments($coin)
|
|||
}
|
||||
|
||||
$txfee = floatval($coin->txfee);
|
||||
$min = max(0.001, $txfee);
|
||||
$min_payout = max(floatval(YAAMP_PAYMENTS_MINI), $txfee);
|
||||
|
||||
// if(date("w", time()) == 0 && date("H", time()) > 12) // sunday afternoon
|
||||
// $min = 0.0001;
|
||||
if(date("w", time()) == 0 && date("H", time()) > 18) // sunday evening, minimum reduced
|
||||
$min_payout = max($min_payout/10, $txfee);
|
||||
|
||||
$users = getdbolist('db_accounts', "balance>$min and coinid=$coin->id");
|
||||
$users = getdbolist('db_accounts', "balance>$min_payout and coinid={$coin->id}");
|
||||
|
||||
// todo: db field
|
||||
if($coin->symbol == 'MUE' || $coin->symbol == 'BOD' || $coin->symbol == 'DIME' || $coin->symbol == 'BTCRY')
|
||||
|
@ -38,7 +38,7 @@ function BackendCoinPayments($coin)
|
|||
if(!$user) continue;
|
||||
|
||||
$amount = $user->balance;
|
||||
while($user->balance > $min && $amount > $min)
|
||||
while($user->balance > $min_payout && $amount > $min_payout)
|
||||
{
|
||||
debuglog("$coin->symbol sendtoaddress $user->username $amount");
|
||||
$tx = $remote->sendtoaddress($user->username, round($amount, 8));
|
||||
|
@ -119,7 +119,7 @@ function BackendCoinPayments($coin)
|
|||
foreach($cold_wallet_table as $coldwallet=>$percent)
|
||||
{
|
||||
$coldamount = round($pie * $percent, 8);
|
||||
if($coldamount < $min) break;
|
||||
if($coldamount < $min_payout) break;
|
||||
|
||||
debuglog("paying cold wallet $coldwallet $coldamount");
|
||||
|
||||
|
@ -208,7 +208,7 @@ function BackendCoinPayments($coin)
|
|||
$payout->time = time();
|
||||
$payout->amount = $amount_failed;
|
||||
$payout->fee = 0;
|
||||
if ($payout->save() && $amount_failed > $txfee) {
|
||||
if ($payout->save() && $amount_failed > $min_payout) {
|
||||
$payouts[$payout->id] = $user->id;
|
||||
$addresses[$user->username] = $amount_failed;
|
||||
$mailmsg .= "{$amount_failed} {$coin->symbol} to {$user->username} - user id {$user->id}\n";
|
||||
|
|
|
@ -17,6 +17,7 @@ if (!defined('YAAMP_FEES_MINING')) define('YAAMP_FEES_MINING', 0.5);
|
|||
if (!defined('YAAMP_FEES_EXCHANGE')) define('YAAMP_FEES_EXCHANGE', 2);
|
||||
if (!defined('YAAMP_FEES_RENTING')) define('YAAMP_FEES_RENTING', 2);
|
||||
if (!defined('YAAMP_PAYMENTS_FREQ')) define('YAAMP_PAYMENTS_FREQ', 24*60*60);
|
||||
if (!defined('YAAMP_PAYMENTS_MINI')) define('YAAMP_PAYMENTS_MINI', 0.001);
|
||||
|
||||
if (!defined('YAAMP_ALLOW_EXCHANGE')) define('YAAMP_ALLOW_EXCHANGE', false);
|
||||
if (!defined('EXCH_AUTO_WITHDRAW')) define('EXCH_AUTO_WITHDRAW', 9999.9999);
|
||||
|
|
|
@ -11,6 +11,9 @@ JavascriptFile('/yaamp/ui/js/auto_refresh.js');
|
|||
|
||||
$height = '240px';
|
||||
|
||||
$min_payout = floatval(YAAMP_PAYMENTS_MINI);
|
||||
$min_sunday = $min_payout/10;
|
||||
|
||||
?>
|
||||
|
||||
<div id='resume_update_button' style='color: #444; background-color: #ffd; border: 1px solid #eea;
|
||||
|
@ -33,7 +36,7 @@ $height = '240px';
|
|||
<li>This fork based on the Yaamp published source code will be soon another open source project.</li>
|
||||
<li>No registration is required, we do payouts in the currency you mine. Use your wallet address as the username.</li>
|
||||
<li> </li>
|
||||
<li>Payouts are made automatically every 2H for all balances above <b>0.001</b>, or <b>0.0001</b> on Sunday.</li>
|
||||
<li>Payouts are made automatically every 2H for all balances above <b><?= $min_payout ?></b>, or <b><?= $min_sunday ?></b> on Sunday.</li>
|
||||
<li>For some coins, there is an initial delay before the first payout, please wait at least 6 hours before asking for support.</li>
|
||||
<li>Blocks are distributed proportionally among valid submitted shares.</li>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue