Skip to content

Commit

Permalink
Rename scale reward method
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-CZ committed Oct 29, 2024
1 parent daf2078 commit fc349d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/sfc/SFC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ contract SFC is SFCBase, Version {
uint256 commissionRewardFull = _calcValidatorCommission(rawReward, c.validatorCommission());
uint256 selfStake = getStake[validatorAddr][validatorID];
if (selfStake != 0) {
_rewardsStash[validatorAddr][validatorID] += _scaleLockupReward(commissionRewardFull);
_rewardsStash[validatorAddr][validatorID] += _scaleReward(commissionRewardFull);
}

// accounting reward per token for delegators
Expand Down
2 changes: 1 addition & 1 deletion contracts/sfc/SFCBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ contract SFCBase is SFCState {
totalSupply = totalSupply + amount;
}

function _scaleLockupReward(uint256 fullReward) internal view returns (uint256) {
function _scaleReward(uint256 fullReward) internal view returns (uint256) {
return (fullReward * c.rewardRatio()) / Decimal.unit();
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/sfc/SFCLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ contract SFCLib is SFCBase {
uint256 payableUntil = _highestPayableEpoch(toValidatorID);
uint256 wholeStake = getStake[delegator][toValidatorID];
uint256 fullReward = _newRewardsOf(wholeStake, toValidatorID, stashedUntil, payableUntil);
return _scaleLockupReward(fullReward);
return _scaleReward(fullReward);
}

function _newRewardsOf(
Expand Down

0 comments on commit fc349d2

Please sign in to comment.