code-423n4 / 2023-02-gogopool-mitigation-contest-findings

0 stars 0 forks source link

Mitigation Confirmed for Mitigation of M-13 Issue mitigated #38

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

C4 issue

M-13: slashing fails when node operator doesn't have enough staked GGP

Comments

The original implementation was not checking if the node operator's GGPStake amount is not less than the slash amount. So technically it was possible that slashGGP() reverts for various reasons. It is notable that this made an attack path feasible (H-06 MinipoolManager: node operator can avoid being slashed).

Mitigation

PR #41 This PR includes mitigation for various issues (H-03, H-06, M-13). Just focusing on the issue M-13, it is now checked if the staker has enough GGPStake. If the staked GGP is not enough, the whole staked GGP is slashed instead of revert.

Analysis

H-06 reported two scenarios where the reverts can happen.

Conclusion

LGTM

c4-judge commented 1 year ago

GalloDaSballo marked the issue as satisfactory