All builds
Anchor · Intermediate · ~75 min
Build a SOL Vault
Ship one small Anchor program that can hold SOL, enforce its authority, and survive adversarial tests.
Your local workspace
Download starterBegin stage 1Build locally, then upload only target/deploy/sol_vault.so.
The path
- 01
Create the vault
Give every authority one deterministic vault PDA.
- 02
Accept deposits
Move SOL in and keep an honest internal balance.
- 03
Withdraw safely
Let the owner withdraw without turning the vault into a drain.
- 04
Defend the vault
Make the happy path hard to abuse.
- 05
Close cleanly
Leave no stranded state behind.