Juicebox contest - erictee'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: 43/67

Findings: 1

Award: $37.88

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

[L-01] Avoid floating pragmas for non-library contracts.

Impact

While floating pragmas make sense for libraries to allow them to be included with multiple different versions of applications, it may be a security risk for application implementations.

A known vulnerable compiler version may accidentally be selected or security tools might fall-back to an older compiler version ending up checking a different EVM compilation that is ultimately deployed on the blockchain.

It is recommended to pin to a concrete compiler version.

Findings:
contracts/JB721GlobalGovernance.sol:L2 pragma solidity ^0.8.16; contracts/JBTiered721DelegateProjectDeployer.sol:L2 pragma solidity ^0.8.16; contracts/JB721TieredGovernance.sol:L2 pragma solidity ^0.8.16; contracts/JBTiered721DelegateStore.sol:L2 pragma solidity ^0.8.16; contracts/JBTiered721DelegateDeployer.sol:L2 pragma solidity ^0.8.16; contracts/JBTiered721Delegate.sol:L2 pragma solidity ^0.8.16; contracts/abstract/JB721Delegate.sol:L2 pragma solidity ^0.8.16;

[L-02] require()/revert() statements should have descriptive strings.

Impact

Consider adding descriptive strings in require()/revert().

Findings:
contracts/JBTiered721Delegate.sol:L216 require(address(this) != codeOrigin); contracts/JBTiered721Delegate.sol:L218 require(address(store) == address(0));

[L-03] _safemint() should be used rather than _mint() wherever possible

Impact

_mint() is discouraged in favor of _safeMint() which ensures that the recipient is either an EOA or implements IERC721Receiver. Both OpenZeppelin and solmate have versions of this function

Findings:
contracts/JBTiered721Delegate.sol:L461 _mint(_reservedTokenBeneficiary, _tokenId); contracts/JBTiered721Delegate.sol:L504 _mint(_beneficiary, _tokenId); contracts/JBTiered721Delegate.sol:L635 _mint(_beneficiary, _tokenId); contracts/JBTiered721Delegate.sol:L677 _mint(_beneficiary, _tokenId);

#0 - c4-judge

2022-11-04T14:50:18Z

Picodes marked the issue as grade-c

#1 - c4-judge

2022-11-04T21:12:42Z

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