# Migration Process

The migration process is a key feature of the Something Cool platform, enabling tokens to transition smoothly from the SC Bonding Curve bonding curve to the CoolDEX. This page explains the complete migration process, requirements, and technical details.

## Migration Overview

Migration is a two-step process:

1. **Finalization**: The token sale on SC Bonding Curve must be finalized
2. **Migration Execution**: The token and its liquidity are transferred to CoolDEX

## Step 1: Finalization

### Automatic Finalization

A token sale is automatically finalized when:

* The available token amount in the bonding curve falls below the POOL\_MIGRATION\_RESERVES threshold
* Current threshold: 2,069,000,000 tokens

When this occurs, the token's status is automatically changed to "Finalized" (status = 2).

### Finalization Effects

Once finalized:

* Trading on the bonding curve is disabled
* The token is marked as ready for migration
* No more buys or sells can occur on SC Bonding Curve

## Step 2: Migration Execution

### Requirements

To execute migration:

* The token must be in the "Finalized" state (status = 2)
* The migration must be initiated by the admin fee account
* The proper accounts must be provided to the migration instruction

### Migration Process

1. **Extract Tokens and SOL**:
   * The `Migrate` function is called on the SC Bonding Curve contract
   * Remaining tokens in the bonding curve are transferred to the fee account
   * SOL balance (minus a small rent amount) is transferred to the fee account
   * Token status is changed to "Migrated" (status = 3)
2. **Create DEX Pool**:
   * In a separate transaction, a pool is created on CoolDEX using the extracted tokens and SOL
   * The `Initialize2` function is called on the CoolDEX contract
   * Initial liquidity is established with the migrated assets
   * Token fee parameters are applied according to the original token configuration

### Post-Migration

After successful migration:

* The token is tradable on CoolDEX with its specified fee structure
* If it's a community contribution token, the fee distribution mechanism is activated
* LP tokens for the pool are issued to the platform

## Migration Benefits

The migration process offers several benefits:

1. **Smooth Transition**: Users experience a seamless transition from initial token distribution to active trading
2. **Liquidity Preservation**: Liquidity accumulated during the bonding curve phase is transferred to the DEX
3. **Fee Customization**: The token's predefined fee structure is applied on the DEX
4. **Price Continuity**: The initial DEX price closely matches the final bonding curve price

This two-phase approach provides a complete token lifecycle, from initial distribution through the bonding curve to active trading on a liquidity pool DEX.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.something.cool/migration-process/index.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
