Input validation at the entry point is expected to reject oversized inputs with a clear custom error before any state is created.
The fund PDA is seeded with name.as_bytes(), but Solana caps each seed at 32 bytes — #[max_len(200)] invites names that make find_program_address fail (MaxSeedLengthExceeded). Separately, a description over 5000 bytes overflows the allocated account space and reverts at Anchor's exit serialization. Neither path yields a custom ErrorCode.
Likelihood:
Reason 1: A 33-byte name is an ordinary user input ("Whale Conservation Initiative - Phase 2 (Pacific Region)" already exceeds it).
Reason 2: The declared max_len(200) actively invites long names rather than warning against them.
Impact:
Impact 1: Campaign creation and all name-seeded instructions fail with the un-actionable MaxSeedLengthExceeded, burning retry fees and support load.
Impact 2: The description overflow reverts the entire fund_create transaction with no custom error, leaving users no diagnosis path.
Two one-transaction reproductions of the size mismatches:
Expected result: a 33-byte name fails with MaxSeedLengthExceeded; a 5,001-byte description fails with a bare serialization revert — neither explainable to the user.
Reject oversized inputs at the top of fund_create() with dedicated error codes so users get an actionable message instead of a runtime failure. Alternatively, hash the name into the seeds to keep max_len(200) — then shrink #[max_len] to 32 only if names stay human-readable seeds.
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.