Skip to content

​In short

A PDA is an address derived from a program plus some seeds. It has no private key, so only that program can sign for it, which makes it handy for storing app state at predictable addresses.
You’ve used this in: Trade settlement Step 1
A program-derived address (PDA) is a 32-byte address derived from a program ID and a set of seeds. It’s guaranteed to be off the Ed25519 curve, so no private key exists for it. Only the program that derived it can “sign” for it, through invoke_signed in a cross-program invocation (CPI).
Seeds and a program ID derive an off-curve address that only the program can sign for.Seeds and a program ID derive an off-curve address that only the program can sign for.
Seeds and a program ID derive an off-curve address that only the program can sign for.

​Key facts

  • Deterministic: The same seeds and program ID always produce the same address.
  • Off-curve: If the hash lands on the Ed25519 curve, derivation fails and the next bump seed is tried.
Security: PDA checklist
  • Derive or verify every PDA inside the program. Don’t trust an address because the caller passed it in the right position.
  • Use the canonical bump, stored at creation. Never take a bump from instruction data.
  • Use fixed-length seeds or separators so two seed sets can’t produce the same address.
  • Put the user, pool, or mint in the seeds of any PDA that signs for funds.
See PDA Derivation for each rule in detail.

​When to use PDAs

  • Program signing: Only the owning program can sign via invoke_signed, enabling programs to act as autonomous authorities.
  • User-scoped state: Derive per-user accounts from user pubkey seeds (e.g., ["user", user_pubkey]).
  • No keypair management: No private key to store or lose.

​Limits

LimitValueSource
Max seeds16, including the bump (15 of your own)MAX_SEEDS
Max seed length32 bytes maximum per seedMAX_SEED_LEN
Bump range0-255 (1 byte)Appended as the final seed element
create_program_address cost1,500 CUscreate_program_address_units
find_program_address worst-case cost1,500 entry + 1,500 x iterations1,500 on entry + 1,500 per failed bump
Max PDA signers per CPI16MAX_SIGNERS