burned .../fees ... SOL/bought back ... SOL/status monitoring/burned .../fees ... SOL/bought back ... SOL/status monitoring/
← Back

Documentation

How $BURNPAD works, from launch and fee collection to autonomous buyback & burn.

Overview

What is The Burn Pad?

$BURNPAD is a Solana token with an autonomous agent that manages all creator fees. There is no team wallet and no manual process. Every single fee generated by trading is turned into buyback & burn.

Pre-migration the agent buys $BURNPAD on the bonding curve; post-migration it buys on the PumpSwap AMM. Either way, the freshly-bought tokens are immediately burned on-chain. Supply only goes one direction: down.

Launch

Create your own token

The launch page lets anyone create a Pump.fun token directly from the browser. You connect a wallet, fill in name, symbol, image and an optional dev-buy, and sign one transaction. Metadata is pinned to IPFS, and the mint is created with an optional initial buy in the same transaction. The token's creator is set to a managed agent wallet so fees flow to the burn engine.

launch: createV2AndBuyInstructions
// Launch a new token (v1.36 createV2AndBuyInstructions)
const mint   = Keypair.generate();
const global = await pumpOnline.fetchGlobal();
const solBn  = new BN(Math.floor(devBuySol * 1e9));

const amount = getBuyTokenAmountFromSolAmount({
  global, feeConfig: null, mintSupply: null,
  bondingCurve: null, amount: solBn, quoteMint: NATIVE_MINT,
});

const ix = await pumpOffline.createV2AndBuyInstructions({
  global, mint: mint.publicKey,
  name, symbol, uri,            // uri = uploaded metadata
  creator: user, user,
  amount, solAmount: solBn,
  mayhemMode: false,
});

// user signs in the browser, mint keypair co-signs
await sendTransaction(new Transaction().add(...ix), connection, { signers: [mint] });

SDK setup

Agent initialization

The agent is a TypeScript process built on two official Pump.fun SDKs: pump-sdk (v1.36) for bonding curve operations and pump-swap-sdk (v1.17) for AMM interactions post-migration, plus @solana/spl-token for the burn instruction. It connects to a Solana RPC, loads the agent keypair, and initializes both online (on-chain reads) and offline (instruction building) SDK instances.

src/run.ts: initialization
import { Connection, Keypair, LAMPORTS_PER_SOL, PublicKey } from "@solana/web3.js";
import { TOKEN_2022_PROGRAM_ID, createBurnInstruction } from "@solana/spl-token";
import { OnlinePumpSdk, PumpSdk, getBuyTokenAmountFromSolAmount } from "@pump-fun/pump-sdk";
import { OnlinePumpAmmSdk, PumpAmmSdk, canonicalPumpPoolPda } from "@pump-fun/pump-swap-sdk";
import BN from "bn.js";
import bs58 from "bs58";

const connection   = new Connection(process.env.RPC_URL, "confirmed");
const agent        = Keypair.fromSecretKey(bs58.decode(process.env.AGENT_PRIVATE_KEY));
const mint         = new PublicKey(process.env.MINT_ADDRESS);

const pumpOnline     = new OnlinePumpSdk(connection);
const pumpOffline    = new PumpSdk();
const pumpAmmOnline  = new OnlinePumpAmmSdk(connection);
const pumpAmmOffline = new PumpAmmSdk();

Fee collection

Step 1: Claim creator fees

Every cycle starts by checking the creator fee vault. Pump.fun accumulates trading fees in a vault PDA tied to the token creator. The agent calls getCreatorVaultBalanceBothPrograms to check both the bonding curve vault and the AMM vault in a single call.

If the vault holds more than 0.05 SOL, the agent claims everything. It measures actual SOL received by comparing wallet balance before and after, not the vault estimate.

src/run.ts: claimFees()
// check vault balance across both programs
const lamports = await pumpOnline
  .getCreatorVaultBalanceBothPrograms(agent.publicKey);

if (lamports.toNumber() / LAMPORTS_PER_SOL < 0.05) return; // wait

// claim all accumulated creator fees
const solBefore = await connection.getBalance(agent.publicKey);

const claimIx = await pumpOnline
  .collectCoinCreatorFeeInstructions(agent.publicKey, agent.publicKey);

await sendAndConfirm(connection, new Transaction().add(...claimIx), agent);

const solAfter = await connection.getBalance(agent.publicKey);
const claimed  = (solAfter - solBefore) / LAMPORTS_PER_SOL;

Buyback

Step 2: Buy the token

With the claimed SOL, the agent buys $BURNPAD. While the token is on the bonding curve, it buys directly through the Pump.fun bonding curve program. In v1.36, getBuyTokenAmountFromSolAmount requires the quoteMint (WSOL) and computes the output using the constant-product formula adjusted for protocol and creator fees.

src/run.ts: doBuyback()
// fetch on-chain bonding curve state
const global = await pumpOnline.fetchGlobal();
const { bondingCurveAccountInfo, bondingCurve, associatedUserAccountInfo } =
  await pumpOnline.fetchBuyState(mint, agent.publicKey, TOKEN_2022_PROGRAM_ID);

// calculate how many tokens we get for our SOL (v1.36, quoteMint required)
const solBn  = new BN(Math.floor(solAmount * 1e9));
const amount = getBuyTokenAmountFromSolAmount({
  global,
  feeConfig: null,
  mintSupply: bondingCurve.tokenTotalSupply,
  bondingCurve,
  amount: solBn,
  quoteMint: NATIVE_MINT,
});

// execute buy through bonding curve program (pre-migration)
const buyIx = await pumpOffline.buyInstructions({
  global, bondingCurveAccountInfo, bondingCurve, associatedUserAccountInfo,
  mint, user: agent.publicKey, solAmount: solBn, amount,
  slippage: 2, tokenProgram: TOKEN_2022_PROGRAM_ID,
});

await sendAndConfirm(connection, new Transaction().add(...buyIx), agent);

Once the token migrates to PumpSwap AMM, the buy happens through the AMM instead. The strategy is otherwise identical: buy now, burn next.

src/run.ts: doAmmBuy()
// Post-migration: buy on the AMM, then burn (no LP, supply only shrinks)
const poolKey   = canonicalPumpPoolPda(mint);
const swapState = await pumpAmmOnline.swapSolanaState(poolKey, agent.publicKey);
const buyIx     = await pumpAmmOffline.buyQuoteInput(swapState, solBn, 5);
await sendAndConfirm(connection, new Transaction().add(...buyIx), agent);

await new Promise(r => setTimeout(r, 4000));

// then burn the whole token balance (see "Burn" section)
await burnAll(mint);

Burn

Step 3: Burn everything

After every buy, the agent burns 100% of the tokens it just received. The burn is a standard SPL Token-2022 burn instruction executed by the agent (which owns its associated token account). Once burned, the tokens are permanently removed from circulating supply. There is no way to recover them.

src/run.ts: burnAll()
// After buying, the agent holds the freshly-bought tokens in its ATA.
// Burn 100% of them. Straight to zero, permanently off the supply.
const ata = getAgentTokenAta(agent.publicKey, mint);
const balance = await getTokenBalance(connection, ata); // bigint

if (balance > 0n) {
  const burnIx = createBurnInstruction(
    ata,                    // token account to burn from
    mint,                   // mint
    agent.publicKey,        // owner / authority
    balance,                // burn everything
    [],
    TOKEN_2022_PROGRAM_ID,
  );

  const sig = await sendAndConfirm(connection, new Transaction().add(burnIx), agent);
  console.log(`Burned ${balance} tokens, tx: ${sig}`);
}

The loop

Agent cycle

The agent runs an infinite loop. Each iteration: check vault, claim if possible, detect migration status, buy through the right venue, burn the tokens, log results, wait. Default cycle interval is 60 seconds. The agent always keeps 0.02 SOL in the wallet as a reserve for transaction fees.

src/run.ts: main loop
while (true) {
  const vault = await checkVaultBalance();
  if (vault < 0.05) { await sleep(60_000); continue; }

  await claimFees();
  const migrated = await isTokenMigrated();

  if (!migrated) await doBuyback(claimed);  // bonding curve buy
  else           await doAmmBuy(claimed);    // AMM buy

  await burnAll();                           // torch every bought token
  await logCycle();                          // save to supabase
  await sleep(60_000);
}

Architecture

Data flow

Solana blockchain: the agent interacts directly with Pump.fun's on-chain programs. The bonding curve program (6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P) and the PumpSwap AMM program (PSwapMdSai8tjrEXcxFeQth87xC4rRsa4VA5mhGhXkP), plus the SPL Token-2022 program for burns.

Supabase stores cumulative stats, the activity feed, and the latest agent thought. The website fetches data from Supabase and displays it read-only. Only the anon key is exposed to the frontend.