60553 sc high the delegator and the validator both exiting consecutively could lead to underflow in the unstake and delegate and stuck staked vet
Description
Brief/Intro
Vulnerability Details
// Stargate.sol
function _updatePeriodEffectiveStake(..., uint32 _period, bool _isIncrease) private {
uint256 effectiveStake = _calculateEffectiveStake($, _tokenId);
uint256 currentValue = $.delegatorsEffectiveStake[_validator].upperLookup(_period);
@> uint256 updatedValue = _isIncrease ? currentValue + effectiveStake :
currentValue - effectiveStake;
$.delegatorsEffectiveStake[_validator].push(_period, SafeCast.toUint224(updatedValue));
}Attack path
Impact Details
References
Proof of Concept
Proof of Concept
Previous60557 sc high double decrement of effective stake in unstake leads to dos and permanent fund lockNext60548 sc high an exited delegator who has not unstaked or delegated to a validator will be dos ed if a validator exits
Was this helpful?