Ondo Finance - EaglesSecurity's results

Institutional-Grade Finance, Now Onchain.

General Information

Platform: Code4rena

Start Date: 29/03/2024

Pot Size: $36,500 USDC

Total HM: 5

Participants: 72

Period: 5 days

Judge: 3docSec

Total Solo HM: 1

Id: 357

League: ETH

Ondo Finance

Findings Distribution

Researcher Performance

Rank: 53/72

Findings: 1

Award: $8.28

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2024-03-ondo-finance/blob/be2e9ebca6fca460c5b0253970ab280701a15ca1/contracts/ousg/ousgInstantManager.sol#L554-L560

Vulnerability details

Impact

The setMintFee() function in the contract does not properly validate the _mintFee parameter. The current implementation checks the variable mintFee instead of validating the _mintFee function argument. This flaw creates a vulnerability as it allows a malicious user to set a mint fee that exceeds the intended limit. Once set at a high mintFee, it will initially result in miscalculations and disruption to the intended functionality of the contract and then setMintFee() will revert on every subsequent call due to the require(mintFee < 200) and this can be considered a DoS.

Proof of Concept

A malicious user sets _mintFee to a value greater than 200, for example 500. Since the require command only checks mintFee the function continues execution, because it checks the current mintFee and not the new that is coming from function parameter _mintFee. The mintFee is then set to the maliciously supplied value 500, bypassing the intended check. Once set at a high mintFee, it will initially result in miscalculations, and then setMintFee() will revert on every subsequent call due to the require(mintFee < 200) and this can be considered a DoS.

Tools Used

None

To address this vulnerability, it is critical to validate the _mintFee function parameter against the intended limit in the setMintFee() function instead of mintFee.

Assessed type

DoS

#0 - c4-pre-sort

2024-04-04T04:50:30Z

0xRobocop marked the issue as duplicate of #181

#1 - c4-judge

2024-04-09T14:51:56Z

3docSec changed the severity to QA (Quality Assurance)

#2 - c4-judge

2024-04-09T14:53:16Z

3docSec 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