sherlock-audit / 2023-09-Gitcoin-judging

11 stars 7 forks source link

helpMePlease - DOS in `DonationVotingMerkleDistributionBaseStrategy` contract #984

Closed sherlock-admin closed 11 months ago

sherlock-admin commented 11 months ago

helpMePlease

high

DOS in DonationVotingMerkleDistributionBaseStrategy contract

There is any array of allowedTokens in DonationVotingMerkleDistributionBaseStrategy but if this array got very large that the contract could face gas issues

Vulnerability Detail

see summary

Impact

DOS due to gas issue

Code Snippet

https://github.com/sherlock-audit/2023-09-Gitcoin/blob/main/allo-v2/contracts/strategies/donation-voting-merkle-base/DonationVotingMerkleDistributionBaseStrategy.sol#L84

Tool used

Manual Review

Recommendation

use mapping instead of array

sherlock-admin commented 11 months ago

1 comment(s) were left on this issue during the judging contest.

n33k commented:

invalid