PumpFun Launch Bundler

Bundle token creation, liquidity addition, and initial buys into a single atomic transaction for fair launches.

Features

  • Atomic Execution: All-or-nothing transaction bundling
  • Fair Launch: No front-running possible
  • Multi-Wallet Support: Distribute initial supply across wallets
  • Instant Liquidity: Add liquidity in the same transaction
  • MEV Protection: Private transaction relay

Installation

1npm install @allenhark/launch-bundler

Configuration

1{
2  "token": {
3    "name": "My Token",
4    "symbol": "MTK",
5    "decimals": 9,
6    "supply": 1000000000
7  },
8  "liquidity": {
9    "initialSOL": 5.0,
10    "initialTokens": 500000000
11  },
12  "distribution": [
13    {
14      "wallet": "wallet1_pubkey",
15      "amount": 100000000
16    },
17    {
18      "wallet": "wallet2_pubkey",
19      "amount": 100000000
20    }
21  ]
22}

Usage

1import { LaunchBundler } from '@allenhark/launch-bundler';
2
3const bundler = new LaunchBundler({
4  rpcUrl: process.env.ALLENHARK_RPC_URL!,
5  relayUrl: process.env.ALLENHARK_RELAY_URL!,
6  wallet: loadWallet(),
7});
8
9// Create launch bundle
10const bundle = await bundler.createBundle({
11  token: {
12    name: "My Token",
13    symbol: "MTK",
14    decimals: 9,
15    supply: 1_000_000_000,
16  },
17  liquidity: {
18    dex: 'raydium',
19    solAmount: 5.0,
20    tokenAmount: 500_000_000,
21  },
22  initialBuys: [
23    { wallet: wallet1, amount: 0.1 },
24    { wallet: wallet2, amount: 0.1 },
25    { wallet: wallet3, amount: 0.1 },
26  ],
27});
28
29// Execute bundle atomically
30const result = await bundler.execute(bundle);
31console.log('Token launched:', result.tokenMint);
32console.log('Pool created:', result.poolAddress);

Advanced Features

Custom Token Metadata

1const bundle = await bundler.createBundle({
2  token: {
3    name: "My Token",
4    symbol: "MTK",
5    decimals: 9,
6    supply: 1_000_000_000,
7    metadata: {
8      uri: "https://arweave.net/metadata.json",
9      sellerFeeBasisPoints: 0,
10      creators: [
11        {
12          address: creatorWallet.publicKey,
13          verified: true,
14          share: 100,
15        },
16      ],
17    },
18  },
19  // ... rest of config
20});

Multi-DEX Launch

1// Launch on multiple DEXes simultaneously
2const multiBundle = await bundler.createMultiDexBundle({
3  token: tokenConfig,
4  launches: [
5    {
6      dex: 'raydium',
7      solAmount: 3.0,
8      tokenAmount: 300_000_000,
9    },
10    {
11      dex: 'orca',
12      solAmount: 2.0,
13      tokenAmount: 200_000_000,
14    },
15  ],
16});

Vesting Schedule

1// Add vesting for team tokens
2const bundle = await bundler.createBundle({
3  token: tokenConfig,
4  liquidity: liquidityConfig,
5  vesting: [
6    {
7      wallet: teamWallet,
8      amount: 100_000_000,
9      schedule: {
10        cliff: 30 * 24 * 60 * 60, // 30 days
11        duration: 365 * 24 * 60 * 60, // 1 year
12        slices: 12, // Monthly releases
13      },
14    },
15  ],
16});

Security Features

Anti-Snipe Protection

1bundler.setAntiSnipe({
2  enabled: true,
3  maxBuyPerWallet: 1.0, // SOL
4  cooldownPeriod: 60, // seconds
5});

Liquidity Lock

1// Lock liquidity for specified duration
2const bundle = await bundler.createBundle({
3  token: tokenConfig,
4  liquidity: {
5    ...liquidityConfig,
6    lock: {
7      duration: 90 * 24 * 60 * 60, // 90 days
8      provider: 'allenhark-locker',
9    },
10  },
11});

Monitoring

1// Monitor bundle status
2bundler.on('bundleCreated', (bundle) => {
3  console.log('Bundle created:', bundle.id);
4});
5
6bundler.on('bundleExecuting', (bundle) => {
7  console.log('Executing bundle:', bundle.id);
8});
9
10bundler.on('bundleComplete', (result) => {
11  console.log('Launch complete!');
12  console.log('Token:', result.tokenMint);
13  console.log('Pool:', result.poolAddress);
14  console.log('Signature:', result.signature);
15});

Cost Estimation

1const estimate = await bundler.estimateCosts({
2  token: tokenConfig,
3  liquidity: liquidityConfig,
4  initialBuys: buysConfig,
5});
6
7console.log({
8  rentExemption: estimate.rent,
9  transactionFees: estimate.fees,
10  totalCost: estimate.total,
11});

Best Practices

  1. Test on Devnet: Always test your bundle configuration first
  2. Use Private Relay: Prevent front-running with AllenHark Relay
  3. Verify Metadata: Double-check token metadata before launch
  4. Lock Liquidity: Build trust by locking LP tokens
  5. Fair Distribution: Avoid concentration in few wallets