53069 sc low dynamic cooldown interval changes cause unexpected fund lockup extensions
Description
Brief / Intro
Vulnerability Details
function _processCooldownLogic(
address user,
uint16 validatorId,
uint256 amount
) internal returns (uint256 newCooldownEndTime) {
// ... existing logic ...
// Uses CURRENT cooldownInterval, not the one from when user started unstaking
newCooldownEndTime = block.timestamp + $.cooldownInterval; // @audit - Admin can change this
if (currentCooledAmountInSlot > 0 && block.timestamp >= currentCooldownEndTimeInSlot) {
// Previous cooldown matured - start new cooldown with CURRENT interval
// ...
} else {
// Add to existing cooldown - but uses NEW cooldown end time
// ...
}
cooldownEntrySlot.cooldownEndTime = newCooldownEndTime; // Overwrites previous end time
}Attack Scenario
Impact Details
Mitigation
Proof of Concept
1
2
3
Previous53070 sc high validator commission update during max allowed commission change causes incorrect reward calculationsNext53063 sc low maxvalidatorpercentage can be used to dos protocol staking
Was this helpful?