This repository has been archived by the owner on Jun 2, 2024. It is now read-only.
0xGoodess - Even though there is way to remove dust delegation; the attacker can continuously spam delegatedVeCvg #51
Labels
Non-Reward
This issue will not receive a payout
0xGoodess
medium
Even though there is way to remove dust delegation; the attacker can continuously spam delegatedVeCvg
Summary
Even though there is way to remove dust delegation; the attacker can continuously spam
Vulnerability Detail
While the delegetee can choose to remove any delegation by calling
removeTokenIdDelegated
, they can only remove 1 tokenId delegation at 1 time. First this is very inefficient, Secondly, an attacker with enough gas and bandwidth can set up infrastructure to continouly spam the victim, such that the victim can not effectively remove delegation.Consider:
removeTokenIdDelegated
removeTokenIdDelegated
with delegation.Noted
manageOwnedAndDelegated
does not mitigate this issue since there is no way to pre-populate approved delegation yet.Impact
users have no way to effectively stop delegation spam.
Code Snippet
https://github.com/sherlock-audit/2023-11-convergence/blob/main/sherlock-cvg/contracts/Locking/LockingPositionDelegate.sol#L330-L368
Tool used
Manual Review
Recommendation
Consider adding integration of populating
delegatedVeCvg
onmanageOwnedAndDelegated
, by allowing others to delegate over an "unlimited" delegationCache, and the owner can clean the array and push the delegation from delegationCache to the active delegatedVeCvg array.The text was updated successfully, but these errors were encountered: