For tokens still on the PumpFun bonding curve (not graduated to PumpSwap). Configure the wallet via PRIVATE_KEY or private_key in config/*/solana.yaml.
中文 | English | Repository overview
Note: After the token graduates to PumpSwap, use
pumpswap_trade/pumpswap_trade_with_safekey.
- When to use · Features · Installation · Configuration · Run · Build
- Comparison with PumpSwap example
Use pumpfun_trade |
Use pumpswap_trade instead |
|---|---|
| Token is still on the PumpFun bonding curve | Token has graduated to PumpSwap |
PumpFunParams::from_mint_by_rpc succeeds |
You need a pool address for PumpSwap |
If you pass a graduated mint here, the program fails while resolving the bonding curve.
- Protocol:
DexType::PumpFunwithPumpFunParams::from_mint_by_rpc; params are fetched again before sell socreator_vaultand curve state stay fresh. - Flow: Buy → wait ~30s → sell the wallet’s full balance of that mint; 1 round by default (edit
ROUNDS,REST_SECSinsrc/run.rs). - Multi-SWQoS, durable nonce (required when 2+ SWQoS are enabled), trading.yaml for slippage/Gas—same ideas as
pumpswap_trade. - Nonce placeholders: empty strings in
nonce_configlists are ignored soNONCE_ACCOUNTcan still apply.
git clone https://github.com/0xfnzero/fnzero-examples.git
cd fnzero-examples/pumpfun_tradeInstall Rust/Cargo: https://rustup.rs
Before first run, create local files from templates (do not commit; see repo root README.md “Before you run & privacy”):
cp .env.example .env
cp config/dev/solana.yaml.example config/dev/solana.yaml
cp config/dev/trading.yaml.example config/dev/trading.yaml
# For prod, copy config/prod/*.example as wellThen edit .env and YAML: PRIVATE_KEY, RPC, SWQoS tokens, nonce_config, etc. Trading params are in trading.yaml.
For more wallet/SWQoS detail, see pumpswap_trade/README.md (protocol/mint requirements differ).
./run.sh <MINT_ADDRESS>
# or
cargo run --release -- <MINT_ADDRESS>APP_ENV=dev|prod selects config/dev vs config/prod.
.cargo/config.toml writes artifacts to build-cache/release/.
cargo build --release
./build-cache/release/pumpfun_trade <MINT_ADDRESS>Linux bundle:
./build-linux-release.shpumpfun_trade |
pumpswap_trade |
|
|---|---|---|
| DEX | PumpFun (curve) | PumpSwap (outer AMM) |
| Pool | Derived from mint / curve | find_pool_by_mint |
| Mint | Not graduated | Listed on outer pool |
Encrypted-keystore variant: pumpfun_trade_with_safekey/README.md.
MIT License
- Website: https://fnzero.dev/
- Repository: https://github.com/0xfnzero/fnzero-examples