contribute() does not verify that amount > 0. A caller passing amount = 0 will pass the deadline check, execute a no-op system_program::transfer, initialise a contribution PDA via init_if_needed (costing only PDA rent from the spammer), and add 0 to fund.amount_raised. An attacker can generate thousands of keypairs and submit zero-lamport contributions to flood a campaign with fake accounts — disrupting off-chain indexers, inflating contributor counts, and degrading RPC performance for any query filtering that campaign's accounts.
Likelihood:
Creating spam contributor keypairs on Solana costs only PDA rent (~0.002 SOL each) plus transaction fees — large-scale spam is economically feasible for a motivated attacker
There is no on-chain rate limiting or minimum stake requirement for creating contribution accounts
Impact:
Off-chain dashboards counting getProgramAccounts results display inflated contributor counts, misleading users about campaign popularity
Spam contribution PDAs permanently consume on-chain storage for the lifetime of the program
RPC calls fetching all contributions for a campaign become increasingly expensive as spam accounts accumulate
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.