Index of every page on this site: llms.txt
All skills
princedotrs avatar

/solana-program-audit

@586e19e
Run it yourself

Security audit of Solana on-chain programs in Rust: Anchor, native solana-program and Pinocchio. Use to audit or review a Solana program, PR or fix and to find vulnerabilities: missing signer or owner checks, account validation, type cosplay, reinitialization, init front-running, closed-account revival, duplicate accounts, PDA seeds and bumps, arbitrary CPI, CPI return data, remaining_accounts, sysvar and instruction introspection, overflow, rounding, Token-2022 extensions and transfer hooks, oracle, flash-loan and MEV attacks, upgrade authority and governance. Covers DeFi reviews (AMM, lending, perps, staking, bridges, launchpads), PoC exploits, fix patches, re-audits, spec compliance, audit readiness, release gates and audit reports. Trigger on code using anchor_lang, solana_program, pinocchio, #[program], #[derive(Accounts)] or entrypoint!. Not for writing features, off-chain clients or backends, EVM/Solidity, or incident response.

  • 237 files
  • 2 MB
  • Updated 4 weeks ago
  • GitHub
Use this Skill: https://skilld.dev/gh/princedotrs/solana-audit/solana-program-audit

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

known-vectors030-infinite-mint-uncapped-supply.md

≈518 tokens on demand. Your agent reads this file only when SKILL.md points to it.

30 — Infinite Mint / Uncapped Supply

Severity: 10 | Real: Cover Protocol ($4.4M, 2020), Paid Network ($27M, 2021)

Exploit allows minting unlimited tokens — attacker dumps on market, drains all liquidity.

Verification Procedure

Step 1: Find all mint operations

grep -rn --include="*.rs" "mint_to\|MintTo\|token::mint_to" programs/ | grep -v test
  • Record: Every mint instruction with context

Step 2: Verify every mint has correct authorization

# For each mint_to: who is the mint authority?
grep -rn --include="*.rs" -B10 "mint_to\|MintTo" programs/*/src/instructions/
  • ✅ PASS: Mint authority is PDA (only program can mint) with correct seeds verified
  • ❌ FAIL: Mint authority is a user-controlled account

Step 3: Verify mint amount is proportional

# For each mint: is the amount calculated correctly?
# shares_to_mint = (deposit_amount * total_shares) / total_assets
# NOT: shares_to_mint = arbitrary_user_input
  • ✅ PASS: Mint amount derived from verified formula, not user input
  • ❌ FAIL: User can influence mint amount directly

Step 4: Check for supply cap or max mint per tx

grep -rn --include="*.rs" -iE "max_supply\|supply_cap\|max_mint\|MAX_SUPPLY" programs/
  • ✅ PASS: Supply cap exists OR minting is strictly proportional to deposits (self-limiting)
  • ❌ FAIL: No supply limit AND mint amount can be manipulated

Step 5: Verify mint event emission

grep -rn --include="*.rs" "emit!" programs/*/src/instructions/ | grep -iE "mint\|share\|deposit"
  • ✅ PASS: Every mint emits an event (off-chain monitoring can detect anomalies)
  • ⚠️ PARTIAL: Mint works but no event emitted (silent — hard to detect abuse)

Overall verdict:

  • ✅: PDA mint authority, proportional formula, supply cap or self-limiting, events
  • ⚠️: Correct formula but missing events or supply cap
  • ❌: Arbitrary mint amounts possible or weak authority check

Backend / API Hacks (31-55)

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 586e19e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 4 weeks ago

README badge

README badge for princedotrs/solana-audit