From 3f679f40de1dff0ddea68a65d0eb995810484b07 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Tue, 3 Jun 2025 17:51:11 -0700 Subject: [PATCH] fix: finding #107 --- .../validator-registry/rewards/RewardManager.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/contracts/validator-registry/rewards/RewardManager.sol b/contracts/contracts/validator-registry/rewards/RewardManager.sol index 8d697a398..532058276 100644 --- a/contracts/contracts/validator-registry/rewards/RewardManager.sol +++ b/contracts/contracts/validator-registry/rewards/RewardManager.sol @@ -229,6 +229,10 @@ contract RewardManager is IRewardManager, RewardManagerStorage, /// corresponding to state that'd exist in each type of registry if the pubkey were opted-in through that registry. /// @notice Zero address is returned if the pubkey is not opted-in to mev-commit. function _findReceiver(bytes calldata pubkey) internal view returns (address) { + (bool existsAvs,address podOwner,,) = _mevCommitAVS.validatorRegistrations(pubkey); + if (existsAvs && podOwner != address(0)) { + return podOwner; + } (,address operatorAddr,bool existsMiddleware,) = _mevCommitMiddleware.validatorRecords(pubkey); if (existsMiddleware && operatorAddr != address(0)) { return operatorAddr; @@ -237,10 +241,6 @@ contract RewardManager is IRewardManager, RewardManagerStorage, if (existsVanilla && vanillaWithdrawalAddr != address(0)) { return vanillaWithdrawalAddr; } - (bool existsAvs,address podOwner,,) = _mevCommitAVS.validatorRegistrations(pubkey); - if (existsAvs && podOwner != address(0)) { - return podOwner; - } return address(0); } }