diff --git a/packages/contracts/contracts/L1/AssetManager.sol b/packages/contracts/contracts/L1/AssetManager.sol index 4d1575ca5..9b20836ab 100644 --- a/packages/contracts/contracts/L1/AssetManager.sol +++ b/packages/contracts/contracts/L1/AssetManager.sol @@ -730,15 +730,21 @@ contract AssetManager is ISemver, IERC721Receiver, IAssetManager { * @param baseReward The base reward to distribute. * @param boostedReward The boosted reward to distribute. * @param validatorReward The validator reward to distribute. + * @param challengeReward The challenge reward to distribute. */ function increaseBalanceWithReward( address validator, uint128 baseReward, uint128 boostedReward, - uint128 validatorReward + uint128 validatorReward, + uint128 challengeReward ) external onlyValidatorManager { // Distribute the reward from a designated vault to the AssetManager contract. - ASSET_TOKEN.transferFrom(VALIDATOR_REWARD_VAULT, address(this), baseReward + boostedReward + validatorReward); + ASSET_TOKEN.transferFrom( + VALIDATOR_REWARD_VAULT, + address(this), + baseReward + boostedReward + validatorReward + challengeReward + ); // If reward is distributed to SECURITY_COUNCIL, transfer it directly. if (validator == SECURITY_COUNCIL) { diff --git a/packages/contracts/contracts/L1/ValidatorManager.sol b/packages/contracts/contracts/L1/ValidatorManager.sol index 1ab565418..c6dbf789c 100644 --- a/packages/contracts/contracts/L1/ValidatorManager.sol +++ b/packages/contracts/contracts/L1/ValidatorManager.sol @@ -516,11 +516,14 @@ contract ValidatorManager is ISemver, IValidatorManager { uint128 validatorReward ) = _calculateReward(submitter); + uint128 challengeReward = _pendingChallengeReward[outputIndex]; + ASSET_MANAGER.increaseBalanceWithReward( submitter, baseReward, boostedReward, - validatorReward + validatorReward, + challengeReward ); emit RewardDistributed( @@ -531,7 +534,6 @@ contract ValidatorManager is ISemver, IValidatorManager { boostedReward ); - uint128 challengeReward = _pendingChallengeReward[outputIndex]; if (challengeReward > 0) { ASSET_MANAGER.increaseBalanceWithChallenge(submitter, challengeReward); delete _pendingChallengeReward[outputIndex];