The open door
Your agent’s account list for a withdraw instruction on a vault. Tap the account that lets anyone drain it.
Tap the part that will not survive contact with reality — or press 1…3.
Every account is hostile
Accounts for transfer_points, which moves points and calls the token program. Three validation gaps. Tap the one that hands your signers to an attacker.
Tap the part that will not survive contact with reality — or press 1…5.
“Rust panics on overflow”
Your agent wrote the balance update in the withdraw handler and explains why it is safe. Judge it.
I use balance - amount on u64. Rust panics on overflow, so an underflow will abort the transaction instead of going negative. No need for checked math.
Keep the upgrade key, or drop it?
The Hadra Records split program is ready for mainnet. Your agent asks what to do with the upgrade authority. Choose.
Shipping a program
Order the stages from first test to an immutable program on mainnet. Then ship one.
Capstone: write the brief
Write the brief you would hand a Rust coding agent for one of your projects. Choose each load-bearing decision, write the goal in your words, then run it. The page grades the decisions, not the prose.
What survives this level
| Signers | Every instruction names who must sign; an authority that is not a Signer is an open door. |
| Upgrade authority — keep or drop | Keeping the upgrade key means users trust you; dropping it means you trust your code. Multisig until you choose. |
| Cross-program invocation | A CPI carries your signers with it; validate every program id and account you pass along. |
| The instruction surface as a public API | Every client that integrates freezes your instruction layout; version it from day one. |
| Missing signer checks | The authority must sign and must match the account it claims to control. |
| Unvalidated accounts | Every account is attacker-supplied until a constraint proves its owner, type and relationship. |
| Arithmetic overflow | Checked arithmetic and overflow-checks = true in release; a wrapping balance is theft. |
| Reinitialisation | Initialise once; an instruction that can re-run init lets anyone reset ownership. |
| Audit economics | A simple-program audit starts around $7k–20k; you commit to needing one the day real value touches the program. |