Juicebox V2 contest - Picodes'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: 30/105

Findings: 2

Award: $183.32

🌟 Selected for report: 0

🚀 Solo Findings: 0

[NC - 01] - Typo

Here, preconfifigured -> preconfigured

[NC - 02] - Unclear comment

https://github.com/jbx-protocol/juice-contracts-v2-code4rena/blob/828bf2f3e719873daa08081cfa0d0a6deaa5ace5/contracts/JBController.sol#L75

“The currency of amount” ? I guess you mean “the currency the amount is in” or something like this

[NC - 03] - Typo

Here, Only need the price is needed. -> Only the price is needed.

[Low - 01] - Add safety checks around Chainlink

When querying Chainlink to fetch the oracle, it returns a timestamp “updatedAt” that currently you do not consider. It would be better and would not be a significant gas overhead to double check the oracle latency, so that critical functionalities of Juicebox can be paused if the oracle has not been updated in time.

[Low - 02] - Price feeds cannot be modified

https://github.com/jbx-protocol/juice-contracts-v2-code4rena/blob/828bf2f3e719873daa08081cfa0d0a6deaa5ace5/contracts/JBPrices.sol#L109

In JBPrices, an incorrect price feed cannot be modified afterwards which could force the owner to redeploy everything in case of mistake

[Gas - 01] - JBChainlinkV3PriceFeed - feed variable

Here, feed could be made immutable as there is not setter for it

[Gas - 02] - JBChainlinkV3PriceFeed - _feedDecimals variable

Do not fetch the decimals at every oracle read, as it cannot change. You could store the decimals during the deployment.

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