Build a new DEX and liquidity-pool trading layer for b1dz so the arbitrage bot can operate across both centralized exchanges and onchain venues from day one, with a deliberate shift in emphasis toward DeFi where fragmented liquidity and route mismatch opportunities are more likely to exist than on major centralized exchanges.
The current b1dz bot supports centralized exchanges only:
- Coinbase
- Gemini
- Kraken
- Binance.US
These venues remain useful for reference pricing, inventory parking, fiat access, and CEX/DEX comparison, but the PRD now assumes the strongest long-term edge is more likely to come from DeFi routing and pool fragmentation rather than simple major-exchange CEX arbitrage.
This project adds:
- EVM DEX routing and swap execution
- Solana DEX routing and swap execution
- liquidity-pool quote ingestion
- Pump.fun discovery, quote monitoring, and guarded execution support
- LP bot support for emission-paying pools
- unified profitability modeling across CEX and DEX venues
- paper trading and backtesting support for onchain routes
- production-safe live execution with strict risk controls
The goal is not to start as a liquidity provider in MVP. The primary goal is to trade against onchain liquidity pools and aggregators in order to unlock more fragmented and potentially more profitable opportunity surfaces than are available on large centralized exchanges alone. A secondary explicit goal is to leave room for LP-management automation as a later strategy track on EVM chains once pool interactions, contracts, and execution behavior are well understood.
This PRD is for Claude Code and should be treated as an implementation blueprint.
Enable b1dz to detect and execute profitable arbitrage and short-term routing opportunities across:
- CEX to CEX
- CEX to DEX
- DEX to DEX
- single-chain multi-pool arbitrage on EVM chains
- multi-hop route arbitrage on EVM chains
- Pump.fun bonding curve opportunities
- Pump.fun to PumpSwap opportunities
- Pump.fun ecosystem to Raydium / Orca / Jupiter routes where supported
- single-chain routed swaps
- eventually selected cross-chain opportunities
The system must support Solana from the initial release, not as a later add-on.
- Venue-agnostic architecture
- All-in profitability accounting
- Deterministic execution logic
- Strict risk controls
- Small-size live rollout first
- Quote normalization across chains
- Backtest parity where practical
- No blind trust in aggregator output
- Do not start by providing liquidity
- Start by quoting and swapping against pools
- Treat Pump.fun tokens as high-risk unless proven otherwise
- Favor survivability over aggressiveness
- No LP farming or LP provisioning in MVP
- No automated concentrated-liquidity management in MVP
- No fully autonomous cross-chain bridge arbitrage in MVP
- No flash-loan arbitrage in MVP
- No memecoin-first strategy in MVP outside guarded Pump.fun support
- No AI-based trade placement in MVP
- No blind buying of fresh Pump.fun launches without filters
- No blind LP deployment without emissions, volatility, and unwind modeling
Simple arbitrage across major centralized exchanges is highly competitive and often unprofitable after:
- fees
- spread
- latency
- withdrawal constraints
- transfer delays
- capital fragmentation
Onchain liquidity pools create a wider opportunity surface:
- more venues
- more fragmented liquidity
- many pools for the same base pair on one chain
- more routing variation
- more stale pricing in some pools
- more stablecoin route differences
- more long-tail asset opportunities
- more combinatorial arbitrage paths when multiple pools and multi-hop routes are considered
But onchain trading also introduces:
- gas fees
- slippage
- approval flows on EVM
- transaction failure risk
- MEV risk
- RPC latency and reliability issues
- token risk
- smart contract risk
Gas must be modeled everywhere, but the PRD now distinguishes between:
- high-gas environments where gas can dominate edge, especially Ethereum mainnet
- lower-cost EVM environments where gas is still real but often less likely to be the primary blocker for moderate-size opportunities
Pump.fun adds another opportunity surface, but with even higher risk:
- extreme volatility
- shallow or rapidly changing liquidity
- bot-heavy flows
- social hype decay
- rug / abandonment risk
- bag-holder risk
- route and venue transitions during token lifecycle
Therefore b1dz needs a formal onchain execution architecture, not just a few swap scripts.
Existing:
- Coinbase
- Gemini
- Kraken
- Binance.US
MVP:
- 0x
- 1inch
- at least one direct AMM integration on an EVM chain for contract-level learning and execution validation
Phase 2 direct venues:
- Uniswap
- Curve
- Balancer
- Trader Joe on Avalanche
- additional chain-native DEXes as justified by observed opportunity density
MVP:
- Jupiter aggregator
Phase 2 direct venues:
- Raydium
- Orca
- Meteora or other major Solana liquidity venues as needed
MVP:
- Pump.fun token discovery
- Pump.fun bonding-curve state monitoring
- PumpSwap route awareness
- Jupiter route comparison for supported assets
- scrape or stream metadata only where officially supported APIs are absent or incomplete
Phase 2:
- direct PumpSwap adapter
- direct Pump.fun program-aware quote adapter
- migration detection from bonding curve to downstream venue
- strategy module specialized for launch / post-launch behavior
MVP recommended:
- Base
- Avalanche
- Ethereum for reference and selective execution only
Optional later:
- Arbitrum
- Optimism
- Polygon
- BNB Chain
Avalanche is specifically called out because DeFi pool fragmentation there may create many same-pair pool combinations and route permutations worth scanning.
MVP required:
- Solana mainnet-beta
The system must:
- ingest quotes from CEXs, EVM aggregators, EVM DEXs, Solana aggregators, and Pump.fun-related venues
- explicitly support multiple pools for the same pair on the same chain
- explicitly support multi-hop route enumeration on EVM chains
- normalize quotes into one canonical format
- calculate all-in profitability before execution
- support paper trading for onchain routes
- support live EVM swap execution
- support live Solana swap execution
- manage EVM token approvals safely
- manage Solana token account requirements
- estimate gas, fees, and slippage
- model route complexity and execution risk
- reject unsafe or low-quality opportunities
- track inventory by venue and chain
- log every quote, decision, and execution outcome
- support backtesting and replay where feasible
- support strict Pump.fun allowlists and launch filters
- support Pump.fun kill switches and exposure caps
As the operator of b1dz, I want to compare centralized exchange prices with onchain swap quotes on both EVM chains and Solana, including Pump.fun ecosystem routes, so that I can identify and execute profitable routes that still work after all costs and execution risks are applied.
The MVP should support these opportunity classes:
Example:
- buy on Coinbase
- sell via Uniswap route on Base or:
- buy on Kraken
- sell via Jupiter on Solana
Example:
- buy via 0x on Base
- sell on Binance.US
Example:
- buy through direct Uniswap route
- sell through Curve route or:
- buy through Orca
- sell through Raydium or:
- compare many same-pair pools on Avalanche such as multiple AVAX/USDC pools and evaluate all viable pairwise and routed combinations
Compare:
- 0x quote
- 1inch quote
- direct Uniswap quote
- direct Curve quote
- direct Balancer quote
- Jupiter route
- direct Raydium quote
- direct Orca quote
- direct PumpSwap quote when available
- early discovery and paper scoring only for brand-new launches
- bonding curve momentum observation
- post-migration route comparison
- Pump.fun / PumpSwap vs Raydium / Orca / Jupiter comparison where routable
- fast-entry / faster-exit scalps only under strict exposure limits
- immediate reject if token fails safety and liquidity filters
- flash-loan atomic arbitrage
- sandwich or MEV extraction
- liquidity providing
- rebalancing concentrated LP ranges
- bridging capital mid-trade
- fully automated long-tail token speculation
- unlimited memecoin chasing
- averaging down on failing Pump.fun names
b1dz must be split into two coordinated runtime components:
The b1dz observe command is a real-time opportunity scanner.
Responsibilities:
- connect to all enabled data sources
- watch CEX books, DEX quotes, pool states, and Pump.fun lifecycle events
- enumerate candidate opportunities
- compute all-in profitability
- rank opportunities by expected net profit and confidence
- continuously stream the best opportunities to the server-side trade engine
- never place trades directly in its default production role
Outputs:
- structured opportunity events
- profitability breakdowns
- reject reasons
- top-N live opportunity feed
- health and latency metrics by venue
The trade engine runs as a daemon on the server.
Responsibilities:
- subscribe to opportunity events from
b1dz observe - apply final risk checks, balance checks, and feature flags
- decide whether to execute, paper trade, or reject
- manage execution state, retries, confirmations, and receipts
- update inventory and realized PnL
- expose kill-switch control and audit logs
The observe process and trade daemon must communicate through a durable internal event channel such as:
- Redis streams
- NATS
- Postgres queue
- or another reliable message bus
The boundary between them must be explicit:
- observe finds and scores
- daemon decides and executes
Because b1dz already has CoinPay web wallet infrastructure, the PRD should support using CoinPay CLI and related wallet flows as the operational bridge into onchain execution.
Goals:
- reuse existing wallet and signing infrastructure where practical
- avoid inventing a second disconnected wallet stack unless required
- make b1dz capable of requesting balances, addresses, and signing flows through CoinPay-compatible interfaces
Recommended integration pattern:
- b1dz adapters request wallet actions through a wallet-provider abstraction
- one implementation of that abstraction is CoinPay CLI
- other implementations may include direct private-key signers or chain-specific SDK signers
Suggested responsibilities for the CoinPay CLI wallet provider:
- return chain addresses for configured wallets
- report balances for supported assets
- sign EVM transactions
- sign Solana transactions if supported by CoinPay wallet flows, otherwise fall back to a Solana-specific signer
- manage or proxy web-wallet session/auth flows where relevant
- keep private key material out of the b1dz app process when possible
The PRD should treat CoinPay CLI as the preferred wallet bridge for:
- web wallet interoperability
- existing operational consistency
- future user-facing wallet features
But the architecture must remain pluggable because:
- some DEX integrations may need direct low-level chain SDK access
- Solana support may require a dedicated signer path even if CoinPay handles EVM well
- server daemon execution may need non-interactive signing behavior distinct from browser wallet UX
The architecture must be modular and venue-agnostic.
For EVM chains, the engine must maintain a pool graph where:
- nodes are tokens
- edges are pools or executable swap venues
- multiple edges may exist for the same token pair
The route engine must:
- enumerate same-pair multi-pool comparisons
- enumerate 2-hop and 3-hop routes under strict complexity limits
- score routes by expected net value after gas, slippage, and price impact
- avoid combinatorial explosion with configurable pruning rules
- market data service
- quote service
- venue adapter layer
- token metadata registry
- chain config registry
- route profitability engine
- risk engine
- paper trading engine
- live execution engine
- wallet and signer service
- wallet-provider abstraction with CoinPay CLI implementation
- inventory ledger
- Pump.fun discovery watcher
- Pump.fun lifecycle classifier
- observability and logging service
- backtest/replay engine
- admin config and feature flag layer
- request quotes from all enabled venues
- ingest Pump.fun discovery / lifecycle events
- normalize all quotes and token metadata
- compute all-in profitability
- run safety and liquidity checks
- rank viable opportunities
- paper trade or live execute depending on mode
- track confirmations and fills
- update inventory and logs
- evaluate post-trade PnL
All venues must map into a shared quote shape.
export type NormalizedQuote = {
venue: string
venueType: "cex" | "dex" | "aggregator" | "launchpad"
chain: string | null
dexProtocol?: string | null
pair: string
baseAsset: string
quoteAsset: string
amountIn: string
amountOut: string
amountInUsd?: string | null
amountOutUsd?: string | null
side: "buy" | "sell"
estimatedUnitPrice: string
feeUsd: string
gasUsd: string
slippageBps: number
priceImpactBps?: number | null
routeHops: number
routeSummary: string[]
quoteTimestamp: number
expiresAt?: number | null
latencyMs?: number | null
allowanceRequired?: boolean | null
approvalToken?: string | null
tokenLifecycle?: "new_launch" | "bonding_curve" | "migrating" | "pumpswap" | "external_pool" | null
raw: unknown
}All opportunities must map into a shared route shape.
export type Opportunity = {
id: string
buyVenue: string
sellVenue: string
buyChain: string | null
sellChain: string | null
asset: string
size: string
grossEdgeUsd: string
totalFeesUsd: string
totalGasUsd: string
totalSlippageUsd: string
riskBufferUsd: string
expectedNetUsd: string
expectedNetBps: number
confidence: number
blockers: string[]
executable: boolean
category: "cex_cex" | "cex_dex" | "dex_dex" | "pumpfun_scalp" | "pumpfun_migration" | "pumpfun_post_migration"
}Each adapter must implement:
- health check
- authentication or wallet setup
- token/pair support discovery
- quote fetch
- execution preparation
- execution submit
- execution status check
- error normalization
- rate limiting
- retry policy
- structured logging
- fetch order book or top-of-book
- fetch effective fill estimate for target size
- submit order if enabled
- fetch fill status
- fetch balances
- distinguish spot from perps explicitly
- never compare spot and perp prices as if they were identical without funding / basis logic
- tag every CEX quote with market type
- keep perp support out of scope unless a dedicated basis or funding-aware module is added
- fetch quote
- fetch firm quote or calldata
- estimate gas
- validate allowance
- build approval transaction if needed
- simulate where possible
- submit transaction
- track receipt
- classify failure
- fetch quote
- fetch prepared swap transaction or instructions
- estimate fees
- validate token account readiness
- sign and send transaction
- confirm transaction
- classify failure
- detect new launches or newly relevant tokens
- fetch bonding curve state if applicable
- infer token lifecycle state
- discover downstream routing venue availability
- fetch quote or indicative price when possible
- classify unsupported / unsafe states
- expose migration or graduation signals
- support scrape fallback only behind feature flag
- for at least one direct EVM DEX integration, inspect real swap and liquidity transactions
- capture relevant contract addresses from transaction traces or logs
- retrieve and store verified ABIs when available
- generate typed contract clients from ABIs
- separate router, pair/pool, factory, and helper contracts in the adapter design
- support a developer workflow for learning new pools by tracing a known deposit or swap transaction end to end
- per-chain wallet configuration
- support dedicated hot wallet
- secure private key loading through env or secret manager
- nonce management
- balance checks before execution
- detect allowance requirement
- support approve-exact or safe approval policy
- track approval gas cost
- optionally pre-approve commonly used tokens only via explicit config
- reject routes that require approval when approval cost kills edge
- support EIP-1559 fee modeling
- configurable max gas thresholds
- gas buffer for volatile periods
- stale gas quote rejection
- where possible, simulate swap transaction before send
- reject on obvious failure cases
- store simulation diagnostics
All execution paths must go through a wallet-provider abstraction rather than coupling adapters directly to raw keys.
Required interface areas:
- getAddress(chain)
- getBalance(chain, asset)
- signTransaction(chain, payload)
- signMessage(chain, payload) where needed
- broadcastTransaction(chain, signedPayload) when supported
- capability discovery by chain
Implementations:
- CoinPay CLI wallet provider
- direct EVM signer provider
- direct Solana signer provider
Rules:
- prefer CoinPay CLI where it provides a clean server-safe path
- keep Solana signer support pluggable in case CoinPay coverage is incomplete
- never hardcode wallet logic into venue adapters
- dedicated Solana hot wallet
- secure keypair loading through env or secret manager
- SOL balance monitoring for transaction fees
- SPL token account awareness
- Jupiter quote integration from MVP
- support prepared transaction flow
- slippage configuration per route
- optional priority fee support
- blockhash freshness validation
- transaction confirmation handling
- transaction retry or re-sign policy where safe
- token mint allowlist for MVP
- freeze authority / mint risk awareness where available
- token decimal verification
- liquidity threshold filter
- route complexity filter
- stale quote rejection
Pump.fun support must be opt-in and heavily restricted.
- default to observe mode only
- default to paper trading for fresh launches
- require manual enablement for live trading
- require token allowlist or rule-based allowlist
- require min liquidity / routeability
- require max holding time
- require hard stop loss
- require max position size much smaller than majors
- never average down automatically
- never hold because of social hype alone
A Pump.fun candidate must pass:
- sufficient routeable liquidity
- acceptable spread / price impact
- sufficient volume velocity
- enough unique activity to avoid totally dead launches
- not flagged by denylist
- token metadata present enough to classify
- execution venue actually reachable
- estimated exit path exists before entry
For Pump.fun live mode:
- predefined take-profit ladder or hard take-profit
- predefined stop-loss
- predefined max hold time
- immediate exit on liquidity collapse signal
- immediate exit on route disappearance
- immediate exit on severe price-impact expansion
- no discretionary bag holding
- observe_only
- paper_only
- guarded_live
- disabled
Build an internal token registry that stores:
- symbol
- chain
- mint or contract address
- decimals
- stablecoin flag
- wrapped/native mapping
- safety status
- allowlisted flag
- disabled flag
- common venues
- pumpFunFlag
- pumpLifecycleState
- denylistReason if blocked
This registry must support:
- ETH <-> WETH normalization
- SOL <-> wrapped SOL handling where needed
- BTC wrappers distinction
- USDC variants by chain
- token aliases and symbol collisions
- Pump.fun mint lifecycle transitions
This is the heart of the system.
The engine must compute:
expectedNetUsd = exitValueUsd
- entryValueUsd
- tradingFeesUsd
- gasUsd
- slippageUsd
- approvalCostUsd
- transferCostUsd
- priorityFeeUsd
- riskBufferUsd
The engine must never treat a raw spread as profit.
- CEX trading fees
- DEX protocol fees where embedded or explicit
- EVM gas
- Solana network fees
- Solana priority fees if used
- approval gas costs
- estimated slippage
- route price impact
- spread decay buffer
- quote staleness buffer
- Pump.fun-specific liquidity decay buffer
- Pump.fun-specific dump-risk buffer
Configurable:
- minimum absolute USD profit
- minimum net basis points
- per-asset minimum edge
- per-chain minimum edge
- stricter thresholds during high gas or high volatility
- much stricter thresholds for Pump.fun names
Reject any opportunity that violates safety rules.
- net profit below threshold
- quote too stale
- opportunity already executed recently
- insufficient inventory
- insufficient wallet balance
- feature flag disabled
- circuit breaker active
- price impact too high
- route too many hops
- liquidity below minimum threshold
- token not allowlisted
- gas too high relative to trade size
- slippage too high
- required approval too expensive
- direct venue unavailable
- aggregator confidence too low
- token not allowlisted
- route too complex
- fee spike
- blockhash too stale
- Jupiter route quality below threshold
- token account setup requirement exceeds value of trade
- low liquidity on pool
- fresh launch but no validated exit route
- price impact too high
- liquidity too thin
- suspected dead token behavior
- route vanished
- denylisted mint
- holding time limit would likely be exceeded
- social-only momentum with no executable depth
- position size exceeds Pump.fun cap
- token lifecycle unknown
- order book depth insufficient
- spread too wide
- withdrawal disabled if route depends on asset movement
- venue in degraded state
b1dz must track inventory separately by venue and chain.
Examples:
- USD on Coinbase
- USDC on Base hot wallet
- ETH on Base hot wallet
- SOL in Solana hot wallet
- USDC on Solana wallet
- Pump.fun token inventory on Solana wallet
- USDT on Kraken
The bot must not assume capital is freely movable in real time.
Inventory ledger must include:
- available balance
- reserved balance
- pending settlement
- pending tx state
- venue
- chain
- token
- USD reference value
- fetch quotes only
- compute opportunities only
- log everything
- no paper fills
- no live execution
- simulate fills using modeled slippage and fees
- generate pseudo execution receipts
- compare expected vs simulated realized outcome
- real transactions and orders
- strict max size
- strict allowed assets
- strict chain allowlist
- kill switch enabled
- separate feature flag
- separate max size
- separate max concurrent positions
- separate kill switch
- separate daily loss cap
Backtesting must support:
- historical CEX top-of-book or candle-derived approximations
- recorded DEX quote snapshots or replay logs
- recorded gas and fee estimates when possible
- modeled slippage
- modeled approval costs
- route rejection logic
- latency assumptions
- Pump.fun event streams or scraped snapshots where available
Where perfect reconstruction is impossible, the system must document the gap clearly.
- gross PnL
- net PnL
- net PnL after all costs
- win rate
- average opportunity size
- fill rate
- failure rate
- execution rejection rate
- PnL by venue
- PnL by chain
- PnL by asset
- PnL by route type
- PnL by token lifecycle state
- Pump.fun exposure versus return
Every decision must be explainable.
Log:
- raw venue quote
- normalized quote
- profitability breakdown
- rejection reasons
- selected opportunity
- execution payload metadata
- tx hash or order id
- confirmation status
- realized outcome
- post-trade variance vs estimate
- Pump.fun lifecycle state changes
- Pump.fun migration detection events
Dashboards should show:
- quote counts by venue
- opportunities by venue pair
- approval costs over time
- gas by chain
- Solana fee trends
- realized vs expected PnL
- error rates
- kill switch events
- Pump.fun watchlist quality
- Pump.fun exits by reason
- max USD size per trade
- max USD size per asset
- max USD size per chain
- max daily loss
- max per-venue loss
- max gas per trade
- max Solana fee per trade
- max slippage bps
- max price impact bps
- much lower max USD per trade
- max hold time in seconds or minutes
- max concurrent Pump.fun positions
- max daily Pump.fun loss
- max exposure to any single mint
- mandatory stop-loss
- mandatory take-profit or timed exit
- repeated tx failures
- repeated CEX order failures
- repeated stale quote failures
- chain congestion
- RPC degradation
- abnormal gas spike
- wallet balance too low
- approval stuck state
- realized loss threshold exceeded
- Pump.fun liquidity collapse
- too many Pump.fun stopouts in sequence
The system should support both third-party RPC providers and self-hosted nodes where practical.
Guidance:
- do not require self-hosting for MVP
- track quote freshness and latency by provider
- design the architecture so a self-hosted node can be added later for chains where lower latency or better trace access materially improves results
- prioritize own-node or archive/trace-capable access for serious EVM arbitrage research if third-party RPC quality proves limiting
- reliable primary RPC per chain
- fallback RPC support
- configurable timeouts
- health checks
- rate limiting
- metrics per provider
- reliable primary RPC
- fallback RPC support
- WebSocket support if needed
- health and slot lag checks
- confirmation latency tracking
- Dockerized services
- Railway-friendly deployment where possible
- isolated signer service if desired
- environment-based secrets
- detailed structured JSON logs
- never expose private keys client-side
- all signing server-side only
- encrypt secrets at rest where possible
- validate token allowlist before trade
- block unknown token mints/contracts by default
- support dry-run mode globally
- support emergency global disable
- store minimal sensitive data in logs
- redact secrets in errors and traces
- require explicit enablement for scrape-based Pump.fun sources
Keep the first live scope narrow.
- ETH / WETH
- USDC
- USDT
- DAI
- cbBTC or WBTC only if explicitly enabled
- SOL
- USDC
- USDT
- wrapped BTC or ETH only if explicitly enabled
- observe and paper mode for broad discovery
- live mode only for explicitly enabled shortlist
- no blind trading of every new launch
- no overnight holds
- no averaging down
- no martingale behavior
- memecoins outside guarded rules
- low-liquidity tokens
- newly deployed tokens without routeable exit
- unverified mints/contracts
- fee-on-transfer tokens
Build:
- shared quote types
- adapter interfaces
- token registry
- opportunity model
- profitability engine
- observe mode
- logging
Adapters:
- Coinbase
- Kraken
- Gemini
- Binance.US
- 0x
- 1inch
- Jupiter
- Pump.fun discovery adapter
Build:
- paper execution simulator
- slippage model
- gas and fee model
- route replay logs
- comparison dashboards
- Pump.fun lifecycle replay
Build:
- wallet service
- approval manager
- transaction builder
- receipt tracker
- kill switch controls
Build:
- Solana wallet service
- Jupiter transaction flow
- confirmation tracking
- priority fee controls
- Solana-specific safety filters
Build:
- Pump.fun rule engine
- allowlist / denylist controls
- forced time-based exit logic
- tighter risk caps
- PumpSwap awareness
- migration-aware execution filters
EVM:
- direct Uniswap
- direct Curve
- direct Balancer
Solana:
- direct Raydium
- direct Orca
- optional Meteora
- direct PumpSwap if justified
- DEX vs DEX route optimization
- atomic route support where feasible
- direct venue vs aggregator edge testing
- AI-assisted route filtering
- selective cross-chain opportunities
AI is optional and should not control trading in MVP.
Good AI uses later:
- opportunity quality scoring
- regime classification
- anomaly detection
- route failure prediction
- gas spike forecasting
- token risk pattern detection
- post-trade clustering of winners vs losers
- Pump.fun launch quality scoring
Bad AI uses early:
- LLM deciding trades directly
- black-box next-tick prediction
- dynamic parameter changes without guardrails
- buying hype because of social chatter alone
/apps
/engine
/api
/dashboard
/packages
/core
/types
/config
/adapters-cex
/adapters-evm
/adapters-solana
/adapters-pumpfun
/wallet-provider
/coinpay-wallet-provider
/profitability
/risk
/paper-execution
/live-execution
/token-registry
/observability# General
NODE_ENV=development
LOG_LEVEL=info
MODE=observe
# CEX
COINBASE_API_KEY=
COINBASE_API_SECRET=
KRAKEN_API_KEY=
KRAKEN_API_SECRET=
GEMINI_API_KEY=
GEMINI_API_SECRET=
BINANCE_US_API_KEY=
BINANCE_US_API_SECRET=
# CoinPay / Wallet Provider
COINPAY_CLI_PATH=coinpay
COINPAY_PROFILE=default
WALLET_PROVIDER=coinpay
COINPAY_WEB_WALLET_ENABLED=true
# EVM
EVM_PRIVATE_KEY=
ETHEREUM_RPC_URL=
BASE_RPC_URL=
AVALANCHE_RPC_URL=
ZEROX_API_KEY=
ONEINCH_API_KEY=
# Solana
SOLANA_PRIVATE_KEY=
SOLANA_RPC_URL=
SOLANA_WS_URL=
# Pump.fun
PUMPFUN_MODE=observe_only
PUMPFUN_ENABLE_SCRAPE=false
PUMPFUN_MAX_TRADE_USD=25
PUMPFUN_MAX_HOLD_SECONDS=300
PUMPFUN_MAX_CONCURRENT_POSITIONS=2
PUMPFUN_DAILY_MAX_LOSS_USD=100
# Risk
MAX_TRADE_USD=100
MIN_NET_PROFIT_USD=2
MIN_NET_PROFIT_BPS=15
MAX_GAS_USD=5
MAX_SLIPPAGE_BPS=50
MAX_ROUTE_HOPS=3The MVP is complete when:
b1dz observecan stream ranked live opportunities in real time- the trade daemon can subscribe to those opportunities and apply final execution decisions
- CoinPay CLI can be used as a wallet-provider implementation for supported chains
- b1dz can fetch quotes from all enabled CEX venues
- b1dz can fetch quotes from 0x, 1inch, Jupiter, and Pump.fun discovery sources
- all quotes map into a single normalized format
- the profitability engine computes net expected value after all costs
- unsafe routes are rejected with explicit reasons
- paper trading works for CEX, EVM, Solana, and guarded Pump.fun opportunities
- live EVM execution works for allowed assets on enabled chains
- live Solana execution works via Jupiter for allowed assets
- Pump.fun support works in observe and paper mode by default
- optional guarded Pump.fun live mode enforces tighter risk caps
- inventory tracking works across venues and chains
- dashboards and logs clearly explain why opportunities were accepted or rejected
- kill switch and hard risk limits are enforced
This project is successful when:
- b1dz finds more viable opportunities than the current CEX-only engine
- observed edge survives realistic cost modeling
- paper mode closely matches live execution quality
- live mode safely executes small-size profitable routes
- Solana support is first-class, not bolted on later
- Pump.fun support is heavily controlled and does not create recurring bag-holder behavior
- the architecture is clean enough to add direct DEX integrations afterward
Build b1dz as a unified multi-venue arbitrage engine, not as a set of exchange-specific scripts.
Start with:
- CEX quotes
- 0x
- 1inch
- Jupiter
- Pump.fun discovery and guarded lifecycle monitoring
- all-in profitability modeling
- observe mode
- paper mode
- very small live mode
Do not start by becoming an LP.
Do not treat Pump.fun as a free-money machine.
Start by:
- reading onchain liquidity
- routing swaps safely
- modeling the true cost of execution
- comparing routes across CEX, EVM, and Solana venues
- keeping Pump.fun on the shortest leash of all
That is the fastest path to learning whether liquidity-pool support actually improves profitability for b1dz without turning the bot into a bag-holder.