Chameleon
Start
OverviewHow it worksQuickstart
Concepts
ConceptsPrivacy model
Reference
The transactionsJavaScript engineAddresses and programs
Practice
Real examplesSelling and exitingSecurity and limitsFAQChangelog
Solana mainnet

The transactions

There is no program to read. What Chameleon sends are ordinary Solana transactions, and this page is their exact shape. The builder lives in core/solana.js.

The buy

One legacy transaction, signed by the stealth address, about 955 bytes, about 135,000 compute units.

#InstructionWhy
0ComputeBudget SetComputeUnitLimit 300,000Room for the curve call.
1ComputeBudget SetComputeUnitPrice 100,000 micro-lamports, plus the marker as a read-only accountA small priority fee, and the hook the scanner uses.
2Memo cham1 <R> <view tag>The announcement.
3Associated Token Account, create idempotent (Token-2022)Where the tokens land.
4pump.fun init_user_volume_accumulatorpump.fun requires it for a wallet that never traded.
5pump.fun buy_exact_sol_in(spendable_sol_in, min_tokens_out)The purchase.

min_tokens_out is the constant-product quote on 98 % of the spend (to leave room for the 1.25 % fees), reduced by your slippage.

Accounts of buy_exact_sol_in

The 16 accounts of the pump.fun IDL, in order: global, fee recipient, mint, bonding curve, the curve's token account, the user's token account, user (signer), system program, token program, creator vault, event authority, pump program, global volume accumulator, user volume accumulator, fee config, fee program. Then two accounts the current program expects after them: the bonding-curve-v2 PDA (["bonding-curve-v2", mint], read-only) and a buyback fee recipient (writable). The fee recipient and the buyback recipient are read from the program's global account, one of seven and one of eight, chosen at random as the official client does. Coins in mayhem mode accept only the program's reserved fee recipients, so those are used for them.

The sell

sell(amount, min_sol_output), 14 accounts followed by the same bonding-curve-v2 and buyback accounts. For coins with cashback enabled, the user volume accumulator goes in as one more writable account before them. Slippage defaults to 15 %.

Moving tokens

Create the destination's token account if needed, TransferChecked the whole balance, and CloseAccount the now-empty stealth token account with the rent refunded to your destination wallet. The stealth address pays the fee from its own leftover SOL.

Returning SOL

A plain system transfer of the balance minus 5,000 lamports for the fee.

Funding amount

The app asks for spend + 3,200,000 lamports. Measured in a mainnet simulation, a fresh address spends about 2,895,000 lamports beyond the spend: roughly 2,040,000 rent for the token account (refunded when the account is closed), the volume account rent, and the fees. The rest comes back with Return SOL.

What an observer sees

signer      <new address, no history>
memo        cham1 <32-byte key> <1 byte>
accounts    ... pump.fun accounts ..., 5HSc6i4h... (marker)

The signer holds the tokens afterwards. Nothing in it points at you.