Migrate
Collects all funds from curve to init a pool on CoolDEX after.
Instruction INDEX
4
Instruction
Parameters
pda_token_nonce
u8
Nonce for the token owner PDA
Required Accounts
Token mint
Token program
Token owner PDA
Fee account (signer)
Token owner token account
Fee token account
Function Logic
Verifies the fee account is the authorized admin
Verifies the PDA token owner matches the expected PDA for the token mint
Verifies that the token sale is finalized (status = 2)
Marks the token as migrated (status = 3)
Determines the amount of tokens in the bonding curve vault
Transfers all remaining tokens to the fee account
Closes the token account
Transfers the remaining SOL in the bonding curve (minus a small amount for rent) to the fee account
Notes
Migration can only be performed by the admin fee account
The token must be in the finalized state (status = 2)
All remaining tokens and SOL are extracted from the bonding curve
After migration, the token can be listed on the CoolDEX with a liquidity pool
The extracted tokens and SOL will be used to create the initial liquidity pool
Last updated