Solana program audits where the attacker chooses every account.
Solana is not a dialect of the same thing. Programs are handed the accounts a transaction names, and the runtime authenticates almost none of them. The dominant critical finding here is not reentrancy or arithmetic — it is a validation the program was supposed to perform and did not.
Seven checks the runtime will not do for you.
On the EVM, storage belongs to the contract and the caller's identity arrives authenticated. Neither holds here. A Solana review walks every instruction against this matrix, because a single omitted check is usually the whole finding.
How invariants are established during a reviewOwner
- The question
- Is this account owned by the program that should own it?
- If it is missing
- An attacker passes a look-alike account they created and control, with every field set to whatever suits them. The program reads it as trusted state.
- What we check
- Owner asserted before any deserialised data is used. Anchor's typed accounts do this; a raw AccountInfo does not, and mixing the two is where it slips.
Signer
- The question
- Did the authority actually sign this transaction?
- If it is missing
- Any address can be presented as the authority, and every instruction gated on that authority becomes permissionless.
- What we check
- is_signer asserted on each authority account, and Signer used in place of an unchecked account wherever a signature is the control.
Identity
- The question
- Is this the specific account expected, not merely the right type?
- If it is missing
- Right type, wrong instance: an attacker supplies their own correctly-shaped account and the program operates on it against somebody else's position.
- What we check
- Expected account bound explicitly by address or PDA constraints, stored-key comparisons, or has_one relationships. Discriminators provide supplemental type and layout validation; they do not prove account identity.
PDA seeds
- The question
- Is this address the canonical derivation for these seeds?
- If it is missing
- A non-canonical bump yields a second valid address for the same logical seeds, so an attacker can stand up a parallel account the program treats as official.
- What we check
- Canonical bump stored and re-derived rather than accepted from input, and seeds containing everything that must be unique per account.
Closing
- The question
- Was this account actually closed, or just emptied?
- If it is missing
- An account drained of lamports but left intact can be refunded within the same transaction and reused, with its stale data still readable as current.
- What we check
- Closure zeroes the data, reassigns ownership, and drains the lamports, with nothing reading the account afterwards in the same instruction.
CPI target
- The question
- Which program is this instruction actually invoking?
- If it is missing
- An attacker supplies a program id of their own and the program hands its signing authority to arbitrary code it never intended to call.
- What we check
- Program ids compared against pinned constants before invocation, and signer seeds passed only where the callee is fixed.
Compute
- The question
- Does this instruction finish inside the compute budget?
- If it is missing
- Iteration over a collection users can grow eventually makes the instruction unexecutable — and the paths that stop working are usually close, liquidate, and withdraw.
- What we check
- Bounded or paginated processing, with worst-case compute measured against a full account rather than a test fixture.
The framework gap
Anchor performs several of these checks automatically, which is exactly why the gaps are easy to miss: a codebase that looks uniformly safe often has one instruction using an unchecked account because a constraint could not express what it needed. The interesting review question is not whether a framework is used, but where somebody had to step outside it.
A mint can behave in ways your integration never anticipated.
Classic SPL tokens behave uniformly enough that teams reason about them as a single thing. Token-2022 makes behaviour a per-mint decision through extensions, and the ones that matter most are invisible from a balance query.
Transfer hooks
A transfer invokes another program mid-flight. Anything that assumed a transfer was inert now has arbitrary code running inside it.
Transfer fees
Less arrives than was sent. Credit the requested amount and the shortfall lands on you, on every single transfer.
Permanent delegate
An authority that can move or burn any holder's tokens indefinitely. Custody assumptions built on possession stop being true.
Freeze authority
Accounts can be frozen after the fact, so a withdrawal path that always worked in testing can revert permanently in production.
Default account state
New accounts can arrive frozen, which turns onboarding into a support problem rather than a transfer.
Retained mint authority
Supply can still grow after you integrate. Any accounting anchored to a supply figure read once is anchored to nothing.
Interest-bearing mints
Displayed balances change with no transfer at all, so a figure snapshotted at deposit is wrong by withdrawal.
Wrong mint, right shape
A token account of exactly the correct type, holding a different mint. Type checks pass and the value moved is not the value you meant.
The SPL assumption gap
Code written against classic SPL Token assumes a fixed set of behaviours that Token-2022 turned into per-mint options. The reliable pattern is the same one that works for hostile ERC-20s: enumerate the extensions present on the mint rather than assuming the defaults, and measure the balance delta you actually received instead of trusting the amount you asked for.
Bring the program and the instructions you trust least.
Scoping starts with the program id, the instruction set, and which accounts each one accepts. If part of the codebase had to step outside the framework's constraints, that is usually the right place to begin.
Every chain is reviewed on the same method. See how a smart contract audit runs.