Platform: Code4rena
Start Date: 09/02/2024
Pot Size: $60,500 USDC
Total HM: 17
Participants: 283
Period: 12 days
Judge:
Id: 328
League: ETH
Rank: 260/283
Findings: 1
Award: $0.12
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: ahmedaghadi
Also found by: 0x13, 0xAleko, 0xDetermination, 0xKowalski, 0xPluto, 0xRiO, 0xvj, AlexCzm, Avci, BARW, BigVeezus, Cryptor, DeFiHackLabs, Draiakoo, Fitro, Giorgio, GoSlang, Greed, Honour, Kalogerone, KmanOfficial, Krace, McToady, MidgarAudits, MrPotatoMagic, Nyxaris, ReadyPlayer2, Ryonen, SovaSlava, SpicyMeatball, VAD37, _eperezok, alexzoid, almurhasan, btk, cu5t0mpeo, deadrxsezzz, djxploit, dvrkzy, emrekocak, erosjohn, evmboi32, fnanni, grearlake, inzinko, jesjupyter, jesusrod15, josephdara, ke1caM, klau5, ktg, ladboy233, merlinboii, nuthan2x, peanuts, pipidu83, pontifex, radev_sw, sl1, sobieski, soliditywala, t0x1c, taner2344, vnavascues, y4y, yovchev_yoan, zaevlad
0.1173 USDC - $0.12
https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/MergingPool.sol#L176 https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/RankedBattle.sol#L390
Two of the loops in MergingPool.sol
and RankedBattle.sol
use roundId
as upper bound for loop itteration.
This is a problem because there is no way to reset the roundId
except to make new instances of the contracts.
This could lead to a DOS attack if the roundId
gets too big and the functions will not be usable due to exceeding gas limit.
Even if it doesn't lead to a DOS attack eventually the functions will be too pricey to call.
Manual review
I recommend implementing a way to reset the roundId
DoS
#0 - c4-pre-sort
2024-02-24T08:28:54Z
raymondfam marked the issue as sufficient quality report
#1 - c4-pre-sort
2024-02-24T08:29:04Z
raymondfam marked the issue as duplicate of #1541
#2 - c4-judge
2024-03-11T13:00:23Z
HickupHH3 marked the issue as duplicate of #216
#3 - c4-judge
2024-03-12T02:37:30Z
HickupHH3 marked the issue as partial-50