Platform: Code4rena
Start Date: 31/03/2022
Pot Size: $75,000 USDC
Total HM: 7
Participants: 42
Period: 7 days
Judge: Jack the Pug
Total Solo HM: 5
Id: 102
League: ETH
Rank: 21/42
Findings: 2
Award: $210.24
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: rayn
Also found by: 0xDjango, 0xkatana, 0xkowloon, BouSalman, CertoraInc, Dravee, Funen, Hawkeye, IllIllI, Jujic, Kenshin, Kthere, Meta0xNull, Sleepy, TerrierLover, async, aysha, berndartmueller, catchup, cccz, cmichel, csanuragjain, danb, defsec, georgypetrov, hake, hubble, kenta, kyliek, pauliax, rfa, robee, sahar, shenwilly, teryanarmen
125.7841 USDC - $125.78
The modifier ifMinterSelf()
is indicated by its name to to be apply with any functions that separate logic between minter and non-minter. However, the modifier only covers when the caller is a minter, which means that non-minters may successfully call that function without any logic being executed. Therefore, causing unnecessary transaction to the network.
Add else
condition to cover when the caller is not a minter, or remove the code in case that it is not planned to be used.
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0xNazgul, 0xkatana, 0xkowloon, CertoraInc, Dravee, Funen, Hawkeye, Jujic, Kenshin, Meta0xNull, Sleepy, TerrierLover, catchup, csanuragjain, defsec, georgypetrov, kenta, okkothejawa, rayn, rfa, robee, saian, samruna
84.4552 USDC - $84.46
EVM is a stack machine with 256 bits (32 bytes) for each stack. Using unnecessary information that has size more than 32 bytes requires more than one stacks for storing, therefore using more gas unnecessarily.
Use a string that not bigger than 32 bytes or consider using custom errors instead if the contract uses solidity version 0.8.4 or above.