What is the DEX Phase?

The DEX phase is the final stage of a Bondkit token’s lifecycle, where trading transitions from the automated bonding curve to a fully decentralized Uniswap v4 pool. This phase begins immediately after migration and represents complete decentralization.

How Migration Works

The Transition Process

When migrateToDex() is called after reaching the target:
  1. Contract Status: Token status changes to TokenStatus.Dex
  2. Uniswap v4 Pool: New pool created with accumulated liquidity
  3. Price Initialization: Initial pool price calculated from bonding curve exit price
  4. Ownership Renouncement: Contract ownership transferred to zero address
  5. Trading Enabled: Full DEX trading begins immediately

Pool Configuration

Automatic Pool Setup:
// Pool is created with these parameters (from migration)
const poolConfig = {
  currency0: tradingToken < bondkitToken ? tradingToken : bondkitToken,
  currency1: tradingToken < bondkitToken ? bondkitToken : tradingToken,
  fee: 3000,        // 0.3% standard fee
  tickSpacing: 60,  // Standard tick spacing
  hooks: customHook // Bondkit-specific hooks
};
Initial Liquidity:
  • Trading Token: All accumulated funds from bonding phase
  • Bondkit Tokens: Calculated amount to match exit price
  • LP Tokens: Split between fee recipient and burned/distributed

Trading in DEX Phase

Trading Options

Standard DEX Trading: Bondkit tokens in DEX phase can be traded using any Uniswap v4 compatible interface, DEX aggregator, or trading platform. SDK Helper (Optional): The SDK provides BondkitSwapService for simplified integration if needed.

Price Discovery & Liquidity

Market-Driven Pricing:
  • No more algorithmic bonding curve
  • Price determined by supply/demand
  • Real-time order book dynamics
  • Subject to market volatility
Liquidity Sources:
// Initial liquidity from migration
const migrationData = {
  tradingTokenLiquidity: "10.0",    // ETH/B3 from bonding
  bondkitTokenLiquidity: "500000",  // Calculated token amount
  initialPrice: "0.00002",          // Price per token
  totalValueLocked: "20.0"          // Combined TVL
};

// Additional liquidity from:
// - Community LPs
// - Incentive programs  
// - Trading fees accumulation

Key Differences from Bonding Phase

Trading Mechanics

AspectBonding PhaseDEX Phase
PricingAlgorithmic curveMarket supply/demand
LiquidityUnlimited (contract mints)Limited pool liquidity
Fees5% to fee recipient0.3% to LPs + protocol
Order TypesBuy/sell onlyFull DEX features
Price ImpactPredictable curveDepends on liquidity depth
MEVNot applicableSubject to MEV

Smart Contract Changes

Status Transition:
// Check current phase
const status = await token.getStatus();

if (status === TokenStatus.Dex) {
  // Use DEX trading methods
  const swapService = new BondkitSwapService(tokenAddress);
  // ... DEX trading code
} else if (status === TokenStatus.Bonding) {
  // Use bonding curve methods
  await token.buy(amount, minTokensOut);
}
Method Availability:
  • token.buy() / token.sell() - Disabled (will revert)
  • ✅ DEX trading via BondkitSwapService
  • ✅ Standard ERC20 functionality continues
  • ✅ Event monitoring for DEX trades

Advanced DEX Features

Custom Hooks Integration

Bondkit tokens on Uniswap v4 include custom hooks for enhanced functionality:
// Hook features (automatically applied)
const hookFeatures = {
  beforeSwap: "Custom fee calculations",
  afterSwap: "Analytics tracking", 
  beforeAddLiquidity: "LP rewards",
  afterRemoveLiquidity: "Exit fee handling"
};

Analytics & Monitoring

Real-Time Data:
import TradingView from "@b3dotfun/sdk/bondkit/components/TradingView";

// Professional charts with DEX data
function DEXTradingInterface({ tokenAddress, tokenSymbol }) {
  return (
    <div className="space-y-6">
      {/* Price chart with DEX data */}
      <TradingView 
        tokenAddress={tokenAddress}
        tokenSymbol={tokenSymbol}
        className="h-96 w-full"
      />
      
      {/* Trading interface */}
      <SwapInterface tokenAddress={tokenAddress} />
    </div>
  );
}
Available Metrics:
  • Real-time price feeds
  • 24h volume and change
  • Liquidity depth
  • Historical OHLCV data
  • Transaction history
  • Holder analytics

Liquidity Provision

Becoming an LP:
// Add liquidity to Bondkit token pool
import { Pool, Position } from "@uniswap/v3-sdk";

const position = new Position({
  pool: bondkitPool,
  liquidity: targetLiquidity,
  tickLower: lowerTick,
  tickUpper: upperTick
});

// Earn trading fees + potential incentives
LP Benefits:
  • Trading Fees: Earn 0.3% of all swap volume
  • Incentive Programs: Potential additional rewards
  • Price Appreciation: Benefit from token growth
  • Impermanent Loss: Standard AMM risks apply

Migration Impact Analysis

For Token Holders

Immediate Effects:
  • ✅ Tokens remain fully transferable
  • ✅ Can trade on open market
  • ✅ No lock-up periods
  • ⚠️ Price now subject to market volatility
  • ⚠️ No guaranteed liquidity (depends on pool depth)
Long-term Benefits:
  • 🚀 Access to larger trading ecosystem
  • 🚀 Integration with DeFi protocols
  • 🚀 Composability with other tokens
  • 🚀 True decentralization achieved

For Projects

Operational Changes:
// Pre-migration: Direct control
await token.buy(amount, minOut);    // ✅ Works
await token.migrateToDex();         // One-time action

// Post-migration: Market-based
await token.buy(amount, minOut);    // ❌ Reverts
await swapService.executeSwap(...); // ✅ Use this instead
New Responsibilities:
  • Community Building: Drive organic trading volume
  • Liquidity Incentives: Encourage LP participation
  • Marketing: Promote token utility and adoption
  • Integration: List on DEX aggregators and platforms

Best Practices for DEX Phase

For Traders

For Developers

Common Questions

Next Steps