Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt

Use this file to discover all available pages before exploring further.

DBC surplus and leftover are the two cleanup amounts that can remain in a virtual pool after a launch reaches the end of its bonding-curve flow.
AmountToken SideWhen It Can ExistReceiver Path
SurplusQuote tokenThe final swap leaves quote reserve above the migration threshold.Protocol, partner, and creator surplus claims.
LeftoverBase tokenA fixed-supply launch has unused base tokens after migration accounting.Configured leftover_receiver.

Surplus

Surplus is the extra quote token amount collected above the migration threshold. The migration threshold defines how much quote reserve is needed to complete the curve. In active markets, the swap that completes the curve may push the quote reserve above that threshold. The extra amount is surplus. Total Surplus=Quote ReserveMigration Quote Threshold\text{Total Surplus} = \text{Quote Reserve} - \text{Migration Quote Threshold} Surplus exists only when the quote reserve is greater than the migration threshold.

Surplus Split

DBC splits surplus into protocol surplus and partner or creator surplus. Partner and Creator Surplus=Total Surplus×80%\text{Partner and Creator Surplus} = \left\lfloor\text{Total Surplus} \times 80\%\right\rfloor Protocol Surplus=Total SurplusPartner and Creator Surplus\text{Protocol Surplus} = \text{Total Surplus} - \text{Partner and Creator Surplus} The partner and creator share is then split using the same creator trading fee percentage configured for the launch. Creator Surplus=Partner and Creator Surplus×Creator Trading Fee Percentage\text{Creator Surplus} = \text{Partner and Creator Surplus} \times \text{Creator Trading Fee Percentage} Partner Surplus=Partner and Creator SurplusCreator Surplus\text{Partner Surplus} = \text{Partner and Creator Surplus} - \text{Creator Surplus} For example, if the migration quote threshold is 100 SOL and the final quote reserve is 105 SOL, the total surplus is 5 SOL. With a 25% creator trading fee percentage, the split is:
RecipientAmount
Partner and creator surplus share4 SOL
Protocol surplus share1 SOL
Creator surplus1 SOL
Partner surplus3 SOL

Claiming Surplus

Surplus can be claimed after the curve is complete. It is not a post-migration-only claim. The virtual pool tracks whether each surplus recipient has already withdrawn, so each claim can happen only once.
ClaimantProgram Behavior
PartnerClaims the partner share of the partner and creator surplus allocation.
CreatorClaims the creator share of the partner and creator surplus allocation.
ProtocolClaims the protocol surplus share through protocol fee claiming.
Surplus is different from trading fees and migration fees. It comes from extra quote reserve above the migration threshold.

Leftover

Leftover is the unused base token amount from a fixed-supply launch after the token has migrated. It exists because fixed-supply launches predefine the total token amount before trading begins. Not every token in that initial supply is necessarily sold through the bonding curve or needed for the migrated DAMM pool. The unused amount is called leftover.
Supply ModelLeftover Behavior
Dynamic supplyUsually no leftover. The launch mints the supply needed for the curve and migration flow.
Fixed supplyLeftover may exist because the launch starts from a predefined supply.
For fixed-supply launches, the config includes:
  • pre_migration_token_supply: the fixed supply available before migration.
  • post_migration_token_supply: the supply expected after migration.
  • leftover_receiver: the address that receives unused base tokens.

Leftover Formula

Leftover=Remaining Base Vault AmountProtocol and Trading Base FeesProtocol Migration Base Fee\text{Leftover} = \text{Remaining Base Vault Amount} - \text{Protocol and Trading Base Fees} - \text{Protocol Migration Base Fee} In product terms, leftover is the part of the fixed launch supply that remains in the virtual pool after migration accounting and after base-token fee balances are reserved. This is more precise than simply subtracting tokens sold from the initial supply. The program withdraws leftover from the base vault only after excluding claimable base fees and protocol migration base fees.

Withdrawing Leftover

Leftover can be withdrawn only after the DBC pool has migrated and the graduated pool has been created. In program terms, the virtual pool migration progress must be CreatedPool. This matters because the program must first know how many base tokens were sold, how many were needed for migration, and how many remain in the virtual pool after fee and migration accounting. Leftover can only be withdrawn once, and it is sent to the configured leftover_receiver.

Example

Imagine a fixed-supply launch sets aside 1 billion tokens for the DBC flow.
  • 650 million tokens are sold through the bonding curve.
  • 300 million tokens are needed for the migrated pool and post-migration allocations.
  • 50 million tokens remain unused.
The 50 million unused tokens are leftover and can be withdrawn to the configured leftover receiver after migration.
For dynamic-supply launches, teams usually focus on the curve supply and migrated pool supply rather than leftover recovery.