Platform: Code4rena
Start Date: 22/09/2022
Pot Size: $30,000 USDC
Total HM: 12
Participants: 133
Period: 3 days
Judge: 0xean
Total Solo HM: 2
Id: 165
League: ETH
Rank: 109/133
Findings: 1
Award: $12.81
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: pfapostol
Also found by: 0x040, 0x1f8b, 0x4non, 0x5rings, 0xA5DF, 0xNazgul, 0xSmartContract, 0xmatt, 0xsam, Amithuddar, Aymen0909, B2, Ben, Bnke0x0, Chom, CodingNameKiki, Deivitto, Diana, Fitraldys, Funen, IllIllI, JAGADESH, JC, Metatron, Ocean_Sky, PaludoX0, Pheonix, RaymondFam, ReyAdmirado, RockingMiles, Rohan16, Rolezn, Satyam_Sharma, Sm4rty, SnowMan, SooYa, Tagir2003, TomJ, Tomio, Triangle, V_B, Waze, __141345__, ajtra, albincsergo, asutorufos, aysha, beardofginger, bobirichman, brgltd, bulej93, bytera, c3phas, ch0bu, cryptostellar5, cryptphi, d3e4, delfin454000, dharma09, drdr, durianSausage, emrekocak, erictee, fatherOfBlocks, gogo, got_targ, imare, jag, karanctf, ladboy233, leosathya, lukris02, medikko, mics, millersplanet, natzuu, neko_nyaa, oyc_109, peanuts, prasantgupta52, rbserver, ret2basic, rokinot, ronnyx2017, rotcivegaf, sach1r0, samruna, seyni, slowmoses, tnevler, wagmi, zishansami
12.8108 USDC - $12.81
ERC20PermitPermissionedMint
L41/46 - The require generates a lot of gas costs, this can be replaced by an if and a custom error.
L46/68/78 - When we are validating a variable and it is bool, making variable == true or variable == false generates extra gas costs. The least expensive way to validate it would be: variable or !variable.
L84 - When we initialize a variable and we want to set its default value, it is not necessary to set it, since it has that value by default.
L84 - When we are going through an array in a for loop, it is less expensive to create a uint variable and store the length there and not be in each iteration consulting the length.
L84 - When we are using a counter in a for loop, gas can be saved by making it unchecked, since it will never generate an overflow and it is less expensive to do ++i than i++.
frxETHMinter
L63/64/94/129 - When we initialize a variable and we want to set its default value, it is not necessary to set it, since it has that default value.
L79/126 - It is less expensive to validate uint256() > 0 than to validate uint256() != 0, this generates an extra cost of gas and no understanding is gained.
Operator Registry
L46/137/182/203 - The require generates a lot of gas costs, this can be replaced by a custom if and error.
L63/84/114 - When we initialize a variable and we want to set its default value, it is not necessary to set it, since it has that default value.
L114 - When we are going through an array in a for loop, it is less expensive to create a uint variable and store the length there and not be in each iteration consulting the length.