Your goal
Initialize a vault at the PDA derived from the fixed namespace `vault` and the authority public key.
The contract
- Use the exact seed formula: [b\"vault\", authority.key().as_ref()].
- Store the authority, bump, and a zero tracked balance.
- Only the authority pays for initialization.
Build it
Finish the `initialize` instruction and its account constraints. Keep the starter program ID unchanged.
Then build
$ anchor buildCommon mistakes
- Using a random keypair account instead of the PDA.
- Leaving the bump or authority unset.
- Changing the declared program ID.