Selling Pump.fun Tokens: The Exit Side of a Snipe

Buying a pump.fun launch is half of a sniper bot's trade. The other half โ€” the exit โ€” is where the trade actually becomes profit, and it is the side most bots get wrong. This guide covers how a pump.fun sell actually works on-chain, what changes for mayhem-mode launches, and how to wire the full buy-to-exit loop through one RPC provider.

The Short Answer

A pump.fun sell is a single instruction against the token's bonding curve: you transfer tokens into the curve's associated token account and receive SOL at the curve's live price, minus protocol and creator fees. The instruction requires the seller's token account, the curve state, the fee recipients, and a slippage-guarded minimum SOL output. Standard launches and mayhem-mode launches use different fee recipients and fee-tier schedules, so a sell builder has to resolve both per-mint. End-to-end, the working loop is: detect the launch โ†’ build the buy โ†’ sign and submit โ†’ confirm landing โ†’ build the sell โ†’ sign and submit โ†’ confirm the exit.

How a Pump.fun Sell Works On-Chain

When a token launches on pump.fun, a bonding curve account holds the token's real reserves and virtual reserves. A buy moves SOL into the curve and mints tokens out; a sell reverses it โ€” tokens flow back into the curve's token account and SOL flows to the seller, priced by the constant-product formula over the virtual reserves.

Every sell pays two fees, deducted from the SOL proceeds:

The instruction also carries a minimum SOL output โ€” your slippage guard. The curve program reverts the whole transaction if landing would return less than that minimum, which is what protects a sell from sandwich attacks and price movement between quote and landing.

What Changes for Mayhem-Mode Launches

Mayhem-mode is pump.fun's newer launch format. Three things differ from a standard launch, and each one breaks a naive sell builder:

  1. Token-2022 mints. Mayhem tokens use the Token-2022 program, so the seller's and curve's token accounts are Token-2022 ATAs, and the sell's transfer instruction is TransferChecked with explicit decimals.
  2. A different protocol fee recipient. Mayhem curves route the protocol fee to a dedicated mayhem fee recipient rather than the standard global one. A sell that names the standard recipient fails on-chain with an authorization error.
  3. Fee tiers by market cap. Mayhem sells select protocol and creator fee rates from a tiered schedule based on the launch's market cap at execution time, and the token's supply lives in the mint account rather than the curve constant.

A correct sell builder resolves all three per-mint, at quote time, from live chain state.

The Full Loop: Detect, Buy, Exit

A sniper bot's cycle through one trade:

  1. Detect โ€” subscribe to a real-time launch feed (a Geyser-backed stream, not a polling loop) and decode the mint.
  2. Buy โ€” request an unsigned buy transaction against the live curve state, with the SOL budget and slippage bound. Sign it with your wallet and submit.
  3. Confirm โ€” poll the transaction signature until it's confirmed. Never assume landing; a launch slot is the most contested block space on Solana.
  4. Exit โ€” request an unsigned sell for the tokens now in your wallet's token account, sign, and submit.
  5. Confirm the exit โ€” verify the SOL proceeds landed.

The buy and the sell are the same shape of operation at the RPC level: the provider builds the transaction against live state (curve reserves, fee schedule, your token balance), and your wallet signs and broadcasts it. The provider never takes custody of keys.

Choosing RPC for Both Sides

Most sniper-bot infrastructure comparisons stop at detection latency and landing paths โ€” the buy side. The exit side needs the same properties:

Where Nodius Fits

Nodius pairs a decoded launch-signal firehose with an RPC that builds both sides of the trade โ€” executeSnipe for the buy and executeSell for the exit โ€” against live bonding-curve state, including mayhem-mode launches. Both return unsigned transactions your wallet signs and submits; a funded keypair is the account, with per-call credit billing and no signup step.

Further Reading