Fund.name is declared with a 200-byte limit, but the raw name bytes are used as a PDA seed in both FundCreate and FundWithdraw (programs/rustfund/src/lib.rs):
Solana limits each individual PDA seed to 32 bytes (MAX_SEED_LEN). Any name longer than that makes address derivation fail before the instruction runs.
Impact: Low — no funds are at risk; fund_create simply fails for any name over 32 bytes, so the advertised 200-byte limit is unreachable and misleading. Names with multi-byte characters hit the limit at far fewer visible characters (e.g. ~16 Cyrillic letters, ~10 CJK characters). Account space is also over-allocated by 168 bytes per fund for a field that can never be filled.
Likelihood: High — any campaign title longer than a few words triggers it; the project's own test uses a 16-byte name and therefore never hits the limit.
Test from tests/poc.ts:
Output:
Do not use free-form text as a seed. Either hash the name:
or derive the PDA from a per-creator counter / caller-supplied nonce, and keep the full name only in account data. Alternatively, lower #[max_len] to 32 and document the limit.
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.