1
This commit is contained in:
parent
432cfd8f50
commit
463981ebcc
@ -241,7 +241,7 @@ class Staking extends BaseModel {
|
||||
} else {
|
||||
if ($saveDays >= 30 * 12 * 2) {
|
||||
$dto['cec_rewards'] = $srcDailyRewards * min(30 * 12, $stakedDays) * 0.6 * 0.25;
|
||||
$dto['cec_rewards'] += $srcDailyRewards * max(0, 30 * 12 * 2 - $stakedDays) * 0.6 * 0.25;
|
||||
$dto['cec_rewards'] += $srcDailyRewards * max(0, 30 * 12 * 2 - $stakedDays) * 0.4 * 0.25;
|
||||
} else {
|
||||
$dto['cec_rewards'] = $dto['daily_rewards'] * ($saveDays - $dto['remain_days']) * 0.25;
|
||||
}
|
||||
@ -249,8 +249,16 @@ class Staking extends BaseModel {
|
||||
$dto['total_rewards'] = $dto['cec_rewards'];
|
||||
} else {
|
||||
if ($dto['remain_days'] <= 0 ) {
|
||||
$dto['cec_rewards'] = $dto['daily_rewards'] * $saveDays;
|
||||
$dto['cec_rewards'] = $srcDailyRewards * $saveDays;
|
||||
} else {
|
||||
if ($saveDays >= 30 * 12 * 2) {
|
||||
$dto['cec_rewards'] = $srcDailyRewards * min(30 * 12, $stakedDays) * 0.6 * 0.25;
|
||||
$dto['cec_rewards'] += $srcDailyRewards * max(0, 30 * 12 * 2 - $stakedDays) * 0.4 * 0.25;
|
||||
} else {
|
||||
$dto['cec_rewards'] = $dto['daily_rewards'] * ($saveDays - $dto['remain_days']) * 0.25;
|
||||
}
|
||||
}
|
||||
//$dto['total_rewards'] = $dto['cec_rewards'];
|
||||
$dto['total_rewards'] = $dto['daily_rewards'] * ($saveDays - $dto['remain_days']);
|
||||
}
|
||||
return $dto;
|
||||
|
Loading…
x
Reference in New Issue
Block a user