Trust
Security model
Who can do what, and what an attacker gets.
| Actor | Can | Cannot |
|---|---|---|
| You (the owner) | Create, use and close your guard. | Be refused by anything except your own promise and the defaults. |
| A hostile app | Ask you to sign a transaction. | Make a guarded transaction pass if it breaks your promise; slip an instruction after End; reuse a snapshot. |
| Anyone else | Call the program. | Use your guard: it needs your signature and your PDA. |
What you trust
- The program: about 400 lines, no admin, no fee, no upgrade once the upgrade authority is revoked.
- The runtime's atomicity: a failed instruction undoes the transaction.
- The wallet that builds the transaction (it must add Begin and End, and sign what it built).
What you do not trust
The app, the dapp's preview, the RPC's simulation. None of them can make a balance move past a check, because the check runs last, inside the same transaction.
Upgradability
A deployed program can be upgraded by its upgrade authority until that authority is revoked. Before any real use the authority must be revoked (solana program set-upgrade-authority --final) and the deployed bytes compared with the build in this repository.