Documentation

Technical reference for the Bonker token factory.

Getting Started

Deploying a token through Bonker is a single transaction that creates the ERC-20 token, initializes a Uniswap v4 pool, locks liquidity, and activates MEV protection.

What happens on deployToken()

  1. Factory creates a new BonkerToken (ERC-20) with your chosen name, symbol, and supply
  2. A Uniswap v4 pool is initialized via the selected hook (dynamic or static fee)
  3. Factory initializes the pool through the hook, then the LP locker mints the initial liquidity position
  4. LP position (ERC-721) is locked in LpLocker — permanent, non-withdrawable
  5. MEV module is activated with sniper auction + descending fees + block delay
  6. If a launch extension is set (airdrop, vault, devbuy), it runs during initialization

Config structs

The deployToken() function takes a single DeploymentConfig:

struct DeploymentConfig {
    TokenConfig tokenConfig;
    PoolConfig poolConfig;
    LockerConfig lockerConfig;
    MevModuleConfig mevModuleConfig;
    ExtensionConfig[] extensionConfigs;
}

TokenConfig

struct TokenConfig {
    address tokenAdmin;          // Admin address for the token
    string name;                 // Token name (e.g. "Bonker Token")
    string symbol;               // Token symbol (e.g. "BONK")
    bytes32 salt;                // CREATE2 salt for deterministic address
    string image;                // Token image URI
    string metadata;             // Additional metadata
    string context;              // Context string
    uint256 originatingChainId;  // Chain ID for cross-chain support
}

PoolConfig

struct PoolConfig {
    address hook;                // DynamicHook or StaticHook address
    address pairedToken;         // Token to pair with (usually WETH)
    int24 tickIfToken0IsBonker;  // Starting tick
    int24 tickSpacing;           // Pool tick spacing
    bytes poolData;              // Hook-specific pool config
}

LockerConfig

struct LockerConfig {
    address locker;              // LpLocker address
    address[] rewardAdmins;      // Admin per reward recipient
    address[] rewardRecipients;  // Who receives LP fees (up to 7)
    uint16[] rewardBps;          // Fee share per recipient (basis points, sum = 10000)
    int24[] tickLower;           // LP position lower ticks
    int24[] tickUpper;           // LP position upper ticks
    uint16[] positionBps;        // Liquidity split per position
    bytes lockerData;            // Additional locker config
}

ExtensionConfig

struct ExtensionConfig {
    address extension;     // Extension contract (or address(0))
    uint256 msgValue;      // ETH to send to extension
    uint16 extensionBps;   // Token supply % for extension (basis points)
    bytes extensionData;   // Extension-specific config
}