+
+
+ {children || (
+
+ )}
+
+
+ {title && {title}
}
+ {content}
+
+
+
+ );
+}
+
+// DBC Config Tooltips from Meteora Docs
+export const DBC_TOOLTIPS = {
+ buildCurveMode: {
+ title: "Build Curve Mode",
+ modes: {
+ "0": {
+ label: "Build Curve",
+ description: "Useful when you want to create a curve configuration with specific migrationQuoteThreshold and percentageSupplyOnMigration. The percentage specifies the ratio of total token supply that will be migrated to the LP pool after graduation."
+ },
+ "1": {
+ label: "Market Cap Based",
+ description: "Useful when you want to create a curve configuration with specific initial token price and migration price. Use this when you have defined initial and migration market cap targets for your token."
+ },
+ "2": {
+ label: "Two Segments",
+ description: "Creates a dual constant product curve structure. Requires initialMarketCap, migrationMarketCap and percentageSupplyOnMigration to define the two-segment bonding curve."
+ },
+ "3": {
+ label: "Liquidity Weights",
+ description: "Useful when you want to create a curve configuration with unique price action (flat, exponential, etc.). Liquidity weights work as exponents controlling the thickness of segments, allowing customization of price dynamics across curve segments."
+ }
+ }
+ },
+ percentageSupplyOnMigration: "Percentage of total token supply that will be migrated to the liquidity pool after graduation. Value from 0-100%.",
+ migrationQuoteThreshold: "Minimum amount of quote tokens required to qualify for migration. Set minimum 750 USD for automatic migration via migration keepers.",
+ initialMarketCap: "Market cap of DBC token pool when pool is created, specified in quoteMint (not lamports).",
+ migrationMarketCap: "Market cap of DBC token pool when pool graduates, specified in quoteMint (not lamports).",
+ liquidityWeights: "Array of 16 liquidity weights for each liquidity segment in the curve. Weights work as exponents to control price action.",
+ migrationOption: {
+ title: "Migration Option",
+ options: {
+ "0": "DAMM v1 - Pool will be migrated to DAMM v1 pool. Post-graduation pools use Output Token collection mode.",
+ "1": "DAMM v2 - Pool will be migrated to DAMM v2 pool. Uses Quote Token collection; dynamic fees add 20% to base fees."
+ }
+ },
+ migrationFeeOption: {
+ title: "Migration Fee Option",
+ description: "Predefined LP fee tiers from 0.25% to 6%. Option 6 (Customizable) is only available if migrationOption is set to DAMM v2."
+ },
+ dynamicFeeEnabled: "If true, dynamic fee will add 20% of minimum base fee to the total fee.",
+ activationType: {
+ title: "Activation Type",
+ options: {
+ "0": "Slot - Pool time is measured in Slots (1 slot = 400ms)",
+ "1": "Timestamp - Pool time is measured in Timestamps (seconds)"
+ }
+ },
+ collectFeeMode: {
+ title: "Collect Fee Mode",
+ options: {
+ "0": "Quote Token - Pre-graduation fees are collected as Quote Token",
+ "1": "Output Token - Pre-graduation fees are collected as Output Token"
+ }
+ },
+ tokenType: {
+ title: "Token Type",
+ options: {
+ "0": "SPL - Standard SPL token",
+ "1": "Token 2022 - Token following the new Token-2022 standard"
+ }
+ },
+ baseFeeMode: {
+ title: "Base Fee Mode",
+ modes: {
+ "0": "Linear Fee Scheduler - Fees decrease linearly over time",
+ "1": "Exponential Fee Scheduler - Fees decrease exponentially",
+ "2": "Rate Limiter - Limits transaction rate with dynamically increasing fees"
+ }
+ },
+ feeScheduler: {
+ startingFeeBps: "Starting fee in basis points (100 bps = 1%). Maximum 99% (9900 bps).",
+ endingFeeBps: "Ending fee in basis points. Minimum 0.01% (1 bps).",
+ numberOfPeriod: "Number of periods for fees to decrease from starting to ending.",
+ totalDuration: "Total duration (if activationType=0: duration/0.4, if =1: duration in seconds)"
+ },
+ rateLimiter: {
+ baseFeeBps: "Base fee in basis points. Maximum 99% (9900 bps).",
+ feeIncrementBps: "Fee increment when exceeding reference amount. Maximum = 9900 bps - baseFeeBps.",
+ referenceAmount: "Reference amount (not lamports) to trigger fee increment.",
+ maxLimiterDuration: "Maximum limiter duration (if activationType=0: duration/0.4, if =1: duration)"
+ },
+ vesting: {
+ totalLockedVestingAmount: "Total amount of baseMint tokens locked in vesting. Only starts after pool has migrated.",
+ numberOfVestingPeriod: "Total number of vesting periods.",
+ cliffUnlockAmount: "Amount of tokens unlocked immediately after cliff period (in lamports).",
+ totalVestingDuration: "Total vesting duration (in seconds).",
+ cliffDurationFromMigrationTime: "Cliff time from migration (in seconds). No tokens are unlocked during this period."
+ },
+ lpDistribution: {
+ partnerLpPercentage: "Percentage of unlockable LP tokens for partner. Can be withdrawn after pool migrates.",
+ creatorLpPercentage: "Percentage of unlockable LP tokens for creator. Can be withdrawn after pool migrates.",
+ partnerLockedLpPercentage: "Percentage of permanently locked LP tokens for partner. Cannot be withdrawn after migration.",
+ creatorLockedLpPercentage: "Percentage of permanently locked LP tokens for creator. Cannot be withdrawn after migration.",
+ creatorTradingFeePercentage: "Percentage of bonding curve trading fees shared to creator (0% to 100%). 0% means all trading fees go to partner.",
+ leftover: "Amount of leftover tokens in bonding curve (can be claimed after pool migrates).",
+ note: "Total of 4 LP percentages (partner + creator + partnerLocked + creatorLocked) must equal 100%."
+ },
+ migrationFee: {
+ feePercentage: "Percentage fee taken from migration quote threshold when pool migrates (0% to 50%).",
+ creatorFeePercentage: "Percentage of migrationFee.feePercentage that creator can claim (0% to 100%)."
+ },
+ migratedPoolFee: {
+ description: "Only configure when migrationOption = DAMM v2 (1) and migrationFeeOption = Customizable (6).",
+ collectFeeMode: "0: Quote Token, 1: Output Token",
+ dynamicFee: "0: Disabled, 1: Enabled",
+ poolFeeBps: "Pool fee in basis points. Minimum 10, maximum 1000 bps."
+ },
+ tokenUpdateAuthority: {
+ title: "Token Update Authority",
+ options: {
+ "0": "Creator Update Authority - Creator controls metadata updates",
+ "1": "Immutable - Metadata is frozen; mint authority is revoked",
+ "2": "Partner Update Authority - Partner controls metadata",
+ "3": "Creator Update & Mint Authority - Creator controls metadata and minting",
+ "4": "Partner Update & Mint Authority - Partner controls metadata and minting"
+ }
+ },
+ leftoverReceiver: "Wallet address that will receive leftover tokens from bonding curve after migration.",
+ feeClaimer: "Wallet address that will receive collected fees."
+};
diff --git a/app/src/types/token.ts b/app/src/types/token.ts
index 0a189a9..286c674 100644
--- a/app/src/types/token.ts
+++ b/app/src/types/token.ts
@@ -25,30 +25,53 @@ export const CustomMintSchema = z.object({
totalTokenSupply: z.number().positive(),
tokenBaseDecimal: z.number().min(0),
tokenQuoteDecimal: z.number().min(0),
+ tokenQuoteAddress: z.string().optional(),
+ tags: z.array(z.string()).optional(),
}),
// --- DBC CONFIGURATION ---
dbcConfig: z.object({
buildCurveMode: z.enum(["0", "1", "2", "3"]),
- percentageSupplyOnMigration: z.number().min(0).max(100),
- migrationQuoteThreshold: z.number().positive(),
+ // Mode 0: buildCurve
+ percentageSupplyOnMigration: z.number().min(0).max(100).optional(),
+ migrationQuoteThreshold: z.number().positive().optional(),
+ // Mode 1, 2, 3: Market Cap Based
+ initialMarketCap: z.number().positive().optional(),
+ migrationMarketCap: z.number().positive().optional(),
+ // Mode 3: Liquidity Weights
+ liquidityWeights: z.array(z.number()).length(16).optional(),
+ // General settings
migrationOption: z.enum(["0", "1"]),
dynamicFeeEnabled: z.boolean(),
activationType: z.enum(["0", "1"]),
collectFeeMode: z.enum(["0", "1"]),
- migrationFeeOption: z.enum(["0", "1", "2", "3", "4", "5"]),
+ migrationFeeOption: z.enum(["0", "1", "2", "3", "4", "5", "6"]),
tokenType: z.enum(["0", "1"]),
+ // Migrated Pool Fee (only for DAMM v2 + Customizable)
+ migratedPoolFee: z.object({
+ collectFeeMode: z.enum(["0", "1"]),
+ dynamicFee: z.enum(["0", "1"]),
+ poolFeeBps: z.number().min(10).max(1000),
+ }).optional(),
}),
// --- FEE CONFIGURATION ---
baseFeeParams: z.object({
baseFeeMode: z.enum(["0", "1", "2"]),
+ // Mode 0, 1: Fee Scheduler
feeSchedulerParam: z.object({
startingFeeBps: z.number().min(0),
endingFeeBps: z.number().min(0),
numberOfPeriod: z.number(),
totalDuration: z.number(),
- }),
+ }).optional(),
+ // Mode 2: Rate Limiter
+ rateLimiterParam: z.object({
+ baseFeeBps: z.number().min(0).max(9900),
+ feeIncrementBps: z.number().min(0),
+ referenceAmount: z.number().min(0),
+ maxLimiterDuration: z.number().min(0),
+ }).optional(),
}),
// --- VESTING CONFIGURATION ---
@@ -66,8 +89,22 @@ export const CustomMintSchema = z.object({
creatorLpPercentage: z.number().min(0).max(100),
partnerLockedLpPercentage: z.number().min(0).max(100),
creatorLockedLpPercentage: z.number().min(0).max(100),
+ creatorTradingFeePercentage: z.number().min(0).max(100),
+ leftover: z.number().min(0),
+ // Migration Fee (optional)
+ migrationFee: z.object({
+ feePercentage: z.number().min(0).max(50),
+ creatorFeePercentage: z.number().min(0).max(100),
+ }).optional(),
}),
+ // --- MIGRATED POOL FEE (only for DAMM v2 + Custom fee) ---
+ migratedPoolFee: z.object({
+ collectFeeMode: z.enum(["0", "1"]),
+ dynamicFee: z.enum(["0", "1"]),
+ poolFeeBps: z.number().min(10).max(1000),
+ }).optional(),
+
// --- AUTHORITY CONFIGURATION ---
authority: z.object({
tokenUpdateAuthority: z.enum(["0", "1", "2", "3", "4"]),