Platform: Code4rena
Start Date: 03/05/2022
Pot Size: $30,000 USDC
Total HM: 6
Participants: 93
Period: 3 days
Judge: gzeon
Id: 118
League: ETH
Rank: 89/93
Findings: 1
Award: $15.45
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: BowTiedWardens
Also found by: 0v3rf10w, 0x1f8b, 0x4non, 0xDjango, 0xNazgul, 0xProf, 0xc0ffEE, 0xf15ers, 0xkatana, 0xliumin, ACai, AlleyCat, CertoraInc, Cityscape, Cr4ckM3, DavidGialdi, Dinddle, FSchmoede, Funen, GimelSec, Hawkeye, IllIllI, Kulk0, M0ndoHEHE, MaratCerby, MiloTruck, Picodes, RoiEvenHaim, Tadashi, TerrierLover, TrungOre, VAD37, WatchPug, antonttc, catchup, defsec, delfin454000, dirk_y, eccentricexit, ellahi, fatherOfBlocks, gzeon, hake, hansfriese, hickuphh3, horsefacts, ilan, joestakey, kebabsec, kenta, kenzo, marximimus, minhquanym, noobie, oyc_109, p4st13r4, pauliax, rajatbeladiya, reassor, rfa, robee, rotcivegaf, saian, samruna, shenwilly, shung, simon135, slywaters, sorrynotsorry, throttle, unforgiven, z3s
15.4505 USDC - $15.45
Details: Consider the following changes to save gas:
++numSold;
.++numClaimed;
.Details: Since the deployer of the contract will never be address(0)
and function forwardERC20s
uses a onlyOwner
modifier, the check in L174 of ForgottenRunesWarriorsGuild.sol is not needed. The same applies to L628 of ForgottenRunesWarriorsMinter.sol.
Details: There is no risk that the loop counters below can overflow:
Thus, it is recommended to use unchecked
keyword to disable checked arithmetic when iterating the loop counter — see G011 for more information.
Remark: Pre-incrementing a variable is cheaper than post-incrementing it, so consider replacing i++
by ++i
when doing this change.