This commit is contained in:
aozhiwei 2023-08-29 16:41:42 +08:00
parent 0b55409cc6
commit 77259bd1ec

View File

@ -215,6 +215,13 @@ class Staking extends BaseModel {
$dto['stacked_days'] = max(0, $passedDays);
$dto['remain_days'] = max(0, $saveDays - $dto['stacked_days']);
$dailyInterest = self::getDailyInterest($row['stake_time'], $dto['remain_days']);
if ($saveDays >= 30 * 12 * 2) {
if ($dto['remain_days'] < 30 * 12) {
$dailyInterest *= 0.6;
} else {
$dailyInterest *= 0.4;
}
}
$dto['daily_rewards'] = $dto['cec_value'] * $dailyInterest;
/*
error_log(json_encode(array(