Platform: Code4rena
Start Date: 18/10/2022
Pot Size: $50,000 USDC
Total HM: 13
Participants: 67
Period: 5 days
Judge: Picodes
Total Solo HM: 7
Id: 172
League: ETH
Rank: 24/67
Findings: 2
Award: $63.84
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: berndartmueller
Also found by: 0x1f8b, 0x4non, 0xNazgul, 0xSmartContract, Aymen0909, BClabs, Diana, Jeiwan, Lambda, LeoS, RaoulSchaffranek, RaymondFam, RedOneN, ReyAdmirado, Rolezn, SaharAP, Trust, V_B, __141345__, a12jmx, bharg4v, brgltd, carlitox477, ch0bu, chaduke, cloudjunky, cryptostellar5, cryptphi, csanuragjain, d3e4, delfin454000, erictee, fatherOfBlocks, hansfriese, ignacio, joestakey, karanctf, ladboy233, lukris02, mcwildy, minhtrng, peanuts, ret2basic, seyni, slowmoses, svskaushik, tnevler, yixxas
37.8829 USDC - $37.88
It's a good practice to avoid the use of floating pragma. Code must be compiled with the same version it as been tested the most. It also avoids the use of any nightly builds, which can have unexpected and unknown behaviors.
10 instances
Consider replacing ^0.8.16
by 0.8.16
.
Consider these changes:
transfered
-> transferred
based based
-> based
accross
-> across
owner
-> owned
adherance
-> adherence
how who to mint
-> ? (not very clear)
beneificiary
-> beneficiary
provded
-> provided
the the
-> the
regitered
-> registered
User
-> Use
responsibile
-> responsible
Launches
-> Launch
#0 - c4-judge
2022-11-08T17:40:59Z
Picodes marked the issue as grade-b
🌟 Selected for report: Jeiwan
Also found by: 0x1f8b, 0x4non, 0x5rings, 0xSmartContract, Awesome, Aymen0909, Bnke0x0, CodingNameKiki, Diana, DimSon, JC, JrNet, LeoS, RaymondFam, ReyAdmirado, Saintcode_, Shinchan, __141345__, berndartmueller, bharg4v, brgltd, carlitox477, ch0bu, chaduke, cryptostellar5, emrekocak, gogo, lukris02, martin, mcwildy, sakman, trustindistrust, zishansami
25.9629 USDC - $25.96
calldata
instead of memory
for read only argument in external functionIf a function parameter is read only, it is cheaper in gas to use calldata
instead of memory
.
6 instances:
Consider changing memory
to calldata
in these lines
With those change, these evolutions in gas average report can be observed:
(The following changes are not always explained. Some of them are due to too much variance or are just the effect of better optimizations of other functions. So we have to be critical about them.) JB721GlobalGovernance: Deployment: 4152378 -> 4132553 (-19825) JB721GlobalGovernance: didPay: 179733 -> 168252 (-11481) JB721TieredGovernance: Deployment: 4280949 -> 4264732 (-16217) JB721TieredGovernance: didPay: 180673 -> 169192 (-11481) JB721TieredGovernance: getTierVotes: 1447 -> 1180 (-267) JB721TieredGovernance: setTierDelegate: 29792 -> 29503 (-289) JBTiered721Delegate: Deployment: 3701538 -> 3681713 (-19825) JBTiered721Delegate: adjustTiers: 83233 -> 83298 (+65) JBTiered721Delegate: balanceOf: 16225 -> 16091 (-134) JBTiered721Delegate: didPay: 70891 -> 69972 (-919) JBTiered721Delegate: redeemParams: 19244 -> 19627 (+383) JBTiered721DelegateDeployer: deployDelegateFor: 4827568 -> 4776781 (-50787) (The following modifications are purely the result of the changes made.) JBTiered721DelegateProjectDeployer: Deployment: 1668835 -> 1579737 (-89098) JBTiered721DelegateProjectDeployer: launchProjectFor: 5229396 -> 5202214 (-27182)
#0 - c4-judge
2022-11-08T17:40:05Z
Picodes marked the issue as grade-b