swap_v2
Whirlpool program
What this page showsOne instruction (an action a wallet lists) of Whirlpool program: whether the code that runs it is the code an audit reviewed, why, and the recorded transactions that called it.
Verdict
Partial
Some evidence exists, but one required link is missing, for example the live source is only claimed by a provider or the report names no files.
Checked against the snapshot at slot 471,652,486
Instruction decoded
Established
The instruction bytes match one entry in a pinned IDL or schema, with no collision.
Live code rebuilt by POA
Not established
POA rebuilt a source commit and its hash equals the on-chain executable.
Report names the handler file
Not established
A published audit report's scope covers the file that implements this instruction.
Reviewed commit printed
Not established
That report prints the scope and the exact commit it reviewed.
Reviewed code is the live code
Not established
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
- Program snapshot at slot 471652486: executable, RPC agree, hash 75d0cbf14e39….
- Decoded by anchor-idl-discriminator 2b04ed0b1ac91e62.
- Handler programs/whirlpool/src/instructions/v2/swap.rs#L68 (crate::instructions::v2::swap::handler).
- No report with directly extracted scope names a path covering the handler file.
- Live source not independently established (POA build state: reproduced_mismatch). A provider or docs claim does not count.
What would be needed for a stronger verdict
- A report whose printed scope paths cover the handler file.
- A POA reproducible build whose hash equals the current executable hash.
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
- No
- Live source equals reviewed
- Not established
- Handler changed since review
- Not established
- Program crate changed since review
- Not established
- Program immutable
- No
- Evidence fresh
- Yes
Discriminator and decoding
- Discriminator
- 2b04ed0b1ac91e62
- Method
- Anchor IDL discriminator
- IDL SHA-256
- f3e95ddf321d24b71ce56f5ba842055899f32a1feee3be9f0d3ccf2bd6a55bb8
- Collisions
- None
Arguments
| Name | Type |
|---|---|
| amount | u64 |
| other_amount_threshold | u64 |
| sqrt_price_limit | u128 |
| amount_specified_is_input | bool |
| a_to_b | bool |
| remaining_accounts_info | option<RemainingAccountsInfo> |
Accounts
Signer and writable flags from the interface definition.
| Account | Flags | Fixed address | Notes |
|---|---|---|---|
| token_program_a | Read-only | ||
| token_program_b | Read-only | ||
| memo_program | Read-only | MemoSq…GmfcHr MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr (opens Solana Explorer in a new tab) | |
| token_authority | Signer | ||
| whirlpool | Writable | ||
| token_mint_a | Read-only | ||
| token_mint_b | Read-only | ||
| token_owner_account_a | Writable | ||
| token_vault_a | Writable | ||
| token_owner_account_b | Writable | ||
| token_vault_b | Writable | ||
| tick_array_0 | Writable | ||
| tick_array_1 | Writable | ||
| tick_array_2 | Writable | ||
| oracle | Writable |
Handler source
- Function
- crate::instructions::v2::swap::handler
- File
- programs/whirlpool/src/instructions/v2/swap.rs · lines 68–203
- At commit
- 5207a03c7643e9c860fa902737a7be4b115060f7
- Mapping
- Anchor program module
Related files
- programs/whirlpool/src/manager/swap_manager.rs (opens in a new tab)
- programs/whirlpool/src/state/oracle.rs (opens in a new tab)
- programs/whirlpool/src/state/whirlpool.rs (opens in a new tab)
- programs/whirlpool/src/util/shared.rs (opens in a new tab)
- programs/whirlpool/src/util/sparse_swap.rs (opens in a new tab)
- programs/whirlpool/src/util/v2/remaining_accounts_utils.rs (opens in a new tab)
- programs/whirlpool/src/util/v2/swap_utils.rs (opens in a new tab)
- programs/whirlpool/src/util/v2/token.rs (opens in a new tab)
Audit relations
How each report relates to this instruction's handler file.
Changed files since review
Files changed between the reviewed commit and the live source, as recorded.
No changed file is recorded for this instruction.
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 5207a03
- Signer
- InstructionPartial
- StaticPartial
- StaticPartial
- StaticPartial
- StaticPartial
- StaticPartial
- StaticPartial
- StaticPartial
- StaticPartial
- StaticPartial
- InferredUnknown
- InferredUnknown
- InferredUnknown
- InferredUnknown
Observed in transaction 25jAyyhZun… at slot 471,510,199
- Signer
- InstructionUnknown
- InstructionUnknown
- InstructionPartial
- ObservedUnknown
- ObservedUnknown
Current deployment predates this transaction. Deployment slot 457,152,296, transaction slot 471,510,199, snapshot slot 471,652,486.
Observed in transaction 2JdahQpUmR… at slot 471,513,231
- Signer
- InstructionUnknown
- InstructionUnknown
- InstructionUnknown
- InstructionPartial
- ObservedUnknown
- ObservedUnknown
- InstructionPartial
- ObservedUnknown
- ObservedUnknown
- InstructionPartial
- ObservedUnknown
- ObservedUnknown
- InstructionPartial
- ObservedUnknown
- ObservedUnknown
- InstructionPartial
- ObservedUnknown
- ObservedUnknown
- InstructionPartial
- ObservedUnknown
- ObservedUnknown
- InstructionPartial
- ObservedUnknown
- ObservedUnknown
- InstructionUnknown
Current deployment predates this transaction. Deployment slot 457,152,296, transaction slot 471,513,231, snapshot slot 471,652,486.
Transactions
Each curated transaction that calls this instruction, with what is known about the code that ran.
01
Transaction at slot 471,510,199
Current deployment predates this transaction. Deployment slot 457,152,296, transaction slot 471,510,199, snapshot slot 471,652,486.
- Signature
- 25jAyyhZunU8Zx1PbXZCe18PbVAi4FopWHqgCXk4mDCkP4uknsqaHZWykEnYjZSKgwgpZMAvHE6fXQWvFAaVEDb4
- Slot
- 471,510,199
- Block time
- 2026-11-19 22:54 UTC
- Status
- Succeeded
- Fee
- 5,000 lamports
- Compute units
- 36,887
- Message version
- 1
- RPC response SHA-256
- e1f0e80cd850d839a366e93c0d60af105fd70dc8630399dc6b86e391db7f8b78
02
Transaction at slot 471,513,231
Current deployment predates this transaction. Deployment slot 457,152,296, transaction slot 471,513,231, snapshot slot 471,652,486.
- Signature
- 2JdahQpUmRZUdE4xfBi4AaAAgbZwzjuzwioyqd4t5NPd8MLNe832xt2XY63SQaNg1fRry9WLKUiJB4sHbi2gfdto
- Slot
- 471,513,231
- Block time
- 2026-11-19 23:05 UTC
- Status
- Succeeded
- Fee
- 5,400 lamports
- Compute units
- 145,592
- Message version
- 0
- RPC response SHA-256
- 05269c97958039d1237afe36b143abb3bbb8afcb32ff22b362dc820c89de07c4