Solana Security Review

    1

    Audit-style security review for Solana programs (Anchor or native): maps every instruction, scans 15 bug classes, walks a 45-point checklist, proves Highs and writes a report with severities and code fixes.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Solana Security Review

    Example session with this skill installed

    Review my Anchor program in onchain/programs/curve_market for security issues before we go to mainnet. It's a parimutuel market on whether a Meteora bonding-curve pool graduates by a deadline.

    • Read your context and instructions
    • Compiled the solana security review

    Summary

    curve_market (Anchor, 4 instructions: create_market, stake, resolve, claim) holds user funds in a PDA vault and pays winners pro rata.

    No Critical, High or Medium issues found. One Info finding. All 10 scanner leads were traced and dismissed. overflow-checks is ON in the release profile.

    IDTitleSeverity
    I-1Rounding dust stays in the vault foreverInfo

    Attack surface

    InstructionSignerNotes
    create_marketcreatorpool/config are UncheckedAccount, verified in dbc::read_pool / read_config
    stakeuserposition is init_if_needed, PDA per (market, user)
    resolvenone (permissionless)outcome read from the pool account itself
    claimusercloses position to user

    Invariants checked

    1. Only the position owner can claim it: PDA seeds [POSITION_SEED, market, user] + user is Signer. Holds.
    2. Total paid out never exceeds the pool: require!(market.paid_out <= total_pool) after each claim. Holds.
    3. A position cannot be claimed twice: claimed flag set before transfer, and the account is closed. Holds.
    4. Stakes credit what the vault actually received: balance delta after transfer_checked + reload(), so a Token-2022 transfer fee cannot inflate a position. Holds.

    I-1: Rounding dust stays in the vault forever

    Location: src/lib.rs:56 (payout_for)

    payout = winning_stake * total_pool / winning_total rounds down, which is the safe direction. The remainder (at most one unit per winning position) is never swept: there is no instruction to recover it once every position has claimed. Over many markets this strands small amounts.

    Recommendation: add a permissionless sweep after all positions are claimed (track a claim count), or let the last claimant take the remainder.

    Scanner leads dismissed

    LeadLocationWhy not an issue
    init_if_neededlib.rs:420Fields are only set when position.owner == Pubkey::default(); PDA is unique per user, so nobody can pre-create or reset another user's position
    UncheckedAccount pool/config (x4)lib.rs:369, 373, 461, 464read_pool / read_config check owner == DBC program, discriminator and length; config key must equal pool.config
    div-roundinglib.rs:64Rounds down on payouts (favours the vault)
    unix_timestamp (x3)lib.rs:128, 179, 257Deadline checks are consistent (stake allowed now <= deadline, resolve after)

    Next steps

    1. Decide on I-1 (sweep or last-claimant remainder) and add a test for it.
    2. Freeze or multisig the upgrade authority before mainnet.
    3. Run solana-verify on the deployed build so users can match it to this commit.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A security review of your Solana program, done the way an auditor works through it, not a vague "looks fine to me".

    What it does

    1. Maps the attack surface. map_program.py lists every instruction with its accounts and their constraints (signer, mut, has_one, seeds, owner, /// CHECK), and flags permissionless instructions and unchecked accounts on one page.
    2. Scans for risky patterns. scan.py flags 15 bug classes with file:line: unchecked accounts, CPIs to a caller-chosen program, non-canonical bumps, manual lamport closes, init_if_needed, remaining_accounts, unchecked arithmetic (and whether overflow-checks is on), lossy as casts, rounding, sysvar spoofing, transfer vs transfer_checked, and more.
    3. Walks every instruction through a 45-point checklist: access control, account validation, PDAs, arithmetic, token and Token-2022 handling, CPI, account lifecycle, economic logic, upgrade authority.
    4. Proves what it reports. Every High or Critical needs a traced path and a failing test or exact exploit steps. Scanner leads that turn out safe are listed as dismissed, with the reason.
    5. Writes the report in audit format: summary table, severity (Critical to Info), location, impact, proof and a code fix.

    Built for

    • Teams going to mainnet who want a first pass before paying for an audit
    • Bug bounty hunters triaging a new Immunefi program fast
    • Hackathon teams who need a security section that holds up

    Works on Anchor and native Rust. Scripts are Python standard library only: nothing to install, nothing sent anywhere. The agent never deploys or sends transactions during a review.

    Includes bad/good code pairs for each vulnerability class (missing signer binding, owner/type confusion, arbitrary CPI, duplicate mutable accounts, share inflation, account revival, stale state after CPI, Token-2022 transfer fees, oracle staleness).

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Web3 & Crypto.

    Requires valid Rust/Anchor project structure. High-severity findings require manual verification of the code path. Scanners identify leads, not confirmed exploits.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 2 days ago

    Software
    Python 3.8+

    Permissions

    Terminal / Shell
    Read Files

    Terminal: runs the two local Python scripts. Read files: reads the program source under review. Nothing is written except the report the user asks for, and no network access is needed.

    Listed2 days ago

    What's inside

    Frequently Asked Questions

    The skill is optimized for programs built with the Anchor framework or native Solana Rust. It requires a standard project structure containing an `Anchor.toml` or `Cargo.toml` to accurately map instructions and account constraints.

    A generic prompt reviews whatever the model happens to notice. This skill makes the agent work through a fixed method: map every instruction and its account constraints, run a scanner for 15 Solana bug classes, walk a 45-point checklist per instruction, and only report Highs it can trace end to end with a test or exact steps. Dismissed scanner leads are listed with the reason, so you can check its work.

    You will receive a comprehensive audit report featuring a vulnerability severity table, detailed impact analysis for each finding, and specific code recommendations to fix the identified issues. It also includes an attack surface map to help you visualize your program's logic.

    While the automated scanners identify common patterns like arithmetic overflows and unchecked sysvars, the skill includes a manual walkthrough phase. This allows the AI to trace complex logic flaws and cross-program invocation (CPI) risks that automated tools often miss.

    Yes, the skill includes a dedicated review module for Token-2022 compatibility. It specifically checks for potential pitfalls related to transfer fees, mint hooks, and permanent delegates to ensure your program interacts safely with the latest Solana token standards.

    New in Web3 & Crypto