//01 Reverse engineered

pump.fun's donation relay,read line by line.

From lalalune/pumpfun-source, a community reconstruction of pump.fun's on-chain programs. Its own lib.rs opens with: whole captured-byte identity remains unproven. We read it, then rebuilt the mechanic on Raydium LaunchLab. Not pump.fun, not their code, not affiliated.

pump.fun instruction / fieldOn pump.funHere, on Raydium
  1. 01donate_v1(amount, config_id, tip_bps, message, credited_to)lib.rs ↗

    Moves amount of a token from the donor into a debouncer account kept per config_id and mint, then emits DonationMadeV1Event. Nothing reaches anyone yet.

    donate(): your SOL buys the coin on its LaunchLab curve and the tokens go straight into the recipient's token account, in the same transaction.

  2. Wraps your SOL into a temporary WSOL account (seed donate_native_wsol_tmp_v1), donates it, closes the temp account back to you.

    Wraps into your WSOL account, buys, closes it back to you so the unspent SOL returns.

  3. 03message · check_messagetools/donate/shared.rs ↗

    A string under 256 bytes, carried in the event.

    An SPL Memo signed by you, up to 140 bytes: what fits next to the buy in one transaction.

  4. 04tip_bps · check_bpstools/donate/shared.rs ↗

    tip = gross × tip_bps / 10000, at most 10000. Recorded in the event; the instruction itself moves no tip.

    That share of your SOL goes to the recipient as plain SOL, in the same transaction. The rest buys the coin.

  5. A pubkey written into DonationMadeV1Event.

    The wallet whose token account receives the coin.

  6. PDAs (epoch_tracker_v1, debouncer_v1) where donations pile up until close_donation_epoch_v1 moves the pot. Relayer only.

    Nothing is held. There is no account between donor and recipient.

  7. Relayer only: swaps the closed epoch through Jupiter into the settlement mint (USDC, EPjF…Dt1v), pays shares that sum to 10000 bps, burns what is left.

    The swap is LaunchLab's buy_exact_in on the coin's own curve, output account = the recipient's. One recipient, all of it.

  8. 08just_swap_v1 · distribute_after_just_swapping_v1instructions/v1/relayer_only/distribute/just_swap.rs ↗

    The same in two steps, with a swap receipt in between.

    One step.

  9. 09DonationMadeV1Eventevents/v1/donation_made.rs ↗

    config_id, mint, epoch, gross_amount, tip, message, credited_to

    The donation wall reads each transaction that carries this pad's reference key: memo, donor, recipient, SOL in, tokens delivered. Straight from the chain, no indexer.

  10. 10mint_whitelist · MintNotSafeForDonationtools/donate/shared.rs ↗

    Only SOL, WSOL, whitelisted or “safe” mints can be donated.

    Any coin on Raydium LaunchLab's SOL curve. Graduated coins get plain SOL.

  11. 11check_relayerlib.rs ↗

    Every settlement instruction refuses any signer but the relayer key RLYR…oQUc.

    No privileged signer. Your wallet is the only one.

//02 Charity coins

pump.fun feature / programOn pump.funHere, on Raydium
  1. 01Charity Coins · Share creator rewardspump.fun/docs/charitycoins ↗

    On pump.fun/create the creator routes creator fees to up to 5 verified charities from Donate.gg, for coins paired with SOL or USDC.

    Launching is gated on it: pick 1 to 5 of 2,145 Donate.gg charities, with a % split that sums to 100. The choice is frozen in the coin's Arweave metadata as extensions.charities (name, EIN, wallet, config id, bps).

  2. 02fee sharing config · Pump Fees Programdocs.donate.gg/api/charity-coins ↗

    pump.fun's fee program (pfee…VZ, which donate.gg lists as the "Pump Fees Program" donation source) holds the sharing config and pays the charity share into donate.gg's relay as WSOL.

    LaunchLab keeps creator fees in one vault per creator wallet. Send fees to charity on the coin page claims it (claim_creator_fee) and pays the relay in the same transaction, split the coin's way.

  3. 03donate_pubkey_config_id_v1 · RLAY…RZudocs.donate.gg/blockchain/solana-svm ↗

    donate.gg's Donation Relay: the donation lands in the debouncer for (config_id, mint); its relayer later swaps to USDC and pays the charity's donate.gg wallet, minus donate.gg's fee.

    The same instruction, called from the creator's own transaction with each charity's config id, so donate.gg counts it and settles it the way it settles pump.fun's. Anyone can also send a coin's charities SOL from /donate or the coin page.

  4. 04isCharity · charity feedpump.fun/docs/charitycoins ↗

    pump.fun's coin API flags isCharity and lists charity coins in their own screener feed.

    The board's Charity tab: coins launched here whose metadata names charities, each with the SOL sent to them, read from the chain by the pad's reference key.

//03 What runs where

Raydium's program

LaunchLab enforces the curve price, the minimum tokens out, graduation at 85 SOL and the fees: reading from chain…

Your signed transaction

Opens the recipient's token account if it is missing, wraps your SOL, buys with their account as the output, returns your change, pays the tip, writes the memo. All of it lands or none of it does.

Nobody's button

No epoch, no relayer, nothing waiting for a later transaction. The message and the tip split are what you signed; no program checks them. The pad's tag is one read-only key in the transaction, so the wall can find it.