Juicebox contest - emrekocak'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: 61/67

Findings: 1

Award: $25.96

Gas:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

25.9629 USDC - $25.96

Labels

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

External Links

Use assembly to check for address(0)

Saves 6 gas per instance if using assembly to check for address(0)
e.g.

assembly {  if iszero(_addr) {   mstore(0x00, "zero address")   revert(0x00, 0x20)  } }

Instances include: contracts/JBTiered721DelegateDeployer.sol:99 contracts/JB721TieredGovernance.sol:282 contracts/JB721TieredGovernance.sol:291 contracts/JBTiered721Delegate.sol:105 contracts/JBTiered721Delegate.sol:146 contracts/JBTiered721DelegateStore.sol:609 contracts/JBTiered721DelegateStore.sol:872 contracts/JBTiered721DelegateStore.sol:877

Use calldata instead of memory for function parameters

It is generally cheaper to load variables directly from calldata, rather than copying them to memory. Only use memory if the variable needs to be modified.

Instances include: contracts/JBTiered721DelegateStore.sol:628 contracts/abstract/JB721Delegate.sol:311 contracts/abstract/JB721Delegate.sol:323 contracts/libraries/JBIpfsDecoder.sol:44 contracts/libraries/JBIpfsDecoder.sol:66 contracts/libraries/JBIpfsDecoder.sol:74 contracts/libraries/JBIpfsDecoder.sol:82

#0 - c4-judge

2022-11-08T17:48:50Z

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