Hubble contest - jayjonah8's results

Multi-collateral/Cross-Margin Perpetual Futures on Avalanche.

General Information

Platform: Code4rena

Start Date: 17/02/2022

Pot Size: $75,000 USDC

Total HM: 20

Participants: 39

Period: 7 days

Judges: moose-code, JasoonS

Total Solo HM: 13

Id: 89

League: ETH

Hubble

Findings Distribution

Researcher Performance

Rank: 35/39

Findings: 1

Award: $142.32

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

142.3223 USDC - $142.32

Labels

bug
QA (Quality Assurance)

External Links

Lines of code

https://github.com/code-423n4/2022-02-hubble/blob/main/contracts/VUSD.sol#L48 https://github.com/code-423n4/2022-02-hubble/blob/main/contracts/VUSD.sol#L43

Vulnerability details

Impact

In VUSD.sol the mintWithReserve() and withdraw() functions both handle minting and burning of the vusd tokens. Both of these function don't require that the amount passed in is larger than 0 while still emitting an event through the open zepellin erc20 library. Leaving out this check can trick the protocol into thinking that funds were minted or burned when in fact they were not. This is especially important if the protocol will ever be relying on these events to make important decisions in the code.

Proof of Concept

https://github.com/code-423n4/2022-02-hubble/blob/main/contracts/VUSD.sol#L48

https://github.com/code-423n4/2022-02-hubble/blob/main/contracts/VUSD.sol#L43

Tools Used

Manual code review

add to mintWithReserve() and withdraw() functions in VUSD.sol: require(amount > 0, "Amount cannot be 0");

#0 - atvanguard

2022-02-24T08:24:56Z

Duplicate of #119

#1 - moose-code

2022-03-06T15:37:08Z

Not agreeing its a duplicate of #119 as it doesn't talk about ddos. Making this low.

#2 - JeeberC4

2022-03-24T20:41:33Z

Since this issue was downgraded to a QA level, and the warden did not submit a separate QA report, we've renamed this one to "QA report" for consistency. The original title, for the record, was VUSD.sol functions don't check if amount > 0

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