On-chain forensic research logbook — Solana state-transition anomalies, exploit forensics, and MEV/authority-abuse pattern analysis.
This repository documents recurring exploit and abuse patterns observed on Solana at the instruction and account-state level. Entries range from fully verified incidents (public signatures, on-chain confirmation) to composite/illustrative reconstructions built from repeated patterns across multiple lower-confidence cases. Every entry declares its classification explicitly (see Data Provenance & Classification). Do not treat unclassified or composite entries as attribution of any specific real-world actor, wallet, or project.
case-notes/
├── README.md # this file — methodology + schema
├── TEMPLATE.md # blank case study template
└── case-studies/
├── 001-bundle-snipe-anatomy.md
└── 002-authority-drain-exploit.md
Case files are numbered sequentially in filing order (NNN-slug.md), not chronological incident order. Chronology lives inside each file's metadata block.
Four analytical passes are run against every case, in order. Each pass produces artifacts that feed the case study schema below.
- Primary source:
getTransaction(RPC) withmaxSupportedTransactionVersion: 0,encoding: jsonParsed, falling back to rawbase64+ manual instruction decode when the invoked program has no indexed IDL. - Slot-level context via
getBlockwithtransactionDetails: fullto recoverinnerInstructions,preBalances/postBalances,preTokenBalances/postTokenBalances, and compute unit consumption per instruction. - Bundle reconstruction: Jito Block Engine bundle IDs are correlated against tip-account transfers (known tip PDAs) and same-slot transaction ordering to reassemble atomic bundles from otherwise independent-looking transactions.
- Instruction decode priority: Anchor IDL (8-byte sighash discriminator) → Shank/native discriminator tables → manual byte-offset decode against the target program's public source (when available) or bytecode disassembly (when not).
- Output artifact: a linear instruction trace, one row per top-level + inner instruction, with program ID, discriminator, decoded args, and signer set.
- Account diffing: every account touched in a transaction is diffed pre → post at the byte level (not just lamports). Struct-aware diffing is used where the account layout is known (SPL Token, BPFLoaderUpgradeable
ProgramData, Anchor account structs). - Lamport delta accounting separates rent-exempt reserve movement, transfer amount, base fee, priority fee, and Jito tip — a naive "SOL in/out" figure conflates these and produces false funding-magnitude conclusions.
- Token account state tracked explicitly:
mint_authority,freeze_authority,supply,amount, and ATA derivation (findProgramAddressSyncagainst[wallet, TOKEN_PROGRAM_ID, mint]) to confirm an account is canonical vs. an attacker-planted lookalike. - PDA derivation is independently re-verified for every signer-by-CPI account (seeds + bump recomputed, not trusted from instruction metadata) to catch seed-collision or bump-substitution manipulation.
- Full cross-program invocation graph is built per transaction: caller → callee edges, instruction data passthrough, and any privilege extension via
invoke_signed(a PDA signing on behalf of a program is the single most common vector for scoped-authority escalation). - Solana runtime enforces a max CPI call depth (4 as of the runtime versions covered in this repo); traces are flagged when depth-limit-adjacent patterns are used to obscure control flow across intermediate router/proxy programs.
- Flag criteria: PDA-signed CPI where the seed set includes attacker-influenced input (user-supplied pubkey/nonce as a seed component without a corresponding ownership check), or where an intermediate program forwards a signer privilege it was not scoped to hold.
- First-funder graph: recursive trace of SOL inflow to each wallet of interest back to a CEX hot-wallet withdrawal, bridge egress, or an unattributed boundary (treated as a mixing/privacy-rail hop and logged as such rather than assumed-attributed).
- Common-funder clustering: wallet sets are clustered on (a) shared funding source within a bounded slot window, (b) shared fee payer across otherwise-independent transactions, (c) shared Jito tip account, (d) co-inclusion in the same bundle or same slot.
- Temporal clustering is weighted heavily — same-slot co-inclusion is treated as near-certain coordination; same-block-range-but-different-slot is treated as probable; loose time correlation without shared infra is logged as weak/inconclusive.
Every case study declares a Classification field in its metadata block:
| Classification | Meaning |
|---|---|
Verified |
Every signature and address cited resolves on-chain as shown; independently reproducible from public RPC data. |
Alleged |
Sourced from a third-party report or community attribution not independently re-derived from raw traces by this repo. |
Composite |
Constructed from recurring structural patterns observed across multiple lower-confidence or non-public cases, for methodology demonstration. Signatures/addresses are synthetic placeholders and MUST NOT be treated as resolvable on-chain records or as attribution of any specific real wallet, program, or actor. |
Case studies 001 and 002 in this repository are filed as Composite. They document exploit mechanics that are well-established in Solana security literature (Sybil-funded bundle acquisition against fair-launch caps; unrevoked BPFLoaderUpgradeable authority as a post-migration attack surface), reconstructed as a single representative walkthrough. Signature and address strings in those files are synthetic (base58-well-formed, non-resolving) and exist to demonstrate trace-table structure, not to assert a specific incident.
Every file under case-studies/ follows the schema defined in TEMPLATE.md:
- Metadata block — Case ID, filing date, classification, chain, program(s), exploit class, confidence, status.
- Summary — one paragraph, no narrative framing, stating what happened and the net effect (funds/supply/authority moved, to where).
- Actors — labeled roles (deployer, execution wallet, victim contract, funding source), pseudonymous, not identity claims.
- Technical Timeline — slot-ordered sequence of transactions/instructions with signatures.
- Account State Table — pre/post state for every account material to the exploit.
- Instruction Trace — decoded instruction-by-instruction breakdown including CPI depth and inner instructions.
- Funding Graph — first-funder trace and clustering result.
- Root Cause — the specific missing check, unrevoked authority, or design assumption that was violated.
- Detection Heuristic — a concrete, implementable monitoring rule derived from the root cause.
- References — links/citations for
Verified/Allegedentries; explicitly marked N/A (synthetic) forCompositeentries.
- All account addresses and transaction signatures in
Compositeentries are synthetic base58 strings and are marked[SYNTHETIC]inline on first use per file. - Lamports are reported in SOL to 9 decimal places where precision matters; otherwise abbreviated (e.g.
12.4 SOL). - Slots are absolute; relative slot offsets are given in parentheses where useful for pacing analysis (e.g.
slot 301442201 (+2)). - Program IDs for well-known Solana programs (System Program, SPL Token, Associated Token Program, BPFLoaderUpgradeable) are cited as their real, public, well-known program IDs — these are protocol constants, not case-specific data, and are distinct from the synthetic actor addresses above.