Stress-test flight simulator and config tuner for Meteora Dynamic Bonding Curves (DBC), validated bit-for-bit on Solana mainnet and devnet.
WindTunnel is a discrete-event market simulator and parameter optimization engine for Meteora Dynamic Bonding Curve (DBC) token launches. It allows founders, liquidity engineers, and token creators to simulate bonding curve launches under adversarial conditionsβmodeling snipers, MEV bundlers, retail momentum traders, and whalesβbefore committing funds on-chain. Every mathematical model in WindTunnel has been validated against live Meteora DBC program state transitions on Solana Devnet and Mainnet-Beta.
Launching a bonding curve token blind is dangerous. Founders typically choose bonding curve parametersβsuch as initial market cap, migration targets, and fee decay schedulesβwithout empirical data on how those choices behave under adversarial pressure.
Our empirical benchmarks revealed two structural failure modes common to blind launches:
- Unprotected sniper extraction: Across benchmark scenarios, slot-0 Jito snipers extract 18.3% to 18.5% of token supply under whale-heavy order flow (generating up to 96.6 SOL net profit in
scripts/compare-demo.ts), and 38.2% to 42.8% under coordinated sniper bundles on flat and low-fee curves (scripts/tune-demo.ts), capturing early tokens before organic buyers can execute. - Severe migration liquidity drop: Moving from a discrete DBC curve into Meteora DAMM v2 (CP-AMM) full-range liquidity causes an immediate 67x to 79x surge in price impact, exposing graduating tokens to violent post-migration dump volatility.
WindTunnel provides a full-stack flight simulator across four core capabilities:
- Adversarial Trader Simulator: A deterministic, multi-agent simulation engine running 5 distinct trader archetypes:
JitoSniperAgent: Slot-0 bundle extractors targeting early supply.RetailMomentumAgent: Trend-following retail buyers with slippage thresholds.WhaleDumpAgent: High-capital market orders designed to test pool resilience.NoiseTraderAgent: Stochastic background liquidity.ArbitrageurAgent: Cross-pool price reconcilers.
- DBC β DAMM v2 Migration-Gap Analyzer: Measures price continuity, migration fees (protocol & creator splits), and the order book liquidity cliff across pool graduation.
- Evolutionary Auto-Tuner: A two-stage evolutionary optimization search (
core/src/tuner/tuner.ts). Generation 0 samples random candidate configurations across the continuous DBC parameter space (core/src/tuner/space.ts), evaluates them against adversarial scenarios, and selects the top-scoring elite candidates. Generation 1 mutates the parameters of those top performers within bounded perturbation ranges to converge on optimal fee barriers, decay rates, and curve dimensions for user-specified objectives (e.g.protect-organic,creator-yield). - Interactive Web Flight Simulator: A Next.js web application (windtunnel-six.vercel.app) featuring side-by-side curve comparison, real-time adversarial playback, and interactive parameter tuning.
Through millions of simulated ticks and on-chain benchmarks, WindTunnel uncovered critical economic insights:
- 67x β 79x Post-Graduation Slippage Jump: In migration gap benchmarks across steep, flat, and multi-segment curves (
scripts/compare-demo.ts), a standard $1,000 buy order incurs 67x to 79x higher price impact immediately after migration onto DAMM v2 compared to immediately before migration on the bonding curve (67.8x on flat, 70.6x on steep, 79.4x on multi-segment). This occurs because migrated liquidity is deployed across the full range (MIN_SQRT_PRICEtoMAX_SQRT_PRICE), substantially diluting active depth near spot. - Auto-Tuner Outperforms Hand-Picked Baseline (+6.28 pts, +225% Creator Fees): In a 40-iteration two-stage parameter search against the coordinated snipers scenario (
seed: 4242), the tuner refined a 16.0% starting fee barrier with a 1,000-slot linear decay (to 1.5% floor) and 2.6x curve expansion (15 to 39 SOL). Comparing this tuned preset against the hand-picked baseline (5% decaying to 1%, 20 to 40 SOL), the tuned config improved the objective score by +6.28 points and drove a +225% increase in creator fee revenue (from 0.126 SOL to 0.410 SOL) by taxing early sniper bundles at 16%, with sniper token share changing only slightly (38.2% to 37.2%) while organic buyer returns rose from +88.8% to +93.6%. - Exact-Match Devnet Validation (0 Lamport Delta): Across 4 consecutive devnet swaps, WindTunnel's discrete mathematical engine predicted on-chain
sqrtPrice, base reserves, quote reserves, and 3-way fee splits with exact 0-lamport delta against the live Meteora DBC program.
WindTunnel is tested and verified on live Solana networks:
- Tuned Partner Config:
HRTdrgErgvNtBabEQjtZusdvkm7FXYipjGh8BEdRPECf - Virtual DBC Pool PDA:
F5rMhAuXyc2qVWencT6Uc1H4DnxuJtCF6V1WJpNQ7PMV - Base Token Mint (WIND):
2M5bnNecFmnasuFKnq9NcX99fGwAvYKDWmVFjf3Qe7jZ - Swap 1 (Buy 0.003 SOL β 27.81M WIND):
2TpaPqM...@1.079e-10 SOL/WIND - Swap 2 (Buy 0.003 SOL β 19.87M WIND):
2njtYBv...@1.510e-10 SOL/WIND(+40.0% curve price discovery) - Full Report:
docs/mainnet-launch.md
- Devnet Partner Config:
HqzYqop5KQXxGxWte7iaH2DUTDU74XdvnozoW4D1oDm4 - Devnet Pool:
2zJFqXFqoJDt7kvf1vpCXRa8qTS11ATNmy19TPZjRXBV - Full Report:
docs/devnet-validation.md
windtunnel/
βββ core/ # Pure simulation & optimization engine
β βββ src/
β β βββ agents/ # 5 adversarial trader archetypes
β β β βββ sniper.ts # Slot-0 sniper extractor
β β β βββ bundler.ts # Coordinated Jito MEV bundles
β β β βββ momentum.ts # Retail trend-following buyers
β β β βββ whale.ts # High-capital market orders
β β β βββ arbitrageur.ts # Cross-pool price reconciler
β β βββ scenario/ # Discrete-event simulation runner
β β β βββ runner.ts # Event loop, clock & step execution
β β β βββ agentMix.ts # Pre-configured trader compositions
β β β βββ compare.ts # Multi-configuration comparison harness
β β βββ sim/ # Mathematical models & AMM mechanics
β β β βββ pool.ts # In-memory Meteora DBC virtual curve
β β β βββ damm.ts # Post-graduation DAMM v2 CP-AMM & migration gap
β β β βββ rng.ts # Seeded Mulberry32 deterministic PRNG
β β β βββ volatility.ts # Stochastic price volatility models
β β βββ scorecard/ # Multi-dimensional evaluation metrics
β β β βββ compute.ts # Sniper extraction, organic returns & fees
β β βββ tuner/ # Two-stage evolutionary parameter optimizer
β β β βββ space.ts # Parameter search space & random sampling
β β β βββ objectives.ts # Multi-objective fitness scoring functions
β β β βββ tuner.ts # Gen 0 sampling + Gen 1 elite mutation
β β βββ index.ts # Public library exports
β βββ scripts/ # CLI demos & on-chain deployment scripts
β β βββ devnet-deploy.ts # Devnet DBC config & pool creation
β β βββ devnet-trade.ts # Devnet swap observation harness
β β βββ devnet-migrate.ts # Devnet liquidity migration execution
β β βββ stage1-create-config.cjs# Mainnet partner config creation
β β βββ stage2-create-pool.cjs # Mainnet DBC pool & mint initialization
β β βββ stage3-swap1.cjs # Mainnet real swap 1 (buy)
β β βββ stage4-swap2.cjs # Mainnet real swap 2 (buy)
β β βββ tune-demo.ts # CLI auto-tuner demonstration
β β βββ compare-demo.ts # CLI 3-way launch comparison demo
β βββ tests/ # 37 hardened invariant & parity tests
β
βββ web/ # Interactive Next.js web dashboard
β βββ src/app/ # Next.js App Router & server simulation APIs
β β βββ api/simulate/route.ts # Server-side simulation API endpoint
β β βββ api/compare/route.ts # Server-side comparison API endpoint
β βββ src/components/ # Dark-theme dashboard & charts
β β βββ Simulator.tsx # Interactive curve flight simulator
β β βββ CompareView.tsx # Side-by-side launch comparison
β β βββ DevnetVerified.tsx # Mainnet traction & devnet parity proof
β β βββ Findings.tsx # Empirical research findings cards
β βββ src/lib/core.ts # Server-side bindings to windtunnel-core
β
βββ docs/ # Empirical research papers & on-chain proof
βββ mainnet-launch.md # Mainnet-beta ledger & real swap proof
βββ devnet-validation.md # Devnet 0-delta mathematical parity proof
βββ migration-gap-findings.md # Research paper on 67-79x liquidity jump
βββ sdk-notes.md # Meteora DBC SDK deep dive & bit math
The Next.js frontend calls the simulation engine through server-side API routes (/api/simulate, /api/compare), guaranteeing 100% mathematical fidelity between the CLI and the web interface without duplicating code.
- Node.js v20+ (tested on Node v24)
- npm v10+
# Clone the repository
git clone https://github.com/jotel-dev/windtunnel.git
cd windtunnel
# Install dependencies and run tests in core
cd core
npm install
npm test# Run 3-way launch comparison harness
npm run compare
# Run the evolutionary auto-tuner
npx tsx scripts/tune-demo.tscd ../web
npm install
npm run devOpen http://localhost:3000 in your browser.
docs/mainnet-launch.md: Solana Mainnet-Beta launch ledger, transaction signatures, and budget accounting.docs/devnet-validation.md: Empirical bit-for-bit validation of simulator predictions against Solana Devnet.docs/migration-gap-findings.md: Research paper on the 67-79x liquidity cliff transitioning from DBC to DAMM v2.docs/sdk-notes.md: Technical deep-dive into Meteora DBC SDK internals, bit shifts, and math equations.
Built with precision for the Meteora Dynamic Bonding Curve Bounty on Superteam Earn.
MIT License. See LICENSE for details.