Submitted by immeas, also found by HollaDieWaldfee, datapunk, wagmi, yixxas, ck, cccz, nameruse, cozzetti, 0x73696d616f, and koxuan
When creating a minipool the node operator is required to put up a collateral in GGP, the protocol token. The amount of GGP collateral needed is currently calculated to be 10% of the AVAX staked. This is calculated using the price of GGP - AVAX.
If the node operator doesnt have high enough availability and doesnt get any rewards the protocol will slash their GGP collateral to reward liquid stakers. This is also calculated using the price of GGP - AVAX:
This is then subtracted from their staked amount:
The issue is that the current staked amount is never checked so the subUint can fail due to underflow if the price has changed since the minipool was created/recreated.
If a node operator doesnt have enough collateral, possibly caused by price changes in GGP during slashing they evade slashing all together.
Its even possible for the node operator to foresee this and manipulate the price of GGP just prior to the period ending if they know that they are going to be slashed.
PoC test in MinipoolManager.t.sol:
The only thing the protocol can do now is to call recordStakingError for the minipool, since no other state changes are allowed. This will return the staked funds but it will not slash the GGP amount for the node operator. Hence the node operator has evaded the slashing.
vs code, forge
If the amount to be slashed is greater than what the node operator has staked, slash all their stake.
Alex the Entreprenerd (judge) commented:
emersoncloud (GoGoPool) mitigated:
Status: Mitigation confirmed by RaymondFam and hansfriese.
