> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rekthub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Token Migration (Graduation)

> How your token graduates from bonding curve to DEX

## What Is Token Graduation?

Migration, we call it **graduation**, is when your token moves from RektHub's bonding curve to a decentralized exchange (DEX) like Uniswap or PancakeSwap. It's not leaving RektHub; it's your token economy maturing into its next phase.

Think of it as your token's "graduation day" from the fair launch curve to the big leagues of DeFi liquidity.

***

## When Can You Graduate?

Your token is eligible for graduation when **850 million tokens have been sold** from the bonding curve.

<Steps>
  <Step title="850M Tokens Sold">
    All tradeable supply has been purchased from the curve
  </Step>

  <Step title="Token Marked as Bonded">
    Trading on the curve stops automatically
  </Step>

  <Step title="Liquidity Accumulated">
    Curve has accumulated native currency (mathematically determined by k)
  </Step>

  <Step title="Ready for Graduation">
    150M reserved tokens + accumulated liquidity ready to migrate
  </Step>
</Steps>

<Warning>
  **You cannot graduate early.** The 850M requirement ensures sufficient
  liquidity for a healthy DEX pool and rewards creators who build genuine demand.
</Warning>

<Accordion title="What's ready to migrate at bonding?">
  ```javascript theme={null}
  // Bonding state (using 1.5 ETH virtual reserve)
  {
    realTokenReserves: 0,              // All 850M sold
    realNativeReserves: ~5.72 ETH,     // Determined by constant k
    reservedTokens: 150,000,000,       // Untouched supply for DEX
    accumulatedCreatorFees: ~0.75 ETH, // Your trading fees (claimable)
    status: "bonded",
    readyForGraduation: true
  }
  ```

  <Info>
    **Note:** Values shown use 1.5 ETH virtual reserve (production setting for ETH-based chains). Other chains with different native tokens will have equivalent amounts in their respective currencies.
  </Info>
</Accordion>

***

## The Graduation Process

### 1. Bonding Achieved

When the 850 millionth token is sold, your token automatically enters the **"bonded" state**.

<CardGroup cols={2}>
  <Card title="Trading Stops" icon="ban">
    No more buys or sells on the bonding curve
  </Card>

  <Card title="Liquidity Locked" icon="lock">
    All accumulated native currency ready for migration
  </Card>

  <Card title="Reserved Supply" icon="vault">
    150M tokens prepared for DEX liquidity
  </Card>

  <Card title="Creator Notified" icon="bell">
    Choose your graduation destination
  </Card>
</CardGroup>

```solidity theme={null}
// Bonding event emitted
event TokenBonded(address indexed tokenAddress);

// Curve state
s_bonded = true;
s_realTokenReserves = 0;
s_realNativeReserves = ~5.72 ETH;  // For 1.5 ETH virtual reserve
```

### 2. Choose Your DEX

As the creator, you control where your token graduates (assuming RektHub supports that DEX).

<Tabs>
  <Tab title="Uniswap">
    **Best for:** Ethereum, Arbitrum, Base, Polygon

    **Pros:**

    * Deep liquidity across chains
    * Proven infrastructure
    * High trust and volume
  </Tab>

  <Tab title="PancakeSwap">
    **Best for:** BSC, Ethereum, Arbitrum

    **Pros:**

    * Multi-chain support
    * Lower fees on BSC
    * Large user base
  </Tab>

  <Tab title="Aerodrome">
    **Best for:** Base

    **Pros:**

    * Base-native DEX
    * Optimized routing
    * Growing ecosystem
  </Tab>

  <Tab title="More DEXes">
    Additional DEX integrations:

    * Chain-specific DEXes per network
    * More being added regularly

    [Request a DEX](https://t.me/rekthub_io)
  </Tab>
</Tabs>

<Tip>
  **How to choose:** Consider where your community trades, which chain has lowest
  fees, and where you want long-term liquidity.
</Tip>

### 3. Migration Fee Charged

RektHub charges a **12% fee** on the total liquidity being migrated. This fee is split between you and the platform.

**Migration Fee Breakdown (using 1.5 ETH virtual reserve example):**

```mermaid theme={null}
pie title "5.72 ETH Liquidity Distribution"
    "To DEX (88%)" : 5.03
    "Creator Fee (7.2%)" : 0.41
    "Platform Fee (4.8%)" : 0.27
```

<CodeGroup>
  ```javascript Fee Calculation theme={null}
  // Bonding liquidity: ~5.72 ETH (determined by k)
  const bondingLiquidity = 5.72;

  // Calculate 12% migration fee
  const migrationFee = bondingLiquidity * 0.12; // 0.69 ETH

  // Split fee
  const creatorShare = migrationFee * 0.6; // 0.41 ETH (60%)
  const platformShare = migrationFee * 0.4; // 0.27 ETH (40%)

  // Net liquidity to DEX
  const liquidityToDEX = bondingLiquidity - migrationFee; // 5.03 ETH

  // Your total earnings
  const tradingFees = 0.75; // Accumulated during bonding
  const totalEarnings = tradingFees + creatorShare; // 1.16 ETH total
  ```

  ```solidity On-Chain Execution theme={null}
  // Migration function (simplified pseudo-code)
  function migrate(address migrator) external {
      uint256 nativeLiquidity = s_realNativeReserves;

      // Calculate fees
      uint256 migrationFee = nativeLiquidity * 1200 / 10000;  // 12%
      uint256 creatorFee = migrationFee * 6000 / 10000;       // 60%
      uint256 platformFee = migrationFee - creatorFee;        // 40%
      uint256 netLiquidity = nativeLiquidity - migrationFee;

      // Update state
      s_graduated = true;
      s_accumulatedCreatorFees += creatorFee;

      // Execute migration
      // ... (see full implementation on GitHub)
  }
  ```
</CodeGroup>

<Accordion title="Why 60% to creator?">
  Getting to bonding means you built **real demand**. You earned this through:

  * Community engagement
  * Marketing efforts
  * Delivering value
  * Building trust

  The 60% creator share recognizes that achievement. It's a reward for success.
</Accordion>

### 4. Liquidity Pool Created

The remaining liquidity (5.03 ETH + 150M tokens in our example) is sent to your chosen DEX where a liquidity pool is automatically created.

```mermaid theme={null}
sequenceDiagram
    participant Curve as Bonding Curve
    participant Migrator as DEX Migrator
    participant DEX as Uniswap/PancakeSwap
    participant LP as Liquidity Pool

    Curve->>Migrator: Send 5.03 ETH + 150M tokens
    Migrator->>DEX: Create pool
    DEX->>LP: Mint LP tokens
    LP->>LP: Lock/burn LP tokens
    LP-->>Curve: Return pool address
    Curve->>Curve: Mark as graduated
```

<Info>
  **Note:** This flow represents the general migration model for EVM chains.
  Implementation details vary per chain and DEX, but the core concept remains
  consistent. Check chain-specific documentation for exact migration mechanisms.
</Info>

<Steps>
  <Step title="Assets Transferred">
    5.03 ETH + 150M tokens sent to migrator contract
  </Step>

  <Step title="Pool Created">
    Migrator calls DEX router to create liquidity pool
  </Step>

  <Step title="LP Tokens Minted">
    DEX mints LP tokens representing pool ownership
  </Step>

  <Step title="LP Tokens Locked/Burned">
    LP tokens typically burned or locked forever (no rug pull risk)
  </Step>

  <Step title="Trading Opens">Token immediately tradeable on the DEX</Step>
</Steps>

### 5. Price Discovery After Graduation

When 150M tokens pair with the accumulated ETH on the DEX, there's typically upward price movement. The exact multiplier depends on the accumulated liquidity and market conditions.

#### Understanding the Price Dynamics

<AccordionGroup>
  <Accordion title="New Supply Unlocked" icon="unlock">
    150M tokens become available that weren't tradeable before, often attracting new buyers.
  </Accordion>

  <Accordion title="Liquidity Depth" icon="droplet">
    The accumulated ETH creates confidence. Traders see real liquidity and feel comfortable entering positions.
  </Accordion>

  <Accordion title="Market Discovery" icon="chart-line">
    New trading venue means new market dynamics. The DEX often finds a different equilibrium price than the curve's final price.
  </Accordion>
</AccordionGroup>

<Tip>
  This rewards early believers who bought on the curve at lower prices. They can
  exit into DEX liquidity at potentially higher prices.
</Tip>

#### Example Price Calculation

<Tabs>
  <Tab title="Curve Final State">
    Using 1.5 ETH virtual reserve:

    * 850M tokens sold
    * \~5.72 ETH accumulated
    * Virtual reserves: \~7.22 ETH, 223M tokens
    * Final curve price: \~0.00000324 ETH per token
  </Tab>

  <Tab title="DEX Launch Price">
    After 12% fee:

    * 150M tokens added
    * 5.03 ETH added
    * Initial DEX price: 5.03 ETH / 150M = \~0.0000000335 ETH per token
    * Price ratio compared to curve: Varies based on exact reserves
  </Tab>

  <Tab title="Market Behavior">
    Post-graduation dynamics:

    * Early trading activity determines price discovery
    * Market cap now visible on DEX aggregators
    * Community engagement affects price action
    * Typical stabilization within 24-48 hours
  </Tab>
</Tabs>

<Info>
  **Important:** Price multiples shown are examples using specific virtual
  reserve values. Actual graduation price behavior depends on your chain's
  parameters, accumulated liquidity, and market conditions. These examples
  illustrate the concept, not guaranteed outcomes.
</Info>

***

## Post-Graduation

### Your Token's New Life

After graduation, your token:

<CardGroup cols={2}>
  <Card title="Lives on DEX" icon="shop">
    Trades on the DEX you chose
  </Card>

  <Card title="Fees Claimable" icon="coins">
    Your accumulated fees remain claimable anytime
  </Card>

  <Card title="Creator Status" icon="crown">
    Still your token, still your creation
  </Card>

  <Card title="Independent Trading" icon="chart-simple">
    Market determines all trading activity
  </Card>
</CardGroup>

### What You Control

<Tabs>
  <Tab title="Metadata">
    Update token image, description, socials anytime through RektHub
  </Tab>

  <Tab title="Fee Claims">
    All accumulated fees remain claimable forever:

    ```javascript theme={null}
    // Check fees
    const [creator, fees] = await curve.getCreatorInfo();

    // Claim anytime (even years later)
    await curve.claimCreatorFees();
    ```
  </Tab>
</Tabs>

### What You Don't Control

<Warning>
  **Intentional protections:** - **Liquidity:** Once migrated, liquidity is
  locked/burned on DEX (no rug pulls) - **Trading:** Anyone can trade on the DEX
  independently - **Price:** Market determines price through DEX mechanics
</Warning>

***

## Migration Fee Structure (Detailed)

### Base Fee: 12% of Liquidity

The fee is applied to **total native currency** being migrated.

**Migration Fee Examples (using different virtual reserves):**

| Virtual Reserve | Bonding Liquidity | Migration Fee (12%) | Creator Gets (60%) | Platform Gets (40%) | To DEX (88%)        |
| --------------- | ----------------- | ------------------- | ------------------ | ------------------- | ------------------- |
| 1.5 ETH         | \~5.72 ETH        | \~0.69 ETH          | \~0.41 ETH         | \~0.27 ETH          | \~5.03 ETH + 150M   |
| 30 ETH          | \~114.35 ETH      | \~13.72 ETH         | \~8.23 ETH         | \~5.49 ETH          | \~100.63 ETH + 150M |
| 6 BNB           | \~22.87 BNB       | \~2.74 BNB          | \~1.65 BNB         | \~1.10 BNB          | \~20.13 BNB + 150M  |
| 30k MATIC       | \~114,350 MATIC   | \~13,722 MATIC      | \~8,233 MATIC      | \~5,489 MATIC       | \~100,628 + 150M    |

<Info>
  **Note:** Bonding liquidity is mathematically determined by the constant
  product formula. Every token using the same virtual reserve will accumulate
  approximately the same amount at bonding.
</Info>

### Who Pays?

**Nobody directly.** The fee comes from the accumulated liquidity in the bonding curve. Users already contributed through trading during the bonding phase.

### When Is It Charged?

At the exact moment of migration. The smart contract:

<Steps>
  <Step title="Calculate Total Liquidity">
    Get realNativeReserves from curve
  </Step>

  <Step title="Deduct 12% Fee">Calculate migration fee</Step>
  <Step title="Split 60/40">Creator gets 60%, Platform gets 40%</Step>

  <Step title="Send Remaining to DEX">
    88% of liquidity + 150M tokens create LP
  </Step>
</Steps>

**All in one transaction.** No manual steps, no delays.

***

## Technical Implementation

### Migration Function

```solidity theme={null}
// Simplified pseudo-code showing core logic
function migrate(address migrator) external returns (...) {
    // 1. Authorization and state checks
    require(msg.sender == s_factory, "Only factory");
    require(s_bonded && !s_graduated, "Invalid state");

    // 2. Get liquidity amounts
    uint256 nativeLiquidity = s_realNativeReserves;
    uint256 tokenLiquidity = 150_000_000 * 10**18;

    // 3. Calculate fees (12% migration, split 60/40)
    uint256 migrationFee = ...
    uint256 creatorFee = ...
    uint256 platformFee = ...
    uint256 netLiquidity = ...

    // 4. Update state and execute transfers
    s_graduated = true;
    s_accumulatedCreatorFees += creatorFee;

    // ... transfer logic
    // ... migrator call
    // ... event emission
}
```

<Info>
  This is a simplified representation. Full implementation includes error
  handling, event emissions, and chain-specific logic. See the complete code on
  GitHub for your target chain.
</Info>

### DEX Migrator Interface

Each DEX integration implements a standard migration interface. The exact interface and implementation details vary per chain and DEX.

For specific migrator implementations and interfaces, check the chain integration contracts documentation for your target chain.

***

## Who Triggers Graduation?

**RektHub's automated systems** handle graduation once your token bonds and you've selected your preferred DEX.

**Process:**

1. Token bonds (850M sold)
2. Creator selects preferred DEX through dashboard
3. RektHub's backend validates the request
4. Migration executes automatically on-chain
5. Creator receives confirmation

<Info>
  Automated migration ensures smooth execution without requiring manual contract
  interaction from creators. This prevents errors in high-stakes transactions
  while maintaining the security of your accumulated liquidity.
</Info>

***

## Common Questions

<AccordionGroup>
  <Accordion title="Can I graduate early?" icon="question">
    No. The 850M requirement is hardcoded. It ensures sufficient liquidity and
    fair reward for community building.
  </Accordion>

  <Accordion title="What if I don't want to graduate?" icon="ban">
    You must graduate once bonded. The bonding curve stops trading at 850M sold.
    Your token needs DEX liquidity to remain tradeable.
  </Accordion>

  <Accordion title="Can I choose multiple DEXes?" icon="layer-group">
    Not in one migration. You choose one DEX. After graduation, anyone can create
    additional pools elsewhere if they want.
  </Accordion>

  <Accordion title="What happens to my creator fees?" icon="coins">
    They remain in your bonding curve contract. Claim anytime with
    `claimCreatorFees()`. Graduation doesn't affect accumulated fees.
  </Accordion>

  <Accordion title="Can I rug pull after graduation?" icon="skull">
    No. LP tokens are burned or locked by the migrator contract. You cannot pull liquidity.
  </Accordion>

  <Accordion title="What if migration fails?" icon="exclamation-triangle">
    The smart contract reverts the entire transaction. Liquidity stays in the
    curve, state doesn't change, you can try again.
  </Accordion>
</AccordionGroup>

***

## Graduation Checklist

Before your token graduates:

<Steps>
  <Step title="850M Tokens Sold">
    Automatic requirement, just wait for bonding
  </Step>

  <Step title="Community is Active">
    Engaged holders, strong social presence
  </Step>

  <Step title="Metadata Updated">
    Token image, description, socials all current
  </Step>

  <Step title="DEX Chosen">Decided where you want to graduate</Step>

  <Step title="Understand LP Locking">
    LP tokens will be locked/burned, no rug pull possible
  </Step>

  <Step title="Ready to Celebrate">Graduation is a milestone!</Step>
</Steps>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Fee Structure" icon="coins" href="/getting-started/fee-structure">
    Understand your migration fee earnings
  </Card>

  <Card title="Bonding Curves" icon="chart-area" href="/getting-started/bonding-curves">
    Learn how tokens reach bonding
  </Card>

  <Card title="Join Community" icon="telegram" href="https://t.me/rekthub_io">
    Connect with other creators
  </Card>
</CardGroup>

<Note>
  **Ready to graduate?** When your token bonds, select your preferred DEX through
  the dashboard and RektHub will handle the migration.
</Note>
