DumpsterDumpster Docs
Protocol

Graduation & Migration

What happens when a curve completes, how migration works, and what changes after the token reaches DumpsterSwap.

Protocol

Completion and migration are separate phases

A curve is complete when its tradeable real token reserves reach zero. Migration is a separate permissionless step that packages the remaining liquidity into DumpsterSwap.

These funding checks apply to the program version described in this reference.

Completion vs migration

  • Curve complete means the bonding curve cannot continue normal launch-phase trading.
  • Settled means the completed curve's four recorded reserves have been cleared. Both withdrawal and migration do this.
  • Migrated means migration successfully created the canonical DumpsterSwap pool and moved liquidity into it.

Cleared reserves alone do not prove migration. The program validates the exact canonical pool address, ownership, typed data and immutable identity before treating a settled curve as migrated. A prefunded, System-owned empty account at that address is still uninitialized. An absent pool does not reveal why the curve settled.

Migration flow

Curve is complete

Dumpster requires migration to be enabled, bonding_curve.complete == true and real_token_reserves == 0. Normal pool creation requires unsettled reserves.

Pool bootstrap

Migration transfers all remaining launch tokens from the curve's Token-2022 account into its validated base staging account. The full staged balance funds the pool, including unallocated tokens already held by either account. These additional tokens contribute to locked liquidity; they do not create a refund or LP-token claim for their sender.

Quote funding is the recorded real_gor_reserves minus the current Global pool_migration_fee, wrapped as WGOR. The recorded reserve must exceed that fee before the program debits it. Additional WGOR already in staging does not increase the pool input.

After the base transfer, the program checks the full staged base and selected quote against DumpsterSwap's initial-liquidity requirement: the integer square root of their product must exceed 1,000 raw LP units. Zero staged base or insufficient initial liquidity returns InsufficientMigrationLiquidity (6025) before the pool call; insufficient recorded GOR returns the same error before the fee debit.

Pool creation CPI

Dumpster calls into DumpsterSwap to create the canonical pool at index zero and deposit those amounts. Swap retains its own checks on the actual received balances. The pool keeps the bonding curve's coin creator, not the migration caller.

LP burn and cleanup

Migration burns all LP tokens issued for the initial liquidity. It does not mint or burn the launched token, so that token's supply is unchanged.

The empty base staging and LP accounts close through Token-2022. The wrapped-native WGOR staging account closes through SPL Token. Their remaining lamports, including any WGOR surplus, and any remaining pool-authority lamports go to the configured fee_recipient.

Bonding curve reset

The bonding curve reserves are zeroed and MigrateEvent records the created pool and deposited amounts. Reserve reset settles curve accounting; pool creation establishes migration.

Pool creation, LP burning, cleanup, and curve reset are atomic: if a step fails, migration state changes do not commit. Transaction fees still apply.

Configuration and funding limits

set_params requires a positive token allocation left for the pool, a positive conservative GOR remainder after the selected migration fee, and enough of both to exceed the initial LP minimum. create revalidates stored launch parameters with the same rule. These checks also apply when migration is disabled; external token contributions do not make an invalid launch configuration acceptable.

Both instructions also require a nondefault primary fee_recipient; the optional trading list may be empty. Active migration sends its remaining lamports and account-close proceeds to that primary only and rejects a default primary before funding work. A valid optional trading recipient is not a substitute; see recipient rules.

This is a launch-parameter check, not a guarantee that every later trade calculation is representable or that fee/Swap configuration is ready. Existing-token operations retain their own checks.

The migration fee remains shared and adjustable, not fixed per coin at launch. Raising it can leave an unfinished coin unable to migrate. Before changing it, review unfinished curves against the new fee and account costs.

The fee budget funds staging and pool account-creation deposits through the pool-authority PDA. The caller pays network transaction fees, not an automatic top-up. Liquidity checks do not guarantee that rent costs are covered. A funding rejection calls for reviewing the current fee, reserves and actual custody; retrying unchanged inputs is not recovery. See error handling for SDK classification limits.

Repeated calls and withdrawal

Repeating migration on a settled curve with a valid canonical pool returns a no-op without another migration event, provided the existing gates and account checks pass. The nondefault-primary check for active migration runs after that authenticated no-op; it does not retroactively reject an established migration. The account constraint still requires the supplied recipient to equal the stored primary. Settled reserves without that pool return BondingCurveAlreadySettled (6023) before funding. Invalid pool evidence rejects rather than becoming an already-migrated success.

When migration is disabled, the authorized withdrawal route can settle a completed curve without creating a pool. Withdrawal on an already-settled curve returns the same terminal error, without committing another payout or changing its cooldown. This does not re-enable curve trading or recover a previously withdrawn token's liquidity.

Opening price and fees

The pool opens at the ratio of its funded quote and base reserves, adjusted for token decimals. That ratio is not guaranteed to match the last bonding-curve price. Additional base tokens with unchanged GOR funding lower the opening price and can change the market-cap-based fee tier. Fee rules and configuration remain unchanged; the selected tier and charged amounts may differ.

Integration implications

  • Post-migration trading should route to DumpsterSwap math and accounts, not Dumpster curve accounts.
  • Migration is permissionless while enabled and the curve is eligible, so clients should be ready for a completed, unsettled token to move into AMM trading.
  • For creator handovers after settlement, supply the canonical pool address even when no pool exists. A valid pool requires synchronization; an absent pool permits a curve-only handover. The SDK builders derive these accounts offline.

On this page