Platform: Code4rena
Start Date: 14/06/2022
Pot Size: $50,000 USDC
Total HM: 19
Participants: 99
Period: 5 days
Judge: HardlyDifficult
Total Solo HM: 4
Id: 136
League: ETH
Rank: 87/99
Findings: 1
Award: $48.98
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: joestakey
Also found by: 0x1f8b, 0x29A, 0x52, 0xDjango, 0xNazgul, 0xNineDec, 0xf15ers, 0xkowloon, 0xmint, 8olidity, BowTiedWardens, Chom, Cityscape, Czar102, ElKu, FSchmoede, Funen, GimelSec, GreyArt, IllIllI, KIntern, Kaiziron, Kenshin, Lambda, MadWookie, MiloTruck, PPrieditis, Picodes, Ruhum, Sm4rty, StErMi, TerrierLover, TomJ, Treasure-Seeker, VAD37, WatchPug, Wayne, _Adam, a12jmx, abhinavmir, antonttc, apostle0x01, asutorufos, berndartmueller, cccz, cloudjunky, codexploder, cryptphi, csanuragjain, defsec, delfin454000, fatherOfBlocks, georgypetrov, hake, hansfriese, horsefacts, hyh, k, kenta, nxrblsrpr, oyc_109, peritoflores, rajatbeladiya, reassor, rfa, robee, sach1r0, saian, samruna, shenwilly, simon135, sorrynotsorry, sseefried, throttle, unforgiven, wagmi, zzzitron
48.9768 USDC - $48.98
Contract
InfinityExchange.sol
having uint256 i = 0; in for loops are unnecesarry in
line148 line200 line219 line272 line308 line349 line393 line1048 line1086 line1109 line1190 line1206
Recommedation:
Set uint256 i = 0; in for loops to uint256 i;
Result:
for (uint256 i; i < numMakerOrders; ) for (uint256 i; i < ordersLength; ) for (uint256 i; i < ordersLength; ) for (uint256 i; i < numSells; ) for (uint256 i; i < numMakerOrders; ) for (uint256 i; i < ordersLength; ) for (uint256 i; i < numNonces; ) for (uint256 i; i < numNfts; ) for (uint256 i; i < numTokens; ) for (uint256 i; i < numNfts; ) for (uint256 i; i < numNfts; ) for (uint256 i; i < numTokens; )
2.
Contract
InfinityOrderBookComplication.sol
having uint256 i = 0; in for loops are unneccesarry in
line76 line82 (j not i) line199 line216 line246 line247 (j not i) line290 (k not i) line291 (l not i) line320
Recommendation:
Set uint256 i = 0; in for loops to uint i; with the exceptions of j, k, and l where innitiated
Result:
for (uint256 i; i < ordersLength; ) for (uint256 j; j < nftsLength; ) for (uint256 i; i < nftsLength; ) for (uint256 i; i < nftsLength; ) for (uint256 i; i < order2NftsLength; ) for (uint256 j; j < order1NftsLength; ) for (uint256 k; k < item2TokensLength; ) for (uint256 l; l < item1TokensLength; ) for (uint256 i; i < ordersLength; )