Juicebox V2 contest - kebabsec'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: 74/105

Findings: 2

Award: $53.10

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

14.8726 USDC - $14.87

Labels

bug
duplicate
3 (High Risk)
valid

External Links

Lines of code

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

Vulnerability details

Impact

Oracle might return stale data for _price

Proof of Concept

currentPrice in JBChainlinkV3PriceFeed.sol.sol does not check if the data from Chainlink is fresh (https://github.com/jbx-protocol/juice-contracts-v2-code4rena/blob/828bf2f3e719873daa08081cfa0d0a6deaa5ace5/contracts/JBChainlinkV3PriceFeed.sol#L42). If there is a problem with the Chainlink oracle, this contract may be supplied with incorrect or stale data.

See these previous issues for reference: https://github.com/code-423n4/2021-10-mochi-findings/issues/87 https://github.com/code-423n4/2022-01-yield-findings/issues/78

Tools Used

Manual code review

Implement checks with require stataments using roundID and answeredInRound info supplied by Chainlink to ensure the data is fresh. See the mitigation in (https://github.com/code-423n4/2021-10-mochi-findings/issues/87).

#0 - mejango

2022-07-12T18:51:02Z

dup #138

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