mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-11-02 06:16:10 +00:00
letsbonk.fun and StonkFun now share one LaunchLab implementation that prices from real reserves, trades any quote mint, spends exactly the buy amount, and accounts for the curve fee and Token-2022 transfer fees. Cleanup harvests withheld fees before closing an account. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
137 lines
6.5 KiB
YAML
137 lines
6.5 KiB
YAML
# Shreds mode: reads transactions from the geyser SubscribeDeshred stream BEFORE
|
|
# they execute, earlier than the ordinary geyser listener. Two costs:
|
|
#
|
|
# 1. A coin created through a router is INVISIBLE. The create arrives as a CPI,
|
|
# and inner instructions are produced by execution, so no pre-execution
|
|
# stream carries them. No setting recovers those coins -- if you need every
|
|
# coin, use listener_type "geyser".
|
|
# 2. Outcomes are unknown at detection. A create that goes on to revert looks
|
|
# exactly like one that lands, and the buy against it costs a fee.
|
|
#
|
|
# extreme_fast_mode below is deliberately true: with it off the bot waits for the
|
|
# curve to stabilize, which spends the latency advantage and leaves only the
|
|
# costs above.
|
|
|
|
# Bot identification and connection settings
|
|
name: "bot-sniper-5"
|
|
env_file: ".env"
|
|
rpc_endpoint: "${SOLANA_NODE_RPC_ENDPOINT}"
|
|
wss_endpoint: "${SOLANA_NODE_WSS_ENDPOINT}"
|
|
private_key: "${SOLANA_PRIVATE_KEY}"
|
|
|
|
enabled: false # You can turn off the bot w/o removing its config
|
|
separate_process: true
|
|
|
|
# Options: "pump_fun" (default), "lets_bonk", "stonk_fun"
|
|
platform: "pump_fun"
|
|
|
|
# Geyser connection. Shreds mode uses the same endpoint and credentials as the
|
|
# geyser listener -- SubscribeDeshred is a separate RPC on it, not a separate
|
|
# service.
|
|
geyser:
|
|
endpoint: "${GEYSER_ENDPOINT}"
|
|
api_token: "${GEYSER_API_TOKEN}"
|
|
auth_type: "x-token" # or "basic"
|
|
|
|
# Trade execution: amount per trade and acceptable price deviation
|
|
trade:
|
|
buy_amount: 0.0001 # Amount of SOL to spend when buying (in SOL)
|
|
buy_slippage: 0.3 # Maximum acceptable price deviation (0.3 = 30%)
|
|
sell_slippage: 0.3
|
|
|
|
# Spend amounts for coins paired against a non-SOL quote asset.
|
|
# pump.fun now supports quote mints other than SOL (USDC first). Amounts are
|
|
# in that mint's own whole units, so "usdc: 1.0" means one USDC — it is NOT
|
|
# comparable to buy_amount above. Keys accept the aliases "sol"/"usdc" or a
|
|
# raw base58 mint address. A coin whose quote mint has no entry here is
|
|
# skipped rather than bought with a SOL-sized amount.
|
|
# SOL always uses buy_amount above and needs no entry.
|
|
#quote_amounts:
|
|
# usdc: 1.0
|
|
|
|
# Exit strategy configuration
|
|
exit_strategy: "time_based" # Options: "time_based", "tp_sl", "manual"
|
|
#take_profit_percentage: 0.1 # Take profit at 10% gain (0.1 = 10%)
|
|
#stop_loss_percentage: 0.1 # Stop loss at 10% loss (0.1 = 10%)
|
|
max_hold_time: 5 # Maximum hold time in seconds for TP/SL strategy, for time_based - see wait_after_buy
|
|
#price_check_interval: 2 # Check price every 2 seconds
|
|
# A tp/sl exit sell can revert when the price moves under it. The bot re-reads
|
|
# the price and retries; after this many attempts it gives up and leaves the
|
|
# position open, tokens still held.
|
|
#max_exit_sell_attempts: 3
|
|
|
|
# EXTREME FAST mode: skip the curve-stabilization wait and the price check,
|
|
# buying a fixed token amount instead. Required in shreds mode, not just
|
|
# faster — the coin is detected before it exists on chain, so there is no
|
|
# curve to price against.
|
|
extreme_fast_mode: true
|
|
extreme_fast_token_amount: 20 # Amount of tokens to buy
|
|
|
|
# Unused in shreds mode. Applies if you switch this bot to another listener.
|
|
curve_refresh_budget: 2.0
|
|
|
|
# Leave true in shreds mode. Setting it false does not make this safer — the
|
|
# bonding curve does not exist yet, so the read can only time out and skip
|
|
# the coin. Use listener_type "geyser" if you want the curve read.
|
|
trust_create_event: true
|
|
|
|
# Priority fees: transaction speed vs cost.
|
|
# Note: dynamic mode costs an extra RPC call, which slows the buy.
|
|
priority_fees:
|
|
enable_dynamic: false # Use latest transactions to estimate required fee (getRecentPrioritizationFees)
|
|
enable_fixed: true # Use fixed amount below
|
|
fixed_amount: 1_000_000 # Base fee in microlamports
|
|
extra_percentage: 0.0 # Percentage increase on riority fee regardless of the calculation method (0.1 = 10%)
|
|
hard_cap: 1_000_000 # Maximum allowable fee in microlamports to prevent excessive spending
|
|
|
|
# Compute unit limits for transaction processing
|
|
# Operation-specific defaults are used if not specified: buy=100K, sell=60K
|
|
compute_units:
|
|
# Override default CU limits for this platform
|
|
# buy: 100_000 # Buy operations (ATA creation + trading)
|
|
# sell: 60_000 # Sell operations (just trading)
|
|
|
|
# Account data size optimization (reduces CU cost and improves tx priority)
|
|
# Reduces CU cost from 16k to ~128 CU by limiting loaded account data.
|
|
# Default is 64MB (16k CU). Setting to 512KB significantly reduces overhead.
|
|
# Note: Savings don't show in "consumed CU" but improve tx priority/cost.
|
|
# Note (Nov 23, 2025): with data size set to 512KB, transactions fail - increasing to 12.5MB resolves the issue.
|
|
# Reference: https://www.anza.xyz/blog/cu-optimization-with-setloadedaccountsdatasizelimit
|
|
# account_data_size: 12_500_000 # Disabled: causes MaxLoadedAccountsDataSizeExceeded with Token-2022
|
|
|
|
# Filters for token selection
|
|
filters:
|
|
match_string: null # Only process tokens with this string in name/symbol
|
|
bro_address: null # Only trade tokens created by this user address
|
|
# Restrict which quote assets to trade. Omit (or set null) to allow any quote
|
|
# mint that has an amount configured under trade.quote_amounts.
|
|
# Accepts "sol"/"usdc" aliases or raw mint addresses.
|
|
#allowed_quote_mints: ["sol"]
|
|
listener_type: "shreds" # Pre-execution detection; see the header of this file.
|
|
# Supported on pump_fun only. Other options: "logs", "blocks", "geyser".
|
|
max_token_age: 0.001 # Maximum token age in seconds for processing
|
|
marry_mode: false # Only buy tokens, skip selling
|
|
yolo_mode: false # Continuously trade tokens
|
|
|
|
# Retry and timeout settings
|
|
retries:
|
|
max_attempts: 1 # Number of attempts for transaction submission
|
|
wait_after_creation: 15 # Seconds to wait after token creation (only if EXTREME FAST is disabled)
|
|
wait_after_buy: 5 # Holding period after buy transaction
|
|
wait_before_new_token: 15 # Pause between token trades
|
|
|
|
# Token and account management
|
|
cleanup:
|
|
# Cleanup mode determines when to manage token accounts. Options:
|
|
# "disabled": no cleanup will occur.
|
|
# "on_fail": only clean up if a buy transaction fails.
|
|
# "after_sell": clean up after selling.
|
|
# "post_session": clean up all empty accounts after a trading session ends.
|
|
mode: "post_session"
|
|
force_close_with_burn: false # Force burning remaining tokens before closing account
|
|
with_priority_fee: false # Use priority fees for cleanup transactions
|
|
|
|
# Node provider configuration
|
|
node:
|
|
max_rps: 25 # Maximum requests per second
|