Juicebox contest - LeoS's results

The decentralized fundraising and treasury protocol.

General Information

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

Juicebox

Findings Distribution

Researcher Performance

Rank: 24/67

Findings: 2

Award: $63.84

QA:
grade-b
Gas:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Low Risk

[L-01] Floating pragma.

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.

Non Critical

[N-01] Typo.

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

Awards

25.9629 USDC - $25.96

Labels

bug
G (Gas Optimization)
grade-b
G-08

External Links

[G-01] Using calldata instead of memory for read only argument in external function

If 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

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter