code-423n4 / 2023-12-ethereumcreditguild-findings

9 stars 5 forks source link

Upgraded Q -> 2 from #712 [1706656573259] #1284

Closed c4-judge closed 5 months ago

c4-judge commented 5 months ago

Judge has assessed an item in Issue #712 as 2 risk. The relevant finding follows:

[L-05] In SurplusGuildMinter, Staking and Unstaking Might be Bricked at a Point

Currently, SurplusGuildMinter::stake function calls getRewards() function, this function does some computation then calls ProfitManager::claimRewards on the SurplusGuildMinter, the claimRewards function then loops through all the available terms users have staked on in the SurplusGuildMinter, since these terms aren't whitelisted and the number of terms a user can stake on isn't limited this number will only grow exponentially, at a point both staking and unstaking will revert due to long computation which eventually results in an OOG revert.

RECOMMENDATION

Consider whitelisting some selected terms, to avoid this number growing too large

c4-judge commented 5 months ago

Trumpero marked the issue as duplicate of #69

c4-judge commented 5 months ago

Trumpero marked the issue as satisfactory

c4-judge commented 5 months ago

Trumpero marked the issue as partial-50