Juicebox V2 contest - ReyAdmirado'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: 55/105

Findings: 2

Award: $128.10

🌟 Selected for report: 0

🚀 Solo Findings: 0

1. Use a more recent version of Solidity

Use a solidity version of at least 0.8.10 to have external calls skip contract existence checks if the external call has a return value.

2. <array>.length should not be looked up in every loop of a for-loop

3. better to use ++i than i++

4. it costs more gas to initialize variables to zero than to let the default of zero be applied

5. using stack variables is better than re-reading from storage

use the _unclaimedBalance instead of re-reading unclaimedBalanceOf[_holder][_projectId]:

6. state variables should be cached in stack variables rather than re-reading them from storage

cache _primaryTerminalOf[_projectId][_token]

cache controllerOf[_projectId]

7. make variables outside of for loop

8. X = X + Y is cheaper than X += Y

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