52770 sc high unbounded gas consumption via stakeonbehalf manipulation
Description
Brief/Intro
Vulnerability Details
function stakeOnBehalf(uint16 validatorId, address staker) external payable returns (uint256) {
if (staker == address(0)) {
revert ZeroRecipientAddress();
}
uint256 stakeAmount = msg.value;
// Perform all common staking setup for the beneficiary
bool isNewStake = _performStakeSetup(staker, validatorId, stakeAmount);
// Emit events
emit Staked(staker, validatorId, stakeAmount, 0, 0, stakeAmount);
emit StakedOnBehalf(msg.sender, staker, validatorId, stakeAmount);
return stakeAmount;
}Impact Details
References
Proof of Concept
Notes / Suggestions (kept minimal)
Previous51283 sc critical permanent freeze of user token due to unhandled partial fill refunds for swap via 1inch in dexaggregatorwrapperwithpredicateproxy Next51001 sc insight inaccurate share calculation in emitted event for non bridge deposits
Was this helpful?