Skip to content

Commit e26edc6

Browse files
committed
fix: consistent max reward amount check
- For most rewards submissions we were checking the amount before the fee, however operator directed rewards submissions were checking the amount afterwards creating an inconsistency.
1 parent fa5e324 commit e26edc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/contracts/core/RewardsCoordinator.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ contract RewardsCoordinator is
675675
lastOperator = submission.operatorRewards[i].operator;
676676
}
677677

678-
require(amountAfterFee <= MAX_REWARDS_AMOUNT, AmountExceedsMax());
678+
require(amountBeforeFee <= MAX_REWARDS_AMOUNT, AmountExceedsMax());
679679

680680
return (keccak256(abi.encode(submitter, nonce, submission)), amountBeforeFee, amountAfterFee);
681681
}

0 commit comments

Comments
 (0)