Before mitigation if the requestSlashing() was called in the last 2 days of a vault unstake request (during MIN_STAKE_UPDATE_DELAY), finalizeSlashing() can be called on a vault even after its operator has unregistered from the DSS with unregisterOperatorFromDSS(). This break one of the main invariants of the protocol.
Mitigation
FIX-01FIX-02
The first mitigation ensures that checkIfOperatorIsRegInRegDSS() is called before finalizeSlashing() preventing DSS from slashing an unregistered operator. The second mitigation modifies finalizeSlashing() function to skip any vaults that are not staked to the DSS.
Both mitigations resolve the issue.
Lines of code
Vulnerability details
C4 Issue:
H-04: https://github.com/code-423n4/2024-07-karak-findings/issues/4
Comments
Before mitigation if the
requestSlashing()
was called in the last 2 days of a vault unstake request (duringMIN_STAKE_UPDATE_DELAY
),finalizeSlashing()
can be called on a vault even after its operator has unregistered from the DSS withunregisterOperatorFromDSS()
. This break one of the main invariants of the protocol.Mitigation
FIX-01 FIX-02 The first mitigation ensures that
checkIfOperatorIsRegInRegDSS()
is called beforefinalizeSlashing()
preventing DSS from slashing an unregistered operator. The second mitigation modifiesfinalizeSlashing()
function to skip any vaults that are not staked to the DSS. Both mitigations resolve the issue.Conclusion
LGTM