Auditor DogSubmit a repository
Security audit report

stabbleorg/clmm

commit 84a9c5c · claude-opus-4-5 · corpus auditor-skill@4.3 · 2026-06-20 00:00 UTC

0
Critical
0
High
1
Medium
3
Low
2
Info

Provenance

Visibility
public
Highest severity
6 / 10
Report sha256
caad38337e54203dc83d5ecbfb2cd45ce7c3b204f34916acd30c2c8e9f960655
Usage
0 in · 0 out · 0 cached · $0.00
Source file
frcd10/auditor-attest./reports/…
README badge
[![audit](https://auditor-attest.vercel.app      (troque pelo domínio que a Vercel te der)/badge/stabbleorg/clmm.svg)](https://auditor-attest.vercel.app      (troque pelo domínio que a Vercel te der)/r/stabbleorg/clmm)

On-chain attestation · Solana devnet

Transaction
37xnijvF5Q7mH5fAD4uhxRH4YAdHGh27M5VS4CMaJzdrpkpDRhRxYFhPGYwppJkRbuFHAciabzD13YiX6HkJexcm
Account
61vykGZBiKKnFAEQrPrBdxz2QFEL7CD32kDkNho9eAbz
Attester
4ZwnFVFENrXwLjdxz8g835TSQq4J8cVByH45vXPDenQf
Program
sXtvdoheTtFBukx8vCppJHhiiJHW2xa3xc5KaPAhzkC

Verify without us: the account address is the PDA of sha256(lowercased repo url) + the commit bytes under the program; its data holds the report sha256 above.

Security Audit Report — Stabble CLMM

FieldValue
RepositoryStabble (Stabble/clmm) — concentrated-liquidity AMM (Raydium CLMM V3 fork)
Scopeprograms/clmm (PROGRAM scope, on-chain Rust/Anchor)
Audit typeAI-assisted first-pass security review
Date2026-06-20
AuditorAutomated security review agent (Claude)

1. Executive Summary

programs/clmm is a concentrated-liquidity AMM forked from Raydium CLMM V3, with Stabble-specific additions (e.g. a solvency auto-freeze and a superstate/allowlisted-mint concept). Core math (sqrt-price, liquidity, fee and reward accounting), position ownership (NFT-based), tick-array/bitmap handling, and fee-collection authority all validate correctly and follow the upstream Raydium design with bounded checked_* arithmetic and CEI ordering.

The most material issue is that the Token-2022 mint allowlist gate (is_supported_mint) is commented out on the permissionless pool-creation path, so pools can be created over arbitrary Token-2022 mints — including ones carrying PermanentDelegate / TransferHook extensions — re-introducing a malicious-token rug risk for LPs who opt into such pools. The same check is still enforced for reward tokens. No CRITICAL/HIGH issue, no permissionless drain, missing-signer, or owner-substitution bug was found.

Repository Risk Score: 6 / 10 (Medium)

Severity Distribution (Confirmed Findings Only)

SeverityCount
Critical (9-10)0
High (7-8)0
Medium (4-6)1
Low (1-3)3
Informational (1-2)2
Total6

2. Confirmed Findings

ST-01 — Token-2022 mint allowlist gate commented out on pool creation

SeverityMedium (6 / 10)
CategoryAccount validation / malicious token
Locationcreate_pool.rs:132-138

is_supported_mint is commented out, so permissionless pool creation accepts arbitrary Token-2022 mints, including non-allowlisted PermanentDelegate / TransferHook mints. This re-introduces a malicious-token rug risk for LPs who opt into such pools. The check still exists and is enforced for reward tokens (initialize_reward.rs:104).

Recommendation: Re-enable is_supported_mint on the pool-creation path (or explicitly reject PermanentDelegate/TransferHook extensions).

ST-02 — Admin-triggerable panic / unvalidated non-signer new owner

SeverityLow (4 / 10)
CategoryAccess control / arithmetic safety
Locationupdate_amm_config (params 3/4), transfer_reward_owner

Admin paths can panic on certain param values, and a new owner is accepted without a signer check.

Recommendation: Validate param ranges with explicit errors; require the new owner to sign (or use two-step transfer).

ST-03 — require_gte!(255, status) is a no-op

SeverityLow (3 / 10)
CategoryInput validation
Locationupdate_pool_status

A u8 status is always ≤ 255, so the bound check never rejects anything.

Recommendation: Bound against the actual valid status bitmask.

ST-04 — Fee-rate bounds enforced only in wrapper, not handler

SeverityLow (3 / 10)
CategoryInput validation
Locationcreate_amm_config (bounds in lib.rs wrapper, absent in handler)

Recommendation: Enforce fee-rate bounds in the handler so they hold regardless of call path.

ST-05 — collect_fund_fee emits CollectProtocolFeeEvent

SeverityInfo (2 / 10)
CategoryLogging/observability

Wrong event type emitted; cosmetic/monitoring impact only.

ST-06 — is_superstate_token uses .unwrap() on mint unpack

SeverityInfo (2 / 10)
CategoryArithmetic/robustness

Panic-on-malformed-data instead of a graceful error.


3. Investigated but Not Confirmed

Refuted / by-design (13 areas): position ownership via NFT, vault/output substitution, tick-array/bitmap spoofing, fee-collection owner substitution, sqrt-price/liquidity/fee rounding, reward accounting, NFT/PDA forgery, CEI/reentrancy, swap price-limit/partial-fill handling, bounded unwraps, the Stabble solvency auto-freeze, deprecated protocol_position, and upgrade governance (deploy-time). No CRITICAL/HIGH; no permissionless drain, missing-signer, or owner-substitution bug found.