Skip to content

Commit

Permalink
feat: apply PR reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
sm-stack committed Jul 22, 2024
1 parent 324439b commit 89fdaa1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/contracts/contracts/L1/ValidatorManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,10 @@ contract ValidatorManager is ISemver, IValidatorManager {
uint128 validatorReward;

unchecked {
validatorReward = (BASE_REWARD + boostedReward).mulDiv(
commissionRate,
COMMISSION_RATE_DENOM
);
baseReward = BASE_REWARD.mulDiv(
COMMISSION_RATE_DENOM - commissionRate,
COMMISSION_RATE_DENOM
Expand All @@ -626,9 +630,7 @@ contract ValidatorManager is ISemver, IValidatorManager {
uint128 validatorBaseReward = baseReward.mulDiv(validatorKro, totalKro + validatorKro);
// Exclude the base reward for the validator from total base reward given to KRO delegators.
baseReward -= validatorBaseReward;
validatorReward =
(BASE_REWARD + boostedReward).mulDiv(commissionRate, COMMISSION_RATE_DENOM) +
validatorBaseReward;
validatorReward += validatorBaseReward;
}

return (baseReward, boostedReward, validatorReward);
Expand Down

0 comments on commit 89fdaa1

Please sign in to comment.