Juicebox V2 contest - Saintcode_'s results

The decentralized fundraising and treasury protocol.

General Information

Platform: Code4rena

Start Date: 01/07/2022

Pot Size: $75,000 USDC

Total HM: 17

Participants: 105

Period: 7 days

Judge: Jack the Pug

Total Solo HM: 5

Id: 143

League: ETH

Juicebox

Findings Distribution

Researcher Performance

Rank: 78/105

Findings: 1

Award: $45.80

🌟 Selected for report: 0

πŸš€ Solo Findings: 0

JBTokenStore.sol line 242 Short Circuiting optimization:

The order of the functions inside the if statement in line 242:

if (_token == IJBToken(address(0)) && requireClaimFor[_projectId])

can be switched to:

if (requireClaimFor[_projectId] && _token == IJBToken(address(0)))

for optimal gas usage because requireClaimFor is more probable to be FALSE hence second one won’t be executed and hence save you gas.

#0 - drgorillamd

2022-07-13T13:15:23Z

Indeed, good catch!

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