Fetch
Pre-state snapshots for every writable account via RPC
CRIF is a transaction legibility and simulation engine for Solana. Decodes what an instruction actually does, diffs state against live RPC, and flags the exact shape that drained $285M out of Drift on April 1, 2026.
FEVmEp8gcN7iqpGYuhzhENM7adaiFvYsQofg7zYspumpEvery transaction passes through a deterministic pipeline. No heuristics, no ML, no guessing. The engine fetches, simulates, decodes, and classifies in a single pass.
Pre-state snapshots for every writable account via RPC
simulateTransaction with accounts config returns post-state
8 program decoders resolve every instruction by discriminator
Risk merge + durable nonce detection + Drift pattern flag
On April 1, 2026 a North-Korea-linked group drained 285 million USD from Drift Protocol's Squads multisig. They did not exploit a bug. They did not steal a key. They spent six months posing as a quant firm, then got two council members to pre-sign a routine-looking transaction whose payload was a config_transaction_execute. The pre-signed tx was wrapped in a durable nonce, so it did not expire. The attacker sat on it for a week, then fired. Twelve minutes later the treasury was on Ethereum.
Below is the verbatim terminal output of the engine consuming a synthesized versioned-transaction whose shape matches the April 2026 Drift exploit. Reproduce it with cargo run --example drift_attack.
sle simulate --tx $ATTACK_B64 --offline================================================================ SOLANA TRANSACTION LEGIBILITY REPORT ================================================================ Signature: 4dLPchZ8d2eCX2eobPtT9eN4DHwxmWZZomvPiqQkdwg... Fee payer: 4kfEfEk7HrCLpdqo3vtrMYYF9ehzCAm7i4wZeK5f6syi Simulation: success Overall risk: CRITICAL ! DURABLE NONCE: yes - this transaction has no expiry ---------------------------------------------------------------- Human-readable summary: [System Program] AdvanceNonceAccount ! Durable nonce advance — tx was prepared earlier and kept valid via nonce [Squads v4] config_transaction_execute ! Governance change being applied — may add/remove signers, lower threshold, or drop timelock ! This is the class of instruction used in the April 2026 Drift exploit [X] CRITICAL — this transaction matches the APRIL 2026 DRIFT EXPLOIT PATTERN: durable nonce + multisig admin execute. the attacker that drained $285M from Drift used exactly this shape — pre-signed governance actions that stay valid indefinitely. DO NOT SIGN without verifying the inner instructions AND the nonce account lifecycle. ---------------------------------------------------------------- Instructions (2): #0 System Program :: AdvanceNonceAccount [MEDIUM] #1 Squads v4 :: config_transaction_execute [CRITICAL] ================================================================
Every decoder lands in the same registry and emits the same LegibilityReport shape. Anchor programs go through a generic discriminator matcher; native programs (System, SPL Token, Token-2022) have custom decoders.
Every instruction receives a risk level. The engine merges them upward — if any single instruction is CRITICAL, the entire transaction is CRITICAL. No averaging, no weighting, no probability scores.
A non-custodial pre-sign defense layer built for one specific job: showing you the ground truth of a transaction before your signature commits to it. Your keys never touch our code. Zero runtime panics, zero telemetry, zero network dependency in offline mode.
RPC client, account decoder, transaction status
sha256('global:<name>')[0..8] matching for all Anchor programs
Non-blocking RPC calls, concurrent account fetches
Type-safe argument parsing with derive macros
Documentation site with 3D hero and edge-rendered OG images
Full decoder + classifier coverage without network dependency
Decodes Solana transactions into human-readable reports. It fetches pre-state for every writable account, simulates the transaction, resolves each instruction through program-specific decoders, and classifies the overall risk. The output tells you exactly what a transaction will do before you sign it.
Yes. The --offline flag skips RPC simulation and state diffing, but still decodes every instruction, detects durable nonces, identifies the Drift 2026 pattern, and assigns risk levels. Useful for air-gapped signing environments or when you just need structural analysis.
The combination of a durable nonce (AdvanceNonceAccount as the first instruction) plus a Squads v4 config_transaction_execute. This is the exact transaction shape used to drain $285M from Drift Protocol on April 1, 2026. The attacker got council members to pre-sign governance actions wrapped in nonces that never expired, then submitted them a week later.
8 programs: System Program, SPL Token, Token-2022, Squads v4, Jupiter v6, Drift v2, Kamino Lend, and MarginFi v2. Together these cover 80+ instructions. Anchor programs use a generic discriminator matcher; native programs have custom decoders.
$CRIF on Solana. Community-driven, no DAO, no governance — the token is a signal of support, not a control mechanism. The engine itself is open source and non-custodial: it stays free, your keys stay yours, and the protocol stays the same regardless of token holders.
Yes. Add the crate as a git dependency in your Cargo.toml and import the decoder registry and report types directly. The public API exposes simulate_transaction, decode_instructions, and classify_risk as composable functions.