You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.
sherlock-admin opened this issue
Mar 27, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Users can add rolloverQueue by enlistInRollover
and mintRollovers() does not remove the rolloverQueue.
Only the user can delistInRollover to shorten the array, if the user is on the lose side, it is very likely that he will not perform delistInRollover.
So rolloverQueue is likely to get bigger and bigger
But this array copy is used in these places in the contract or loop array
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
bin2chen
medium
rolloverQueue may lead to GAS OUT risk
Summary
rolloverQueue
may be too long, leading to GAS OUTVulnerability Detail
Users can add
rolloverQueue
byenlistInRollover
and
mintRollovers()
does not remove therolloverQueue
.Only the user can
delistInRollover
to shorten the array, if the user is on the lose side, it is very likely that he will not performdelistInRollover
.So
rolloverQueue
is likely to get bigger and biggerBut this array copy is used in these places in the contract or loop array
these places can cause GAS OUT, or a lot of wasted GAS
Need to add a method to Remove Invalid queue items from rolloverQueue
Impact
mintRollovers and getRolloverTVL maybe GAS OUT
Code Snippet
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Carousel/Carousel.sol#L387
Tool used
Manual Review
Recommendation
add a method to Remove Invalid queue items from rolloverQueue
Duplicate of #172
The text was updated successfully, but these errors were encountered: