Skip to content

What this page showsOne instruction (an action a wallet lists) of Raydium CPMM: whether the code that runs it is the code an audit reviewed, why, and the recorded transactions that called it.

Verdict

Changed

The reviewed commit and the live source are both established, and the handler file or a traced related file changed between them.

Checked against the snapshot at slot 472,718,301

The proof chain
  1. Instruction decoded

    Established

    The instruction bytes match one entry in a pinned IDL or schema, with no collision.

  2. Live code rebuilt by POA

    Established

    POA rebuilt a source commit and its hash equals the on-chain executable.

  3. Report names the handler file

    Not established

    A published audit report's scope covers the file that implements this instruction.

  4. Reviewed commit printed

    Not established

    That report prints the scope and the exact commit it reviewed.

  5. Reviewed code is the live code

    Known difference

    The reviewed commit and the rebuilt live commit hold the same program code.

Every link must hold before POA says Matched. A missing link is not a failure, and never an approval.

Reasons

  1. Program snapshot at slot 472718301: executable, RPC agree, hash 7e691824f591….
  2. Decoded by anchor-idl-discriminator afaf6d1f0d989bed.
  3. Handler programs/cp-swap/src/instructions/initialize.rs#L216 (instructions::initialize).
  4. Only partly reviewed per raydium-cpmm-sec3-2025-pr55 (PR55 (support creator fee) diff 7732131 → 0ddfda5 only; findings marked P2 are beyond PR55 and outside the audit scope); these reports give neither MATCHED nor CHANGED for this instruction.
  5. Live source 3d691227 established by POA's independent build.
  6. No report with directly extracted scope names a path covering the handler file.
  7. CHANGED: between raydium-cpmm-madshield-2024's reviewed commit 8f10f251 and live 3d691227 the handler's traced files changed: programs/cp-swap/src/error.rs (M +18 -3), programs/cp-swap/src/instructions/initialize.rs (M +278 -98), programs/cp-swap/src/lib.rs (M +217 -22), programs/cp-swap/src/states/mod.rs (M +14 -2), programs/cp-swap/src/utils/mod.rs (M +2 -0).

What would be needed for a stronger verdict

  1. A report whose printed scope paths cover the handler file.

Checks

Decoded
Yes
Handler located
Yes
Handler in report-named files
No
Review scope established
No
Reviewed commit known
Yes
Live source rebuilt by POA
Yes
Live source equals reviewed
No
Handler changed since review
Yes
Program crate changed since review
Yes
Program immutable
No
Evidence fresh
Yes

Discriminator and decoding

Discriminator
afaf6d1f0d989bed
Method
Anchor IDL discriminator
IDL SHA-256
1202f6dc8e1c3216598f2ad5c620b9aa8c64ac584563fafed68125c27fb6df81
Collisions
None

Arguments

NameType
init_amount_0u64
init_amount_1u64
open_timeu64

Accounts

Signer and writable flags from the interface definition.

AccountFlagsFixed addressNotes
creatorSignerWritableAddress paying to create the pool. Can be anyone
amm_configRead-onlyWhich config the pool belongs to.
authorityRead-onlypool vault and lp mint authority
pool_stateWritablePDA account: seeds = [ POOL_SEED.as_bytes(), amm_config.key().as_ref(), token_0_mint.key().as_ref(), token_1_mint.key().as_ref(), ], Or random account: must be signed by cli
token_0_mintRead-onlyToken_0 mint, the key must smaller than token_1 mint.
token_1_mintRead-onlyToken_1 mint, the key must grater then token_0 mint.
lp_mintWritablepool lp mint
creator_token_0Writablepayer token0 account
creator_token_1Writablecreator token1 account
creator_lp_tokenWritablecreator lp token account
token_0_vaultWritable
token_1_vaultWritable
create_pool_feeWritableDNXgeM…RAdNC8 DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8 (opens Solana Explorer in a new tab)create pool fee account
observation_stateWritablean account to store oracle observations
token_programRead-onlyTokenk…3VQ5DA TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA (opens Solana Explorer in a new tab)Program to create mint account and mint tokens
token_0_programRead-onlySpl token program or token program 2022
token_1_programRead-onlySpl token program or token program 2022
associated_token_programRead-onlyAToken…JA8knL ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL (opens Solana Explorer in a new tab)Program to create an ATA for receiving position NFT
system_programRead-only111111…111111 11111111111111111111111111111111 (opens Solana Explorer in a new tab)To create a new program account
rentRead-onlySysvar…111111 SysvarRent111111111111111111111111111111111 (opens Solana Explorer in a new tab)Sysvar for program account

Handler source

Audit relations

How each report relates to this instruction's handler file.

AuditorRelationReviewed commitScope confidence
Mad ShieldRaydium Constant Product AMM Program Audit Report (raydium-cp-swap v1.0.0) (opens in a new tab)Program covered, no paths named8f10f25Printed in the report
Sec3Security Assessment Report Raydium CP Swap PR55 (opens in a new tab)Program covered, no paths namedf361e34Printed in the report

Changed files since review

Files changed between the reviewed commit and the live source, as recorded.

FileStatusAddedRemoved
programs/cp-swap/src/error.rsmodified183
programs/cp-swap/src/instructions/initialize.rsmodified27898
programs/cp-swap/src/lib.rsmodified21722
programs/cp-swap/src/states/mod.rsmodified142
programs/cp-swap/src/utils/mod.rsmodified20

Call trees

The static tree comes from the handler source. The observed tree comes from a finalized transaction. They are separate evidence and are not merged.

Instruction
The instruction itself, with its own verdict.
Static
A source file read at the handler map's pinned commit.
Observed
A call seen in a finalized mainnet transaction.
Inferred
A call read from the handler source, not observed on chain.

Static, from source at 3d69122

  • Signer
    • InstructionChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • StaticChanged
      • InferredUnknown
      • InferredUnknown
      • InferredUnknown
      • InferredUnknown

No curated transaction calls this instruction.

Transactions

Each curated transaction that calls this instruction, with what is known about the code that ran.

No curated transaction calls this instruction.