coral-xyz / sealevel-attacks

☠️ Common Security Exploits and Protections on Solana
507 stars 95 forks source link

Chore: Update secure pda example. #17

Open nheingit opened 2 years ago

nheingit commented 2 years ago

Updates the secure PDA example to check the PDA against the seeds and the ctx.accounts.pool.key()

This is what Anchor is doing under the hood in the recommended example, so it should be explicitly laid out in the secure example to show you what Anchor is giving you for "free".