# Recreated pools receive a wrong AVAX amount due to miscalculated compounded liquid staker amount

GoGoPool recreateMinipool compounds liquid staker amount using node operator reward, overstating borrowed AVAX and pulling excess funds from the liquid staking pool.

- Payout: Contest reward
- Severity: medium
- Program: GoGoPool
- Credited: Jeiwan
- Disclosed: 2023-03-21
- Write-up quality: 6/10
- Original: https://github.com/code-423n4/2022-12-gogopool-findings/issues/620
- Library page: https://bugbountylibrary.com/r/c4%3A2022-12-gogopool%3AM-08
- Tags: domain:web3 impact:funds-loss kind:contest platform:code4rena sev:medium tech:evm tech:solidity technique:source-review vuln:accounting-error vuln:business-logic

**Target:** MinipoolManager.recreateMinipool (Solidity staking contract)
**Root cause:** recreateMinipool sets avaxLiquidStakerAmt equal to compoundedAvaxNodeOpAmt (node op deposit + node op reward), but liquid stakers earn less due to node commission fee, so the 1:1 ratio assumption breaks.
**Steps:**
1. Create minipool with depositAmt=1000, avaxAssignmentRequest=1000, stake GGP.
2. Deposit AVAX into ggAVAX, claimAndInitiateStaking, recordStakingStart.
3. Skip half duration, recordStakingEnd with rewards=10 ether.
4. Observe avaxNodeOpRewardAmt=5.75, avaxLiquidStakerRewardAmt=4.25.
5. Stake extra GGP, call recreateMinipool(nodeID).
6. Assert avaxLiquidStakerAmt == old + liquidStakerReward fails: actual 1005.75 vs expected 1004.25.
**How found:** Code reading of recreateMinipool's comment 'Assumes a 1:1 nodeOp:liqStaker funds ratio' and comparing against recordStakingEnd where commission fee reduces liquid staker reward.
**Exploitation:** After a validation cycle, multisig recreates the minipool; the contract pulls avaxNodeOpAmt+nodeOpReward from the liquid staking pool instead of the smaller liquid staker share, requiring extra free AVAX in the pool and inflating assigned AVAX.
**Escalation:** Could cause recordStakingEnd/recordStakingError strict-equality checks to fail or pull excess funds from Manager, per warden discussion.
**Insight:** When a contract comment asserts a 1:1 invariant, verify it against the reward-splitting code path that applies fees; fee asymmetry silently breaks ratio assumptions in compounding logic.
