~/talk

The Good, The Bad, and The Vulnerable: Navigating Common Pitfalls in Solana Program

Talkat Solana Breakpoint 2023 · 2023-10-30..11-03· [smart-contracts, security]
links:none on file
slides:none on file

Ten concrete rules: always check signer and owner check on accounts, verify the program ID for CPIs, and tag account types with an 8‑byte identifier so mints and token accounts don’t get swapped. Use checked integer math, do multiplies before divides to preserve precision, and pick a consistent rounding policy (one‑token rounding leaks can be batched into profitable drains). Write a redeemed boolean before closing accounts to prevent reopen attacks, prefix PDA seeds to avoid collisions, handle CPI errors (no missing ?), and use Anchor and Solana Bank Run for validation and unit tests.

AI-written summary · about

  1. 0:00Introduction to Solana security
  2. 1:01Signer and ownership checks
  3. 2:21Account validation and interaction
  4. 4:22Integer math best practices
  5. 7:20Precision and rounding errors
  6. 10:13Managing account lifecycle
  7. 12:28Error handling in Rust
  8. 13:53PDA seed security
  9. 16:38Tools and concluding thoughts
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.