Works with the AI Agents you already use

    Solana Testing Fuzzing

    by BanditXBT

    1

    LiteSVM/Mollusk/Trident testing for Solana: wrong-account attack matrix, invariants, mutation checks.

    Free

    Security scanned

    About this skill

    Security tests on Solana are mostly negative tests with wrong accounts. Test what an attacker can pass, not just the happy path.

    • LiteSVM / Mollusk: in-process SVM, no validator, very fast; load program .so, set account state directly, advance clock/slots. Best for unit-level and property tests; Mollusk (Anza-maintained, Rust-only) is aimed at single-instruction testing with CU benchmarking, requires every account to be declared explicitly, and mollusk-svm-programs-token supplies the Token, Token-2022, and ATA programs for token tests. LiteSVM supports multi-language tests.
    • Bankrun / solana-program-test: in-process bank with time warping and account injection (JS or Rust).
    • anchor test: spins up solana-test-validator; slower; good for integration and client flows.
    • Trident (fuzzing framework for Anchor): stateful, instruction-sequence fuzzing with invariant checks.
    • solana-test-validator --clone <ACCOUNT> --url <rpc> (and --clone-upgradeable-program): bring real mainnet accounts (oracles, pools, mints) into a local test; pin the slot/time by snapshotting once and committing fixtures.
    1. Happy path + state assertions: after each instruction, assert the full state delta (balances, counters, authorities), not just "no error".

    2. Negative/adversarial account tests (mandatory per instruction):

      • wrong signer / missing signer
      • wrong owner program on state, oracle, token accounts
      • wrong account type with same layout (cosplay)
      • substituted PDA (wrong seeds/bump), non-canonical bump
      • duplicate accounts passed in two slots
      • fake program in place of token/system/own program (CPI target)
      • mismatched mint/authority on token accounts
      • uninitialized, already-initialized, and closed accounts
      • spoofed sysvar accounts
      • remaining_accounts with malicious entries Each must fail with the expected error code (assert the specific error, not just failure).
    3. Boundary & arithmetic: zero, 1, max u64, decimals mix, rounding-direction checks, overflow behavior with release flags (cargo build-sbf uses release: test the built .so, not just debug unit tests).

    4. Time & slot: warp clock for funding, vesting, staleness windows; test at exact boundaries.

    5. Property/stateful fuzz: generate random instruction sequences over a small actor set (users, keepers, admin) with random amounts and price moves; assert invariants after each step: conservation of tokens (Σ vault = Σ user claims + fees), no negative equity paths, authority never changes unexpectedly, health monotonic under non-risk actions, no instruction succeeds that should fail by spec.

    6. Differential tests: compare on-chain fixed-point math with a Python/mpmath reference over dense grids and extremes.

    7. Compute regression: record CU per instruction at worst-case sizes and fail CI on >X% increase.

    8. Write invariants and the attacker-account matrix before code review ends; each suspected finding becomes a failing test.

    9. Run happy + negative suites on every commit (seconds with LiteSVM).

    10. Nightly: fuzz with fixed seeds recorded; persist crashing sequences as regression tests.

    11. Mutation check: break the program deliberately (remove a has_one, flip a comparison, remove a signer check); the suite must go red. Unkilled mutants are missing tests.

    12. Test with Token-2022 mints and transfer-fee/hook extensions if you accept arbitrary mints (see spl-token-2022-security).

    13. Test upgrade paths: old-layout account + new program version (migration/versioning).

    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

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 13 days ago

    • Free with an Agensi account

    Software
    Rust
    Optional
    Anchor
    LiteSVM
    orMollusk

    Permissions

    No special permissions declared or detected

    Listed13 days ago

    What's inside

    Frequently Asked Questions

    LiteSVM/Mollusk/Trident testing for Solana: wrong-account attack matrix, invariants, mutation checks.

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use solana-testing-fuzzing on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in Security

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

    Free