Platform: Code4rena
Start Date: 27/05/2022
Pot Size: $75,000 USDC
Total HM: 20
Participants: 58
Period: 7 days
Judge: GalloDaSballo
Total Solo HM: 15
Id: 131
League: ETH
Rank: 48/58
Findings: 1
Award: $119.82
π Selected for report: 0
π Solo Findings: 0
π Selected for report: IllIllI
Also found by: 0x1f8b, 0x29A, 0xNazgul, 0xf15ers, BowTiedWardens, Chom, Funen, Kaiziron, Kumpa, MiloTruck, Picodes, Ruhum, SecureZeroX, Sm4rty, SmartSek, StyxRave, WatchPug, Waze, asutorufos, bardamu, berndartmueller, c3phas, catchup, cccz, codexploder, cryptphi, defsec, delfin454000, dipp, fatherOfBlocks, gzeon, hake, hansfriese, hyh, masterchief, oyc_109, sach1r0, sashik_eth, shenwilly, simon135, unforgiven
119.8232 USDC - $119.82
Staking is not stopped even when Gauge is killed. User will not be getting any reward for the staked asset.
Assume the AMMGauge is killed using kill function (AmmGauge.sol#L49). This sets killed as true
poolCheckpoint will not further increase ammStakedIntegral and would simply return false
function poolCheckpoint() public virtual override returns (bool) { if (killed) { return false; } ... }
User calls stakeFor function and is still able to stake amount.
The drawback will be no rewards as poolCheckpoint will only return false and will not update ammStakedIntegral
Add below check in stakeFor function, restricting deposit if Gauge is killed
require(!killed, "Gauge killed");
#0 - GalloDaSballo
2022-06-19T21:17:28Z
Dup of #147