@@ -56,7 +56,7 @@ contract DoubleSidePool is Initializable, AccessControl, IOnBlockListener {
56
56
uint stakedAt;
57
57
}
58
58
59
- uint constant public MILLION = 1_000_000 ;
59
+ uint constant public BILLION = 1_000_000_000 ;
60
60
61
61
LockKeeper public lockKeeper;
62
62
RewardsBank public rewardsBank;
@@ -287,7 +287,7 @@ contract DoubleSidePool is Initializable, AccessControl, IOnBlockListener {
287
287
function _addInterestMainSide () internal {
288
288
if (mainSideInfo.lastInterestUpdate + mainSideConfig.interestRate > block .timestamp ) return ;
289
289
uint timePassed = block .timestamp - mainSideInfo.lastInterestUpdate;
290
- uint newRewards = mainSideInfo.totalStake * mainSideConfig.interest * timePassed / MILLION / mainSideConfig.interestRate;
290
+ uint newRewards = mainSideInfo.totalStake * mainSideConfig.interest * timePassed / BILLION / mainSideConfig.interestRate;
291
291
292
292
mainSideInfo.totalRewards += newRewards;
293
293
mainSideInfo.lastInterestUpdate = block .timestamp ;
@@ -364,7 +364,7 @@ contract DoubleSidePool is Initializable, AccessControl, IOnBlockListener {
364
364
mainSideInfo.totalRewards -= rewardsAmount;
365
365
_updateRewardsDebt (false , user, _calcRewards (false , mainSideStakers[user].stake));
366
366
367
- uint penalty = amount * mainSideConfig.fastUnstakePenalty / MILLION ;
367
+ uint penalty = amount * mainSideConfig.fastUnstakePenalty / BILLION ;
368
368
if (mainSideConfig.token == address (0 )) {
369
369
payable (msg .sender ).transfer (amount - penalty);
370
370
} else {
@@ -382,7 +382,7 @@ contract DoubleSidePool is Initializable, AccessControl, IOnBlockListener {
382
382
function _addInterestDependantSide () internal {
383
383
if (dependantSideInfo.lastInterestUpdate + dependantSideConfig.interestRate > block .timestamp ) return ;
384
384
uint timePassed = block .timestamp - dependantSideInfo.lastInterestUpdate;
385
- uint newRewards = dependantSideInfo.totalStake * dependantSideConfig.interest * timePassed / MILLION / dependantSideConfig.interestRate;
385
+ uint newRewards = dependantSideInfo.totalStake * dependantSideConfig.interest * timePassed / BILLION / dependantSideConfig.interestRate;
386
386
387
387
dependantSideInfo.totalRewards += newRewards;
388
388
dependantSideInfo.lastInterestUpdate = block .timestamp ;
@@ -462,7 +462,7 @@ contract DoubleSidePool is Initializable, AccessControl, IOnBlockListener {
462
462
dependantSideInfo.totalRewards -= rewardsAmount;
463
463
_updateRewardsDebt (true , user, _calcRewards (true , dependantSideStakers[user].stake));
464
464
465
- uint penalty = amount * dependantSideConfig.fastUnstakePenalty / MILLION ;
465
+ uint penalty = amount * dependantSideConfig.fastUnstakePenalty / BILLION ;
466
466
if (dependantSideConfig.token == address (0 )) {
467
467
payable (msg .sender ).transfer (amount - penalty);
468
468
} else {
@@ -476,7 +476,7 @@ contract DoubleSidePool is Initializable, AccessControl, IOnBlockListener {
476
476
}
477
477
478
478
function _maxUserStakeValue (address user ) internal view returns (uint ) {
479
- return mainSideStakers[user].stake * dependantSideConfig.stakeLimitsMultiplier / MILLION ;
479
+ return mainSideStakers[user].stake * dependantSideConfig.stakeLimitsMultiplier / BILLION ;
480
480
}
481
481
482
482
//COMMON METHODS
0 commit comments