The fund PDA is derived from the campaign name, and Solana limits every PDA seed to at most 32 bytes, so the usable name length is capped at 32 bytes.
The Fund.name field is declared #[max_len(200)], advertising names up to 200 bytes, while FundCreate derives the PDA from name.as_bytes(). Any name longer than 32 bytes makes the seed exceed the limit and fund_create fails at runtime.
Likelihood:
When a creator chooses a campaign name longer than 32 bytes, fund_create reverts because the PDA seed exceeds Solana's 32 byte per-seed limit.
Impact:
Names between 33 and 200 bytes are accepted by the declared data layout but cannot be used to create a fund, so the feature is partly broken and the schema is misleading. No funds are at risk.
A 40 byte name cannot create a fund; the call reverts with "Max seed length exceeded".
Make the declared maximum match what is actually usable as a seed. Reducing max_len to 32 and validating the name keeps the schema honest, so a caller is never told a name is valid when it cannot create a fund. (If you instead want to keep arbitrarily long names, derive the PDA from a fixed-size hash of the name, for example seeds = [&hash(name.as_bytes()).to_bytes(), creator.key().as_ref()], so each seed stays within 32 bytes; use one approach or the other, not both.)
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.