DYAD - okolicodes'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: 121/183

Findings: 1

Award: $7.35

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

7.3512 USDC - $7.35

Labels

bug
2 (Med Risk)
satisfactory
sufficient quality report
:robot:_39_group
duplicate-118

External Links

Lines of code

https://github.com/code-423n4/2024-04-dyad/blob/cd48c684a58158de444b24854ffd8f07d046c31b/src/core/VaultManager.sol#L63-L73

Vulnerability details

Impact

In the remove function vaults can only be removed when they are no token assets remaining in the vault. This can lead to a lot of issues as an attacker can keep on sending dust amounts of token assets to all the vaults in the protocol making it impossible to close vaults in different dNft positions

Proof of Concept

Supposing a user has created the max number of vaults allowed (5) and intends on removing a vault with asset A and adding a new vault with asset B. An attacker can deposit dust amounts of asset A to make it impossible for the vault owner to remove the vault and make changes as they deem fit and the attacker could do this over and over again. They can also perform this attack on a larger scale as they can send dust amounts of vault assets to a whole lot of vaults in the protocol forever preventing users from removing vaults and this is unintended behaviour that leads to bad user experience with the protocol and DoS.

  {
  >>>  if (Vault(vault).id2asset(id) > 0) revert VaultHasAssets();
    if (!vaults[id].remove(vault))     revert VaultNotAdded();
    emit Removed(id, vault);
  }

Tools Used

Detailed Attention

Close vaults irrespective of any tokens inside and send any remaining tokens to the vault owner.

Assessed type

DoS

#0 - c4-pre-sort

2024-04-27T13:35:02Z

JustDravee marked the issue as duplicate of #489

#1 - c4-pre-sort

2024-04-29T09:32:14Z

JustDravee marked the issue as sufficient quality report

#2 - c4-judge

2024-05-05T20:38:14Z

koolexcrypto marked the issue as unsatisfactory: Invalid

#3 - c4-judge

2024-05-05T20:39:24Z

koolexcrypto marked the issue as unsatisfactory: Invalid

#4 - c4-judge

2024-05-05T21:22:45Z

koolexcrypto marked the issue as nullified

#5 - c4-judge

2024-05-05T21:22:51Z

koolexcrypto marked the issue as not nullified

#6 - c4-judge

2024-05-05T21:22:58Z

koolexcrypto marked the issue as not a duplicate

#7 - c4-judge

2024-05-06T08:55:35Z

koolexcrypto marked the issue as duplicate of #118

#8 - c4-judge

2024-05-11T12:24:15Z

koolexcrypto marked the issue as satisfactory

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