Skip to content
Back to skills

Collect

ASecurity

Use when the user wants to collect pump.fun creator fees atomically — preventing other holders of a shared/leaked creator key from racing to drain the vault, or sweeping creator+funder wallets along with the vault in a single Jito bundle. Triggers on "collect creator fees", "drain pump vault", "collect-jito", "watch-collect", "consolidate funder + creator + vault", or any pump.fun creator-fee withdrawal.

  • 21 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
blockchaingobashdebuggingsecurity

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned November 11, 2026

npx -y skills add nirholas/atomic --skill collect --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collect?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collect
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nirholas-collect/badge)](https://www.skillsdirectory.com/skills/nirholas-collect)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: atomic-collect
description: Use when the user wants to collect pump.fun creator fees atomically — preventing other holders of a shared/leaked creator key from racing to drain the vault, or sweeping creator+funder wallets along with the vault in a single Jito bundle. Triggers on "collect creator fees", "drain pump vault", "collect-jito", "watch-collect", "consolidate funder + creator + vault", or any pump.fun creator-fee withdrawal.
---

# atomic-collect — pump.fun creator-fee collection

Collects accumulated creator fees from pump.fun's `coinCreatorVault` PDA and immediately moves the SOL to a safe destination, in one atomic tx. Designed for the case where the creator key is shared or leaked: any non-atomic flow leaves a window where another key-holder calls `collectCoinCreatorFee` first.

## Scripts (all in `src/`)

| Script | What it does |
|---|---|
| `collect-jito.js` | One-shot collect: `sweep_creator_fee` for each coin in `MINTS` + `collectCoinCreatorFee` + transfer to `DESTINATION` + Jito tip, all in one tx inside a Jito bundle. Zero window for a competing collector. |
| `watch-collect.js` | Long-running poller. Reads the vault balance every 30 s; runs `collect-jito` when ≥ `MIN_COLLECT_SOL`. |
| `consolidate.js` | One Jito bundle that **drains everything**: vault → safe wallet, creator wallet → safe wallet, funder wallet → safe wallet. Use when retiring a coin or shutting down a leaked key. |

## Setup

Run all commands from the repo root — `package.json` lives there and defines npm scripts (`npm run launch`, `npm run collect`, etc.).

```bash
npm install
cp .env.example .env  # fill in
```

## Flows

**Manual one-shot collect:**

```bash
DESTINATION=<safe-wallet> \
FUNDER_SECRET=<base58> CREATOR_SECRET=<base58> \
MINTS=<mint1>,<mint2> \
JITO_TIP=0.005 \
  npm run collect
```

**Long-running watcher (recommended for leaked keys):**

```bash
DESTINATION=<safe-wallet> \
CREATOR_PUBKEY=<base58-pubkey> \
FUNDER_SECRET=<base58> CREATOR_SECRET=<base58> \
MINTS=<mint1>,<mint2> \
MIN_COLLECT_SOL=0.05 \
  npm run watch
```

`MIN_COLLECT_SOL` should exceed Jito tip + tx fee so each cycle is net-positive. 0.05 is a sane floor; lower it to 0.02 if vault accrual is slow but consistent.

**Full sweep (retire a leaked setup):**

```bash
DESTINATION=<safe-wallet> \
FUNDER_SECRET=<base58> CREATOR_SECRET=<base58> \
MINTS=<mint1>,<mint2> \
JITO_TIP=0.01 \
  npm run consolidate
```

After this, the creator and funder wallets have only rent-exempt minimums. If you also want to extract that, you must close the wallets (delete their accounts), which the script does not do automatically.

## Env vars

- `RPC_URL` — Solana RPC. WS endpoint is not used; HTTP is enough.
- `DESTINATION` — base58 pubkey, the safe wallet receiving funds. **Should not be `CREATOR_PUBKEY` or `FUNDER` pubkey.**
- `CREATOR_PUBKEY` — base58 pubkey, used by `watch-collect.js` to compute the vault PDA without needing the secret to derive it.
- `FUNDER_SECRET`, `CREATOR_SECRET` — both required so the funder pays Jito tip and the creator signs `collectCoinCreatorFee`.
- `MINTS`: comma-separated mints this creator launched (`MINT` works for one). Each coin's waiting creator fee is swept into the vault in the same tx before the collect.
- `JITO_TIP` — SOL, default 0.005.
- `MIN_COLLECT_SOL` — threshold for `watch-collect.js`.

## Gotchas

- **Sweep before collect.** Since the October 2026 Pump upgrade, `buy_v3` / `sell_v3` and PumpSwap `buy_v2` / `sell_v2` leave the creator fee on the coin's curve or pool. The collect does not fail without a sweep; it just leaves those fees behind. Always pass `MINTS` so the scripts add `sweep_creator_fee` first. Pool fees arrive on the creator as wrapped SOL, not lamports.
- **Sweeper bots.** A leaked creator key has other watchers. Any non-atomic flow (collect → wait → transfer) loses the SOL. The Jito bundle pattern here is the only safe option.
- **Vault PDA.** Derived from the coin's mint and creator pubkey. `watch-collect.js` reads `CREATOR_PUBKEY` directly so you can monitor without ever loading the secret if the secret stays on a different host.
- **Jito tip starvation.** If bundles silently fail (`watch-collect` reports zero landings while vault keeps growing), bump `JITO_TIP` first before debugging other failure modes.
- **Same-block contention.** Two atomic collects in the same block from different key-holders will both succeed at the bundle layer but only one will actually land in the slot. Watcher cadence + Jito tip combined are your only edge.

## Security

`DESTINATION` should be a **cold wallet you control alone.** Never set it to an exchange deposit address — exchanges credit on confirmation and a sweeper can still race a non-atomic withdrawal *out* of the exchange if the deposit pubkey is also leaked. The atomicity guarantees of this skill only cover Solana txs, not custodial flows downstream.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in blockchain →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.