Platform: Code4rena
Start Date: 17/03/2023
Pot Size: $36,500 USDC
Total HM: 10
Participants: 98
Period: 3 days
Judge: leastwood
Total Solo HM: 5
Id: 223
League: ETH
Rank: 83/98
Findings: 1
Award: $12.03
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: 0xSmartContract
Also found by: 0xdaydream, 0xnev, Aymen0909, Deekshith99, Diana, EvanW, Fanz, JCN, Jerry0x, K42, Kresh, Madalad, MiniGlome, Polaris_tow, Rageur, ReyAdmirado, Rolezn, SAAJ, SaeedAlipoor01988, Sathish9098, Shubham, Udsen, Viktor_Cortess, Walter, anodaram, arialblack14, atharvasama, caspersolangii, codeslide, descharre, fatherOfBlocks, felipe, ginlee, igingu, lukris02, nadin, slvDev, tnevler, turvy_fuzz, viking71
12.034 USDC - $12.03
canto-pfp-protocol/src/ProfilePicture.sol
L62/63 - It is not necessary to create a variable in memory if it is only going to be used once, therefore the code could be simplified directly into: Turnstile(0xEcf044C5B4b867CFda001101c617eCd347095B44).register(tx.origin);
L100/101 - It is not necessary to create a variable in memory if it is only going to be used once, therefore the code could be simplified directly into: cidNFT.addressRegistry().getAddress(cidNFTID)
canto-bio-protocol/src/Bio.sol
canto-namespace-protocol/src/Namespace.sol
L111/121 - Instead of using _characterList.length to create a new array, you could directly use numCharacters, which was defined long before and was not modified. This would generate a lower gas expense, by going through the arrangement unnecessarily.
L83/84/113/114/116/151 - It is not necessary to create a variable in memory if it is only going to be used once, therefore the code could be simplified directly into:
canto-namespace-protocol/src/Tray.sol
canto-namespace-protocol/src/Utils.sol
#0 - c4-judge
2023-04-11T05:36:19Z
0xleastwood marked the issue as grade-b