In short, the site watches one wallet: the one pump.fun pays the coin's creator fees to. Each time I claim fees, it shows up as a public transaction, and the site records how much was claimed and when. I then log the gifts I've sent on TikTok LIVE, and the site does the accounting. It can read the chain but never move anything, so there's nothing here worth breaking into.
Every buy or sell pays a small creator fee. pump.fun holds it in two vaults tied to the creator wallet.
// vaultAddresses() works out both vault addresses from the wallet aloneClaiming happens on pump.fun like normal. The site reads the wallet's transactions and records each claim, with no typing on my part.
// vaultOutflow() compares each vault's balance before and after a transactionEvery 15 minutes the spotlight moves to the next approved account in the queue. You can see who it is, and a countdown, on the main page.
// currentPick() uses the clock, not a cron job, so everyone sees the same pickGalaxies and other gifts go to the featured account's latest video, or to their live stream. Each one is logged with a screenshot or clip.
// the log refuses any gift that costs more than what's left on its claimThe main page adds it all up: fees earned, claimed, spent on gifts, and what's left. Every claim links to its transaction.
// summarize(): unspent = claimed − spentPress the button to walk through it one stage at a time.
Short excerpts from the real code, not the full files. Feel free to skip them if code isn't your thing.
export function vaultAddresses(creator: PublicKey) {
const solVault = creatorVaultPda(creator); // Pump program, seeds ["creator-vault", creator], native SOL
const [ammAuthority] = PublicKey.findProgramAddressSync([Buffer.from("creator_vault"), creator.toBuffer()], PUMP_AMM);
const wsolVault = getAssociatedTokenAddressSync(NATIVE_MINT, ammAuthority, true, TOKEN_PROGRAM_ID); // PumpSwap, WSOL
return { solVault, wsolVault };
}pump.fun doesn't send creator fees straight to my wallet. They collect in two "vaults" tied to it: one for while the coin is on the bonding curve, and one for after it moves to PumpSwap.
Both vault addresses can be worked out from my wallet address alone, with no lookup needed. Everything after this step is about watching those two accounts.
for (let page = 0; page < maxPages; page++) {
const batch = await c.getSignaturesForAddress(creator, { limit: 1000, before, until: until ?? undefined });
sigs.push(...batch);
if (batch.length < 1000) break;
before = batch[batch.length - 1].signature;
}
const ordered = sigs.filter((s) => !s.err).reverse(); // oldest firstNext it asks a Solana RPC node for the creator wallet's transaction IDs, 1,000 at a time, newest first. until is a bookmark: the last transaction it already checked, so it only fetches what's new.
Failed transactions are skipped, and the rest are fetched in full, 20 at a time. If the free RPC plan asks it to slow down, it pauses briefly and tries again. Getting this part right took a while.
let sol = 0n;
const i = tx.accountKeys.indexOf(vaults.solVault);
if (i >= 0) {
const d = BigInt(tx.preBalances[i] ?? 0) - BigInt(tx.postBalances[i] ?? 0);
if (d > 0n) sol = d;
}This is the core idea. Every Solana transaction records each account's balance before and after it runs. If a vault's balance went down, that's a claim, and the difference is the amount.
Increases (from trading) are ignored. The PumpSwap vault gets the same check. Amounts are kept in lamports, the smallest unit of SOL, so nothing is lost to rounding.
for (const c of claims) {
const price = await solUsdOn(c.blockTime.toISOString().slice(0, 10));
const rows = await db
.insert(schema.claims)
.values({ signature: c.signature, blockTime: c.blockTime, lamports: c.lamports, solUsd: price ? String(price) : null })
.onConflictDoNothing({ target: schema.claims.signature })
.returning({ id: schema.claims.id });
added += rows.length;
}
if (newest) await setState("cursor", newest);Each claim is saved along with that day's SOL price. If the same claim turns up twice, the second copy is quietly ignored, so there are never duplicates.
The bookmark then moves forward. All of this runs on its own when someone opens the site (at most once a minute), or when I press Sync.
const alloc = allocate(claims, gifts).find((a) => a.id === claimId);
if (!fitsClaim(alloc, lamports)) {
return { error: alloc ? `This gift is ${sol(lamports)} SOL but only ${sol(alloc.remaining)} SOL is left on that claim.` : "Pick the claim that paid for this gift." };
}This is the one part the chain can't see. I buy TikTok coins and send each gift during the stream myself, then fill in a short form: the streamer, the gift (a Rose, a Galaxy, whatever it was), the cost, and a link to the proof.
The cost is converted to SOL at that day's price. The site won't accept a gift worth more than what's left on its claim, which keeps the accounts consistent.
const claimed = claims.reduce((a, c) => a + c.lamports, 0n);
const spent = gifts.reduce((a, g) => a + g.lamports, 0n);
const giftUsdCents = gifts.reduce((a, g) => a + g.usdCents, 0);
return {
earned: claimed + unclaimed,
claimed,
unclaimed,
spent,
unspent: claimed > spent ? claimed - spent : 0n,
giftUsdCents,
overspent: spent > claimed,
};From here it's simple addition. Claimed is the sum of all claims, spent is the sum of all gifts, and unspent is the difference. Unclaimed is whatever is still sitting in the vaults.
If gifts ever add up to more than was claimed, the site says so on the front page rather than hiding it.
I could have simply written “claimed X SOL” somewhere, but then you'd be relying on my word. The balances are recorded by the network itself, so nobody can alter them, myself included.
The site holds no wallet keys, so even if someone broke in, there'd be nothing to take. I claim fees on pump.fun as usual, and the site simply picks them up.