diff --git a/webapp/models/Staking.php b/webapp/models/Staking.php index 9921fffa..a9d20005 100644 --- a/webapp/models/Staking.php +++ b/webapp/models/Staking.php @@ -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.4 * 0.25; + $dto['cec_rewards'] += $srcDailyRewards * max(0, $stakedDays - 30 * 12) * 0.4 * 0.25; } else { $dto['cec_rewards'] = $dto['daily_rewards'] * ($saveDays - $dto['remain_days']) * 0.25; } @@ -252,14 +252,13 @@ class Staking extends BaseModel { $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; + $dto['cec_rewards'] = $srcDailyRewards * min(30 * 12, $stakedDays) * 0.6; + $dto['cec_rewards'] += $srcDailyRewards * max(0, $stakedDays - 30 * 12) * 0.4; } else { - $dto['cec_rewards'] = $dto['daily_rewards'] * ($saveDays - $dto['remain_days']) * 0.25; + $dto['cec_rewards'] = $dto['daily_rewards'] * ($saveDays - $dto['remain_days']); } } - //$dto['total_rewards'] = $dto['cec_rewards']; - $dto['total_rewards'] = $dto['daily_rewards'] * ($saveDays - $dto['remain_days']); + $dto['total_rewards'] = $dto['cec_rewards']; } return $dto; }