Platform: Code4rena
Start Date: 12/09/2022
Pot Size: $75,000 USDC
Total HM: 19
Participants: 110
Period: 7 days
Judge: HardlyDifficult
Total Solo HM: 9
Id: 160
League: ETH
Rank: 108/110
Findings: 1
Award: $35.35
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: CertoraInc
Also found by: 0x1f8b, 0x4non, 0x5rings, 0x85102, 0xNazgul, 0xSmartContract, 0xkatana, Amithuddar, Aymen0909, B2, Bnke0x0, CRYP70, Chom, ChristianKuri, CodingNameKiki, Deivitto, Diraco, Fitraldys, Funen, IgnacioB, JAGADESH, JC, Lambda, LeoS, Matin, Metatron, MiloTruck, Noah3o6, Ocean_Sky, Olivierdem, PaludoX0, RaymondFam, ReyAdmirado, Rohan16, Rolezn, Saintcode_, Sm4rty, SnowMan, StevenL, Tomio, Tomo, V_B, Waze, __141345__, ajtra, asutorufos, aysha, brgltd, bulej93, c3phas, ch0bu, d3e4, delfin454000, dharma09, djxploit, erictee, fatherOfBlocks, francoHacker, gianganhnguyen, gogo, got_targ, ignacio, jag, karanctf, ladboy233, leosathya, lukris02, m_Rassska, malinariy, martin, natzuu, pashov, peanuts, peiw, pfapostol, prasantgupta52, robee, simon135, slowmoses, sryysryy, tnevler
35.3477 USDC - $35.35
If a variable is not set/initialized, it is assumed to have the default value (0 for uint, false for bool, address(0) for address…). Explicitly initializing it with its default value is an anti-pattern and wastes gas. In the similar code above, the initialization of uint256 i = 0 can be simplified to uint256 i
File: ListOnOpenseaProposal.sol Line 291 ArbitraryCallsProposal.sol Line 52 Line 61 Line 78
for (uint256 i = 0; i < fees.length; ++i) { cons = orderParams.consideration[1 + i]; cons.itemType = IOpenseaExchange.ItemType.NATIVE; cons.token = address(0); cons.identifierOrCriteria = 0; cons.startAmount = cons.endAmount = fees[i]; cons.recipient = feeRecipients[i]; }
can become
for (uint i; i < fees.length; ++i) { cons = orderParams.consideration[1 + i]; cons.itemType = IOpenseaExchange.ItemType.NATIVE; cons.token = address(0); cons.identifierOrCriteria = 0; cons.startAmount = cons.endAmount = fees[i]; cons.recipient = feeRecipients[i]; }
File: ListOnZoraProposal.sol Line 115 File: ListOnOpenseaProposal.sol Line 164, Line 219