Platform: Code4rena
Start Date: 01/07/2022
Pot Size: $75,000 USDC
Total HM: 17
Participants: 105
Period: 7 days
Judge: Jack the Pug
Total Solo HM: 5
Id: 143
League: ETH
Rank: 80/105
Findings: 1
Award: $38.83
π Selected for report: 0
π Solo Findings: 0
π Selected for report: 0xA5DF
Also found by: 0v3rf10w, 0x09GTO, 0x1f8b, 0x29A, 0xDjango, 0xKitsune, 0xNazgul, 0xdanial, 0xf15ers, Aymen0909, Bnke0x0, Ch_301, Cheeezzyyyy, Chom, ElKu, Funen, Hawkeye, IllIllI, JC, JohnSmith, Kaiziron, Lambda, Limbooo, Meera, Metatron, MiloTruck, Noah3o6, Picodes, Randyyy, RedOneN, ReyAdmirado, Rohan16, Saintcode_, Sm4rty, TomJ, Tomio, Tutturu, UnusualTurtle, Waze, _Adam, __141345__, ajtra, apostle0x01, asutorufos, brgltd, c3phas, cRat1st0s, codexploder, defsec, delfin454000, djxploit, durianSausage, exd0tpy, fatherOfBlocks, hake, horsefacts, ignacio, jayfromthe13th, joestakey, jonatascm, kaden, kebabsec, m_Rassska, mektigboy, mrpathfindr, oyc_109, rajatbeladiya, rbserver, rfa, robee, sach1r0, sashik_eth, simon135
38.8282 USDC - $38.83
Examples of this issue in the codebase:
Examples of this issue in the codebase:
<ARRAY>.LENGTH
SHOULD NOT BE LOOKED UP IN EVERY LOOP OF A FOR-LOOPEven memory arrays incur the overhead of bit tests and bit shifts to calculate the array length
Examples of this issue in the codebase:
BOOL
S FOR STORAGE INCURS OVERHEADrefer to this.
Examples of this issue in the codebase:
SLOAD
CALLExamples of this issue in the codebase:
File: contracts\JBDirectory.sol _terminalsOf[_projectId].length
can be cached (Line 139)
File: contracts\JBDirectory.sol _terminalsOf[_projectId].length
can be cached (Line 167)
Examples of this issue in the codebase:
CallData
INSTEAD OF MEMORYExamples of this issue in the codebase:
File: contracts\JBController.sol _terminals
can be changed to calldata
(Line 418)
File: contracts\NibblVault.sol _fundAccessConstraints
can be changed to calldata
(Line 470)
File: contracts\JBController.sol _terminals
can be changed to calldata
(Line 471)
> 0
COSTS MORE GAS THAN != 0
WHEN USED ON A UINTExamples of this issue in the codebase: