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
Rank: 121/183
Findings: 1
Award: $7.35
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: TheSavageTeddy
Also found by: 0x175, 0x486776, 0xnev, AamirMK, AlexCzm, ArmedGoose, BiasedMerc, CaeraDenoir, Egis_Security, Jorgect, KYP, MrPotatoMagic, PoeAudits, SBSecurity, SovaSlava, VAD37, adam-idarrha, alix40, carrotsmuggler, d_tony7470, dimulski, grearlake, josephdara, ljj, n0kto, okolicodes, sashik_eth, sil3th, turvy_fuzz
7.3512 USDC - $7.35
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
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); }
Detailed Attention
Close vaults
irrespective of any tokens
inside and send any remaining tokens to the vault owner.
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