Closed c4-bot-9 closed 2 months ago
Will let the sponsor take a look too, but I believe this is intended.
Only vaults within SLASHING_WINDOW
should be slashable (ie. the first 7 days). Once SLASHING_WINDOW
has passed, they shouldn't be slashed anymore.
Additionally, this is case of a mitigation causing a separate H/M issue and should be submitted as a new finding. H-04 has been mitigated.
MiloTruck marked the issue as new finding
MiloTruck marked the issue as unsatisfactory: Invalid
MiloTruck removed the grade
MiloTruck marked the issue as unmitigated
MiloTruck marked the issue as nullified
MiloTruck marked the issue as new finding
MiloTruck marked the issue as not nullified
MiloTruck marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/karak-network/karak-restaking/tree/v2/src/entities/SlasherLib.sol#L116-L150
Vulnerability details
Impact
Operators can avoid slashing.
Proof of Concept
As you can see from lines 126 to 131, the
SlasherLib.finalizeSlashing()
function skips unstaked vaults. Operators can exploit this to avoid slashing.Let's consider the following scenario:
Vault 1
from DSS, initiating the 9-dayMIN_STAKE_UPDATE_DELAY
.Vault 1
, starting the 2-daySLASHING_VETO_WINDOW
.Vault 1
from DSS.Vault 1
.However, the slashing will skip
Vault 1
since the vault has already been unstaked from the DSS.Tools Used
Manual review
Recommended Mitigation Steps
It is recommended to disallow unstaking vaults that have a pending slashing.
Assessed type
Other