Juicebox V2 contest - kaden'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: 88/105

Findings: 1

Award: $38.24

🌟 Selected for report: 0

🚀 Solo Findings: 0

uint256 _i; do { for (uint256 _j = _i + 1; _j < _terminals.length; _j++) if (_terminals[_i] == _terminals[_j]) revert DUPLICATE_TERMINALS(); unchecked { ++_i; } } while (_i < _terminals.length);
for (uint256 i; i < arr.length;) { ... unchecked { ++i; } }
  • For all uints, use > 0 instead != 0
    • Seen throughout the contracts
  • Use > value - 1 instead of >= value. Conversely, use < value + 1 instead of <= value
    • Seen throughout the contracts
  • Drop into assembly for == 0 checks
    • Seen throughout the contracts e.g.
function isZero(uint256/address/bool/etc value) returns (bool result) { assembly { bool := iszero(value); } }
  • Separate conditions
    • Seen throughout the contracts Instead of, e.g.
if (condition && anotherCondition) { doSomething(); }

Do

if (condition) { if (anotherCondition) { doSomething(); } }
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