Skip to content

Commit

Permalink
fin
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidu28 committed Oct 9, 2023
1 parent 68b9215 commit 34df945
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/contracts/pods/EigenPod.sol
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,11 @@ contract EigenPod is IEigenPod, Initializable, ReentrancyGuardUpgradeable, Eigen
oracleTimestamp + VERIFY_BALANCE_UPDATE_WINDOW_SECONDS >= block.timestamp,
"EigenPod.verifyBalanceUpdate: specified timestamp is too far in past"
);

// checks that a balance update can only be made before the validator is withdrawable

/**
* checks that a balance update can only be made before the validator is withdrawable. If this is not checked
* anyone can prove the withdrawn validator's balance as 0 before the validator is able to prove their full withdrawal
*/
require(Endian.fromLittleEndianUint64(validatorFields[BeaconChainProofs.VALIDATOR_WITHDRAWABLE_EPOCH_INDEX]) >
(_computeSlotAtTimestamp(oracleTimestamp)) / BeaconChainProofs.SLOTS_PER_EPOCH, "EigenPod.verifyBalanceUpdate: balance update is being proven after a validator is withdrawable");

Expand Down

0 comments on commit 34df945

Please sign in to comment.