Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scaffolds/fun-launch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@iconify-json/solar": "^1.2.2",
"@iconify/tailwind": "^1.2.0",
"@jup-ag/wallet-adapter": "^0.2.3",
"@meteora-ag/dynamic-bonding-curve-sdk": "^1.5.2",
"@meteora-ag/dynamic-bonding-curve-sdk": "^1.5.3",
"@solana/spl-token": "^0.4.14",
"@solana/spl-token-registry": "^0.2.4574",
"@solana/wallet-adapter-wallets": "^0.19.33",
Expand Down
196 changes: 105 additions & 91 deletions studio/config/dbc_config.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -69,112 +69,126 @@
// "percentageSupplyOnMigration": 20, // percentage of total token supply to be migrated

/* Only use the following parameters for buildCurveMode: 5 (buildCurveWithCustomSqrtPrices)
* 1. sqrtPrices - array of custom sqrt prices (must be in ascending order, at least 2 elements)
* 2. liquidityWeights - optional weights for each segment (length must be sqrtPrices.length - 1)
* 1. prices - array of decimal prices in ascending order (at least 2 elements).
* 2. liquidityWeights - optional weights for each segment (length must be prices.length - 1)
*/
// "sqrtPrices": [], // array of custom sqrt prices (ascending order). First = starting price (pMin), Last = migration price (pMax)
// "prices": [0.00001, 0.0005, 0.001, 0.01], // array of decimal prices (ascending order). First = starting price, Last = migration price
// "liquidityWeights": [1, 2, 3], // optional: weights for each segment. If omitted, liquidity is distributed evenly

"totalTokenSupply": 1000000000, // total token supply (not in lamports)
"migrationOption": 1, // 0 - Migrate to DAMM v1 | 1 - Migrate to DAMM v2
"tokenBaseDecimal": 6, // token base decimal
"tokenQuoteDecimal": 9, // token quote decimal
"lockedVestingParams": {
"totalLockedVestingAmount": 0, // total locked vesting amount (not in lamports)
"numberOfVestingPeriod": 0, // number of vesting period
"cliffUnlockAmount": 0, // cliff unlock amount (not in lamports)
"totalVestingDuration": 0, // total vesting duration (in seconds)
"cliffDurationFromMigrationTime": 0 // cliff duration from migration time (in seconds)
/* Token Configuration */
"token": {
"totalTokenSupply": 1000000000, // total token supply (not in lamports)
"tokenBaseDecimal": 6, // token base decimal
"tokenQuoteDecimal": 9, // token quote decimal
"tokenType": 0, // 0 - SPL | 1 - Token 2022
"tokenUpdateAuthority": 1, // 0 - CreatorUpdateAuthority | 1 - Immutable | 2 - PartnerUpdateAuthority | 3 - CreatorUpdateAndMintAuthority | 4 - PartnerUpdateAndMintAuthority
"leftover": 0 // leftover tokens in the bonding curve (claimable once pool migrates)
},

/* Fee Configuration */
"fee": {
"baseFeeParams": {
"baseFeeMode": 0, // 0 - Fee Scheduler: Linear | 1 - Fee Scheduler: Exponential | 2 - Rate Limiter
"feeSchedulerParam": {
"startingFeeBps": 100, // starting fee (max 99% fee === 9900 bps)
"endingFeeBps": 100, // ending fee (minimum 0.01% fee === 1 bps)
"numberOfPeriod": 0, // number of period
"totalDuration": 0 // total duration (If activationType is 0 (slots), totalDuration = duration / 0.4 | If activationType is 1 (timestamp), totalDuration = duration)
}
/*
"baseFeeMode": 2, // 2 - Rate Limiter
"rateLimiterParam": {
"baseFeeBps": 200, // base fee (max 99% base fee === 9900 bps)
"feeIncrementBps": 200, // fee increment (max fee increment = 9900 bps - baseFeeBps)
"referenceAmount": 1, // reference amount (not in lamports)
"maxLimiterDuration": 3600 // if activationType is 0 (slots), maxLimiterDuration = duration / 0.4, if activationType is 1 (timestamp), maxLimiterDuration = duration)
}
*/
},
"dynamicFeeEnabled": true, // If true, dynamic fee will add 20% of minimum base fee to the total fee.
"collectFeeMode": 0, // 0 - Quote Token | 1 - Output Token
"creatorTradingFeePercentage": 50, // Bonding curve trading fee sharing (0% to 100%) - 0% means all trading fees go to the partner
/* Pool Creation Fee
* Fee charged to token creators when they create a pool using this config.
* Partner claims 90% via claimPartnerPoolCreationFee(), Meteora claims 10%.
* Set to 0 for no fee, or between 0.001 SOL and 100 SOL.
*/
"poolCreationFee": 0, // Pool creation fee in SOL (e.g., 0.1 for 0.1 SOL)
"enableFirstSwapWithMinFee": false // If true, the first swap on the pool will use the minimum fee instead of the starting fee (useful for creator bundled buys)
},
"baseFeeParams": {
"baseFeeMode": 0, // 0 - Fee Scheduler: Linear | 1 - Fee Scheduler: Exponential | 2 - Rate Limiter
"feeSchedulerParam": {
"startingFeeBps": 100, // starting fee (max 99% fee === 9900 bps)
"endingFeeBps": 100, // ending fee (minimum 0.01% fee === 1 bps)
"numberOfPeriod": 0, // number of period
"totalDuration": 0 // total duration (If activationType is 0 (slots), totalDuration = duration / 0.4 | If activationType is 1 (timestamp), totalDuration = duration)

/* Migration Configuration */
"migration": {
"migrationOption": 1, // 0 - Migrate to DAMM v1 | 1 - Migrate to DAMM v2
"migrationFeeOption": 3, // 0 - LP Fee 0.25% | 1 - LP Fee 0.3% | 2 - LP Fee 1% | 3 - LP Fee 2% | 4 - LP Fee 4% | 5 - LP Fee 6% | 6 - Customizable
"migrationFee": {
"feePercentage": 0, // Percentage of fee taken from migration quote threshold once pool migrates (0% to 50%)
"creatorFeePercentage": 0 // Percentage of the migrationFee.feePercentage claimable by creator (0% to 100%)
}
/*
"baseFeeMode": 2, // 2 - Rate Limiter
"rateLimiterParam": {
"baseFeeBps": 200, // base fee (max 99% base fee === 9900 bps)
"feeIncrementBps": 200, // fee increment (max fee increment = 9900 bps - baseFeeBps)
"referenceAmount": 1, // reference amount (not in lamports)
"maxLimiterDuration": 3600 // if activationType is 0 (slots), maxLimiterDuration = duration / 0.4, if activationType is 1 (timestamp), maxLimiterDuration = duration)
}
*/
/* Migrated Pool Fee (DAMM v2 only)
* Configure migratedPoolFee when using migrationFeeOption: 6 (Customizable) or when configuring marketCapFeeSchedulerParams.
* Note: When marketCapFeeSchedulerParams is configured, the SDK will automatically set migrationFeeOption to Customizable (6).
*/
// "migratedPoolFee": {
// "collectFeeMode": 0, // 0 - Quote Token | 1 - Output Token
// "dynamicFee": 0, // 0: Disabled, 1: Enabled
// "poolFeeBps": 100, // The pool fee in basis points. Minimum 10, Maximum 1000 bps. Required when marketCapFeeSchedulerParams is configured.
// "baseFeeMode": 3, // 3 - FeeMarketCapSchedulerLinear | 4 - FeeMarketCapSchedulerExponential (only for DAMM v2)
// "marketCapFeeSchedulerParams": {
// "endingBaseFeeBps": 50, // The ending (minimum) base fee in basis points
// "numberOfPeriod": 100, // The total number of fee reduction periods
// "sqrtPriceStepBps": 100, // The sqrt price increase (in bps) required to advance one period
// "schedulerExpirationDuration": 86400 // The maximum duration (seconds) after which the scheduler expires and defaults to minimum fee
// }
// }
},
"dynamicFeeEnabled": true, // If true, dynamic fee will add 20% of minimum base fee to the total fee.
"activationType": 1, // 0 - Slot | 1 - Timestamp
"collectFeeMode": 0, // 0 - Quote Token | 1 - Output Token
"migrationFeeOption": 3, // 0 - LP Fee 0.25% | 1 - LP Fee 0.3% | 2 - LP Fee 1% | 3 - LP Fee 2% | 4 - LP Fee 4% | 5 - LP Fee 6%
"tokenType": 0, // 0 - SPL | 1 - Token 2022
/* LP Distribution (must total 100%)

/* LP Distribution Configuration (must total 100%)
* IMPORTANT: At least 10% of LP must remain locked/vesting for at least 1 day post-migration.
*
* For DAMM v1: partnerPermanentLockedLiquidityPercentage + creatorPermanentLockedLiquidityPercentage >= 10%
*
* For DAMM v2: 3 options to achieve 10% locked/vesting:
* Option 1 (Permanent Only): Set creator + partner permanent locked percentages >= 10% (LP locked forever)
* Option 2 (Vesting Only): Use creator + partner vestingInfoParams with cliffDurationFromMigrationTime >= 86400 (1 day)
* Option 3 (Combination): Mix permanent + vesting to reach 10% (5% permenant + 5% vesting >= 1 day)
* Option 3 (Combination): Mix permanent + vesting to reach 10% (5% permanent + 5% vesting >= 1 day)
*/
"partnerLiquidityPercentage": 50, // Partner claimable LP (withdrawable LP once pool migrates)
"creatorLiquidityPercentage": 40, // Creator claimable LP (withdrawable LP once pool migrates)
"partnerPermanentLockedLiquidityPercentage": 5, // Partner locked LP (permanently locked LP once pool migrates) - counts toward 10% requirement
"creatorPermanentLockedLiquidityPercentage": 5, // Creator locked LP (permanently locked LP once pool migrates) - counts toward 10% requirement
"creatorTradingFeePercentage": 50, // Bonding curve trading fee sharing (0% to 100%) - 0% means all trading fees go to the partner
"leftover": 0, // leftover tokens in the bonding curve (claimable once pool migrates)
"tokenUpdateAuthority": 1, // 0 - CreatorUpdateAuthority | 1 - Immutable | 2 - PartnerUpdateAuthority | 3 - CreatorUpdateAndMintAuthority | 4 - PartnerUpdateAndMintAuthority
"migrationFee": {
"feePercentage": 0, // Percentage of fee taken from migration quote threshold once pool migrates (0% to 50%)
"creatorFeePercentage": 0 // Percentage of the migrationFee.feePercentage claimable by creator (0% to 100%)
"liquidityDistribution": {
"partnerLiquidityPercentage": 50, // Partner claimable LP (withdrawable LP once pool migrates)
"creatorLiquidityPercentage": 40, // Creator claimable LP (withdrawable LP once pool migrates)
"partnerPermanentLockedLiquidityPercentage": 5, // Partner locked LP (permanently locked LP once pool migrates) - counts toward 10% requirement
"creatorPermanentLockedLiquidityPercentage": 5 // Creator locked LP (permanently locked LP once pool migrates) - counts toward 10% requirement
/* LP Vesting (DAMM v2 only)
* Optional vesting schedule for partner/creator LP tokens after migration.
* Only applicable when migrationOption = 1 (DAMM v2).
* Note: At least 10% of LP must remain locked/vesting for at least 1 day post-migration.
*/
// "partnerLiquidityVestingInfoParams": {
// "vestingPercentage": 50, // % of non-permanent LP to vest (0-100)
// "bpsPerPeriod": 100, // BPS released per period (100 = 1%)
// "numberOfPeriods": 100, // Total vesting periods
// "cliffDurationFromMigrationTime": 86400, // Cliff delay in seconds (86400 = 1 day)
// "totalDuration": 2592000 // Total vesting duration in seconds (30 days)
// },
// "creatorLiquidityVestingInfoParams": {
// "vestingPercentage": 50,
// "bpsPerPeriod": 100,
// "numberOfPeriods": 100,
// "cliffDurationFromMigrationTime": 86400,
// "totalDuration": 2592000
// }
},
// "migratedPoolFee": {
// // Configure only when migrationOption = MET_DAMM_V2 (1) and migrationFeeOption = Customizable (6)
// "collectFeeMode": 0, // 0 - Quote Token | 1 - Output Token
// "dynamicFee": 0, // 0: Disabled, 1: Enabled
// "poolFeeBps": 0 // The pool fee in basis points. Minimum 10, Maximum 1000 bps.
// },
"migratedPoolBaseFeeMode": 3, // 3 - FeeMarketCapSchedulerLinear | 4 - FeeMarketCapSchedulerExponential (only for DAMM v2)
"enableFirstSwapWithMinFee": false, // If true, the first swap on the pool will use the minimum fee instead of the starting fee (useful for creator bundled buys)

/* Only use the following parameters for migratedPoolBaseFeeMode: 3 (FeeMarketCapSchedulerLinear) or 4 (FeeMarketCapSchedulerExponential)
* These parameters configure the fee reduction based on price movement (market cap growth) for the post-graduation DAMM v2 pool.
*/
// "migratedPoolMarketCapFeeSchedulerParams": {
// "endingBaseFeeBps": 50, // The ending (minimum) base fee in basis points
// "numberOfPeriod": 100, // The total number of fee reduction periods
// "sqrtPriceStepBps": 100, // The sqrt price increase (in bps) required to advance one period
// "schedulerExpirationDuration": 86400 // The maximum duration (seconds) after which the scheduler expires and defaults to minimum fee
// },

/* Pool Creation Fee
* Fee charged to token creators when they create a pool using this config.
* Partner claims 90% via claimPartnerPoolCreationFee(), Meteora claims 10%.
* Set to 0 for no fee, or between 0.001 SOL and 100 SOL.
*/
"poolCreationFee": 0, // Pool creation fee in SOL (e.g., 0.1 for 0.1 SOL)

/* LP Vesting (DAMM v2 only)
* Optional vesting schedule for partner/creator LP tokens after migration.
* Only applicable when migrationOption = 1 (DAMM v2).
* Note: At least 10% of LP must remain locked/vesting for at least 1 day post-migration.
*/
// "partnerLiquidityVestingInfoParams": {
// "vestingPercentage": 50, // % of non-permanent LP to vest (0-100)
// "bpsPerPeriod": 100, // BPS released per period (100 = 1%)
// "numberOfPeriods": 100, // Total vesting periods
// "cliffDurationFromMigrationTime": 86400, // Cliff delay in seconds (86400 = 1 day)
// "totalDuration": 2592000 // Total vesting duration in seconds (30 days)
// },
// "creatorLiquidityVestingInfoParams": {
// "vestingPercentage": 50,
// "bpsPerPeriod": 100,
// "numberOfPeriods": 100,
// "cliffDurationFromMigrationTime": 86400,
// "totalDuration": 2592000
// },
/* Locked Vesting Configuration */
"lockedVesting": {
"totalLockedVestingAmount": 0, // total locked vesting amount (not in lamports)
"numberOfVestingPeriod": 0, // number of vesting period
"cliffUnlockAmount": 0, // cliff unlock amount (not in lamports)
"totalVestingDuration": 0, // total vesting duration (in seconds)
"cliffDurationFromMigrationTime": 0 // cliff duration from migration time (in seconds)
},

"activationType": 1, // 0 - Slot | 1 - Timestamp

"leftoverReceiver": "YOUR_LEFTOVER_RECEIVER_ADDRESS", // leftover receiver address
"feeClaimer": "YOUR_FEE_CLAIMER_ADDRESS" // fee claimer address
Expand All @@ -195,7 +209,7 @@
* This will create an image uri and a new metadata uri and upload everything to Irys
*/
"image": "./data/image/test-token.jpg", // this can be a URL of the image address (e.g. https://example.com/token-image.png) or the image file path (e.g. ./data/image/test-token.jpg)
"description": "YOUR_TOKEN_DESCRIPTION", // token description
"description": "TOKEN_DESCRIPTION", // token description
"website": "https://example.com", // project website
"twitter": "https://x.com/yourproject", // twitter URL
"telegram": "https://t.me/yourproject" // telegram URL
Expand Down
2 changes: 1 addition & 1 deletion studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@meteora-ag/cp-amm-sdk": "^1.3.3",
"@meteora-ag/dlmm": "^1.9.3",
"@meteora-ag/dynamic-amm-sdk": "^1.4.1",
"@meteora-ag/dynamic-bonding-curve-sdk": "^1.5.2",
"@meteora-ag/dynamic-bonding-curve-sdk": "^1.5.3",
"@meteora-ag/dynamic-fee-sharing-sdk": "^1.0.1",
"@meteora-ag/farming-sdk": "^1.0.18",
"@meteora-ag/m3m3": "^1.0.10",
Expand Down
Loading