Platform: Code4rena
Start Date: 18/10/2022
Pot Size: $75,000 USDC
Total HM: 27
Participants: 144
Period: 7 days
Judge: gzeon
Total Solo HM: 13
Id: 170
League: ETH
Rank: 133/144
Findings: 1
Award: $0.00
π Selected for report: 0
π Solo Findings: 0
π Selected for report: oyc_109
Also found by: 0x040, 0x1f8b, 0x5rings, 0xNazgul, 0xSmartContract, 0xZaharina, 0xsam, 0xzh, 2997ms, Amithuddar, Aymen0909, B2, Bnke0x0, Deivitto, Diana, Dinesh11G, Franfran, JC, JrNet, Jujic, KingNFT, KoKo, Mathieu, Metatron, Mukund, Olivierdem, PaludoX0, Pheonix, Picodes, RaymondFam, RedOneN, ReyAdmirado, Rolezn, Saintcode_, Satyam_Sharma, Shinchan, Tagir2003, Tomio, Waze, Yiko, __141345__, adriro, ajtra, aysha, ballx, beardofginger, bobirichman, brgltd, bulej93, catchup, catwhiskeys, cdahlheimer, ch0bu, chaduke, chrisdior4, cryptostellar5, cylzxje, d3e4, delfin454000, dharma09, djxploit, durianSausage, emrekocak, erictee, exolorkistis, fatherOfBlocks, gianganhnguyen, gogo, halden, hxzy, i_got_hacked, iepathos, karanctf, leosathya, lucacez, lukris02, lyncurion, m_Rassska, martin, mcwildy, mics, nicobevi, peanuts, peiw, rbserver, ret2basic, rotcivegaf, ryshaw, sakman, sakshamguruji, saneryee, sikorico, skyle, svskaushik, tnevler, vv7, w0Lfrum, zishansami
0 USDC - $0.00
Gβ01 <array>.length should not be looked up in every loop of a for-loop contracts/enforcer/PA1D.sol Ln432 for (uint256 t = 0; t < tokenAddresses.length; t++) { Ln454 for (uint256 i = 0; i < addresses.length; i++) { Ln474 for (uint256 i = 0; i < addresses.length; i++) {
Gβ02 ++i/i++ should be unchecked{++i}/unchecked{i++} when it is not possible for them to overflow, as is the case when used in for- and while-loops contracts/enforcer/PA1D.sol Ln307 for (uint256 i = 0; i < length; i++) { Ln323 for (uint256 i = 0; i < length; i++) { Ln340 for (uint256 i = 0; i < length; i++) { Ln356 for (uint256 i = 0; i < length; i++) { Ln394 for (uint256 i = 0; i < length; i++) { Ln414 for (uint256 i = 0; i < length; i++) { Ln432 for (uint256 t = 0; t < tokenAddresses.length; t++) { Ln454 for (uint256 i = 0; i < addresses.length; i++) { Ln474 for (uint256 i = 0; i < addresses.length; i++) {
Gβ03 ++i costs less gas than i++, especially when itβs used in for-loops (--i/i-- too) contracts/enforcer/PA1D.sol Ln307 for (uint256 i = 0; i < length; i++) { Ln323 for (uint256 i = 0; i < length; i++) { Ln340 for (uint256 i = 0; i < length; i++) { Ln356 for (uint256 i = 0; i < length; i++) { Ln394 for (uint256 i = 0; i < length; i++) { Ln414 for (uint256 i = 0; i < length; i++) { Ln432 for (uint256 t = 0; t < tokenAddresses.length; t++) { Ln454 for (uint256 i = 0; i < addresses.length; i++) { Ln474 for (uint256 i = 0; i < addresses.length; i++) {
[G-4] IT COSTS MORE GAS TO INITIALIZE VARIABLES WITH THEIR DEFAULT VALUE THAN LETTING THE DEFAULT VALUE BE APPLIED. contracts/enforcer/PA1D.sol Ln307 for (uint256 i = 0; i < length; i++) { Ln323 for (uint256 i = 0; i < length; i++) { Ln340 for (uint256 i = 0; i < length; i++) { Ln356 for (uint256 i = 0; i < length; i++) { Ln394 for (uint256 i = 0; i < length; i++) { Ln414 for (uint256 i = 0; i < length; i++) { Ln432 for (uint256 t = 0; t < tokenAddresses.length; t++) { Ln454 for (uint256 i = 0; i < addresses.length; i++) { Ln474 for (uint256 i = 0; i < addresses.length; i++) {
contracts/HolographOperator.sol Ln781 for (uint256 i = 0; i < length; i++) {
fix: