DYAD - fandonov's results

The first capital efficient overcollateralized stablecoin.

General Information

Platform: Code4rena

Start Date: 18/04/2024

Pot Size: $36,500 USDC

Total HM: 19

Participants: 183

Period: 7 days

Judge: Koolex

Id: 367

League: ETH

DYAD

Findings Distribution

Researcher Performance

Rank: 128/183

Findings: 1

Award: $4.87

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

4.8719 USDC - $4.87

Labels

bug
2 (Med Risk)
satisfactory
sufficient quality report
edited-by-warden
duplicate-175

External Links

Lines of code

https://github.com/code-423n4/2024-04-dyad/blob/cd48c684a58158de444b24854ffd8f07d046c31b/src/core/VaultManagerV2.sol#L156-L169 https://github.com/code-423n4/2024-04-dyad/blob/cd48c684a58158de444b24854ffd8f07d046c31b/src/core/VaultManagerV2.sol#L205-L228

Vulnerability details

Impact

In the contract VaultManagerV2.sol in function VaultManagerV2.sol::mintDyad, there is no minimum mint value check. This can lead to bad debt for the liquidator.

Proof of Concept

uint public constant MIN_COLLATERIZATION_RATIO = 1.5e18; // 150%
uint public constant LIQUIDATION_REWARD        = 0.2e18; //  20%

For example lets say that the user deposits 500, for that amount he can get around 333.33 worth of stable coins. If we calculate the reward fee the liquidator gets it will be around 33. No liquidator will want to do this because the gas fees of transactions like this can be a lot higher depending on the state of the network, in this situation the liquidator can have bad debt.

With a MIN_COLLATERIZATION_RATIO of 150% if the user deposits 500, he gets 333.33 worth of stable coins. After the VaultManagerV2.sol::burnDyad function happens. The LIQUIDATION_REWARD is 20% which will be around 33 in this situation. When the network becomes highly congested, the price of gas can skyrocket to incredible levels. Which will lead to very high gas prices.

Tools Used

Manual review

Consider putting a MIN_MINT_VALUE check.

Assessed type

Context

#0 - c4-pre-sort

2024-04-28T03:28:57Z

JustDravee marked the issue as duplicate of #1258

#1 - c4-pre-sort

2024-04-29T09:21:09Z

JustDravee marked the issue as sufficient quality report

#2 - c4-judge

2024-05-03T14:07:47Z

koolexcrypto changed the severity to QA (Quality Assurance)

#3 - c4-judge

2024-05-12T09:32:52Z

koolexcrypto marked the issue as grade-c

#4 - c4-judge

2024-05-22T14:26:07Z

This previously downgraded issue has been upgraded by koolexcrypto

#5 - c4-judge

2024-05-28T16:51:53Z

koolexcrypto marked the issue as satisfactory

#6 - c4-judge

2024-05-28T20:06:10Z

koolexcrypto marked the issue as duplicate of #175

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