60597 sc low hasrequestedexit returns true for not just requested exits but also delegations that are already exited
Description
function hasRequestedExit(uint256 _tokenId) external view returns (bool) {
StargateStorage storage $ = _getStargateStorage();
// get end period of the delegation
uint256 delegationId = $.delegationIdByTokenId[_tokenId];
// If no delegation exists, exit was never requested
if (delegationId == 0) {
return false;
}
// Fetch only the period details (single external call)
(, uint32 endPeriod) = $.protocolStakerContract.getDelegationPeriodDetails(delegationId);
// endPeriod is set to type(uint32).max when delegation is created
// It changes to a specific period number when exit is requested
return endPeriod != type(uint32).max;
}Proof of Concept
Proof of Concept
Previous60265 sc high the attacker can still claim rewards after exiting from validatorNext60593 sc low no mechanism to set boostpriceperblock for levels added after initialization
Was this helpful?