1
This commit is contained in:
parent
00c6c95eef
commit
162210ea2e
@ -55,10 +55,8 @@ class StakingController extends BaseAuthedController {
|
||||
if ($stakingDto['remain_days'] <= 0) {
|
||||
$stackingInfo['maturity_quant'] += $stakingDto['stacked_num'];
|
||||
} else {
|
||||
$stackingInfo['daily_rewards'] += $stakingDto['cec_value'] *
|
||||
$stakingDto['daily_rewards'];
|
||||
$info['daily_staking_value'] += $stakingDto['cec_value'] *
|
||||
$stakingDto['daily_rewards'];
|
||||
$stackingInfo['daily_rewards'] += $stakingDto['daily_rewards'];
|
||||
$info['daily_staking_value'] += $stakingDto['daily_rewards'];
|
||||
}
|
||||
$stackingInfo['staked_quant'] += $stakingDto['stacked_num'];
|
||||
$stackingInfo['staking_value'] += $stakingDto['cec_value'];
|
||||
|
@ -215,6 +215,12 @@ class Staking extends BaseModel {
|
||||
$dto['stacked_days'] = max(0, $passedDays);
|
||||
$dto['remain_days'] = max(0, $saveDays - $dto['stacked_days']);
|
||||
$dto['daily_rewards'] = $dto['cec_value'] * $dailyInterest;
|
||||
/*
|
||||
error_log(json_encode(array(
|
||||
'remain_days' => max(0, $saveDays - $dto['stacked_days']),
|
||||
'daily_rewards' => $dto['daily_rewards'],
|
||||
'daily_interest' => $dailyInterest
|
||||
)));*/
|
||||
if ($dto['remain_days'] <= 0 ) {
|
||||
$dto['cec_rewards'] = $dto['daily_rewards'] * $saveDays;
|
||||
$dto['total_rewards'] = $dto['daily_rewards'] * $saveDays;
|
||||
@ -238,15 +244,15 @@ class Staking extends BaseModel {
|
||||
}
|
||||
//1 3 6 12 24
|
||||
if ($months <= 1) {
|
||||
return 0.01 / 30 * $months;
|
||||
return 0.01 / 30 / $months;
|
||||
} else if ($months <= 3) {
|
||||
return 0.05 / 30 * $months;
|
||||
return 0.05 / 30 / $months;
|
||||
} else if ($months <= 6) {
|
||||
return 0.15 / 30 * $months;
|
||||
return 0.15 / 30 / $months;
|
||||
} else if ($months <= 12) {
|
||||
return 0.4 / 30 * $months;
|
||||
return 0.4 / 30 / $months;
|
||||
} else if ($months <= 24) {
|
||||
return 1 / 30 * $months;
|
||||
return 1 / 30 / $months;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user