1
This commit is contained in:
parent
aa656832a5
commit
7eac65b4ed
@ -182,7 +182,8 @@ class BaseAuthedController extends BaseController {
|
||||
if (SERVER_ENV != _ONLINE && empty($this->address)) {
|
||||
$this->address = strtolower('0xa9ecB9F3A0b54d31ce4a035C89EC7Da4110beB59');
|
||||
if (myself()->_getAccountId() == '6513_2006_3WOWIsmpcihK1KTnNP1Ky5MBOh7rt6Rl') {
|
||||
$this->address = strtolower('0x0bb52209756e8d157f2e551a9adb8d9019b688b1');
|
||||
///$this->address = strtolower('0x0bb52209756e8d157f2e551a9adb8d9019b688b1');
|
||||
$this->address = strtolower('0xbd2d6de4b70d370954b187c95dddfbd00f4129ff');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ class StakingController extends BaseAuthedController {
|
||||
{
|
||||
parent::_handlePre();
|
||||
if (SERVER_ENV != _ONLINE) {
|
||||
myself()->_setTimeOffset(3600 * 24 * 2);
|
||||
myself()->_setTimeOffset(3600 * 24 * 31);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,12 +239,16 @@ class Staking extends BaseModel {
|
||||
'redeem_time' => myself()->_getDaySeconds($dto['redeem_time'])
|
||||
)));
|
||||
}*/
|
||||
$rate = 0.25;
|
||||
if ($stakedDays >= $saveDays) {
|
||||
$rate = 1;
|
||||
}
|
||||
if ($saveDays >= 30 * 12 * 2) {
|
||||
$stakedDays = max($stakedDays, 0);
|
||||
$dto['cec_rewards'] = ($dto['cec_value'] * (0.6 / 30 / 12)) * min(30 * 12, $stakedDays) * 0.25;
|
||||
$dto['cec_rewards'] += ($dto['cec_value'] * (0.4 / 30 / 12)) * max(0, $stakedDays - 30 * 12) * 0.25;
|
||||
$dto['cec_rewards'] = ($dto['cec_value'] * (0.6 / 30 / 12)) * min(30 * 12, $stakedDays) * $rate;
|
||||
$dto['cec_rewards'] += ($dto['cec_value'] * (0.4 / 30 / 12)) * max(0, $stakedDays - 30 * 12) * $rate;
|
||||
} else {
|
||||
$dto['cec_rewards'] = $dto['daily_rewards'] * $stakedDays * 0.25;
|
||||
$dto['cec_rewards'] = $dto['daily_rewards'] * $stakedDays * $rate;
|
||||
}
|
||||
$dto['total_rewards'] = $dto['cec_rewards'];
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user