-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathdbc_config.jsonc
More file actions
245 lines (221 loc) · 14.3 KB
/
Copy pathdbc_config.jsonc
File metadata and controls
245 lines (221 loc) · 14.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
{
/* rpcUrl is required. You can switch between mainnet, devnet and localnet or use your own RPC URL. */
"rpcUrl": "https://api.devnet.solana.com", // mainnet: https://api.mainnet-beta.solana.com | devnet: https://api.devnet.solana.com | localnet: http://localhost:8899
/* dryRun is required. If true, transactions will be simulated and not executed. If false, transactions will be executed. */
"dryRun": true, // Set to false only after you understand what will happen
/* keypairFilePath is required and will be the payer + signer for all transactions */
"keypairFilePath": "./keypair.json",
/* computeUnitPriceMicroLamports is required and can be adjusted to fit your needs */
"computeUnitPriceMicroLamports": 100000,
/* quoteMint is required for the following actions:
* 1. dbc-create-config
* 2. dbc-create-pool (if there is no configKeyAddress)
* SOL: So11111111111111111111111111111111111111112 | USDC: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v | any other token address
*/
"quoteMint": "So11111111111111111111111111111111111111112",
/* dbcConfig is only used in the following actions:
* 1. dbc-create-config
* 2. dbc-create-pool (if there is no --config flag indicated in the command)
*/
"dbcConfig": {
"buildCurveMode": 0, // 0 - buildCurve | 1 - buildCurveWithMarketCap | 2 - buildCurveWithTwoSegments | 3 - buildCurveWithLiquidityWeights | 4 - buildCurveWithMidPrice | 5 - buildCurveWithCustomSqrtPrices
/* Only use the following parameters for buildCurveMode: 0 (buildCurve)
* 1. percentageSupplyOnMigration
* 2. migrationQuoteThreshold
*/
"percentageSupplyOnMigration": 20, // percentage of total token supply to be migrated
"migrationQuoteThreshold": 10, // migration quote threshold needed to migrate the DBC token pool
/* Only use the following parameters for buildCurveMode: 1 (buildCurveWithMarketCap)
* 1. initialMarketCap
* 2. migrationMarketCap
*/
// "initialMarketCap": 20, // the market cap of the DBC token pool when the pool is created specified in terms of quoteMint (not in lamports)
// "migrationMarketCap": 600, // the market cap of the DBC token pool when the pool graduates specified in terms of quoteMint (not in lamports)
/* Only use the following parameters for buildCurveMode: 2 (buildCurveWithTwoSegments)
* 1. initialMarketCap
* 2. migrationMarketCap
* 3. percentageSupplyOnMigration
*/
// "initialMarketCap": 20, // the market cap of the DBC token pool when the pool is created specified in terms of quoteMint (not in lamports)
// "migrationMarketCap": 600, // the market cap of the DBC token pool when the pool graduates specified in terms of quoteMint (not in lamports)
// "percentageSupplyOnMigration": 20, // percentage of total token supply to be migrated
/* Only use the following parameters for buildCurveMode: 3 (buildCurveWithLiquidityWeights)
* 1. initialMarketCap
* 2. migrationMarketCap
* 3. liquidityWeights
*/
// "initialMarketCap": 20, // the market cap of the DBC token pool when the pool is created specified in terms of quoteMint (not in lamports)
// "migrationMarketCap": 600, // the market cap of the DBC token pool when the pool graduates specified in terms of quoteMint (not in lamports)
// "liquidityWeights": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], // a array of 16 liquidity weights for each liquidity segment in the curve
/* Only use the following parameters for buildCurveMode: 4 (buildCurveWithMidPrice)
* 1. initialMarketCap
* 2. migrationMarketCap
* 3. midPrice
* 4. percentageSupplyOnMigration
*/
// "initialMarketCap": 20, // the market cap of the DBC token pool when the pool is created specified in terms of quoteMint (not in lamports)
// "migrationMarketCap": 600, // the market cap of the DBC token pool when the pool graduates specified in terms of quoteMint (not in lamports)
// "midPrice": 0.001, // the mid-point price of the curve in terms of quoteMint
// "percentageSupplyOnMigration": 20, // percentage of total token supply to be migrated
/* Only use the following parameters for buildCurveMode: 5 (buildCurveWithCustomSqrtPrices)
* 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)
*/
// "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
/* 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 Token | 1 - Token 2022
"tokenAuthorityOption": 1, // 0 - CreatorUpdateAuthority | 1 - Immutable | 2 - PartnerUpdateAuthority | 3 - CreatorUpdateAndMintAuthority | 4 - PartnerUpdateAndMintAuthority (3 and 4 are only allowed for transfer hook configs)
"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.25% fee === 25 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)
},
/* 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%)
}
/* 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 | 2 - Compounding
// "dynamicFee": 0, // 0: Disabled, 1: Enabled
// "poolFeeBps": 100, // The pool fee in basis points. Minimum 10, Maximum 1000 bps. Required when marketCapFeeSchedulerParams is configured.
// "compoundingFeeBps": 5000, // Portion of trading fees compounded back into pool liquidity (0 to 10000 bps). Only for collectFeeMode: 2 (Compounding)
// "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
// "priceMultiple": 1000, // The ratio of ending market cap over starting market cap, must be greater than 1
// "schedulerExpirationDuration": 86400 // The maximum duration (seconds) after which the scheduler expires and defaults to minimum fee
// }
// }
},
/* 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% permanent + 5% vesting >= 1 day)
*/
"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
// }
},
/* 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
/* Transfer Hook Launch (Token 2022 only)
* Set transferHookProgram to launch tokens whose base mint executes a transfer hook program on every transfer.
* Requires token.tokenType: 1 (Token 2022). The config is created with createConfigWithTransferHook and
* pools on it must be created with the same transferHookProgram (see dbcPool.transferHookProgram).
*/
// "transferHookProgram": "YOUR_TRANSFER_HOOK_PROGRAM_ADDRESS"
},
/* dbcPool is only used in the following actions:
* 1. dbc-create-pool
*/
"dbcPool": {
// "baseMintKeypairFilepath": "./mint-keypair.json", // optional base mint keypair file path
"creator": "YOUR_CREATOR_ADDRESS", // creator address
"name": "TOKEN_NAME", // token name
"symbol": "TOKEN_SYMBOL", // token symbol
// "transferHookProgram": "YOUR_TRANSFER_HOOK_PROGRAM_ADDRESS", // required when the target config was created with a transfer hook; must match the config's hook program
"metadata": {
// "uri": "https://gateway.irys.xyz/123456789", // if you already have a metadata URI created, you can specify it here
/* Only use the following parameters for createBaseToken if you don't have an existing metadata uri
* 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": "TOKEN_DESCRIPTION", // token description
"website": "https://example.com", // project website
"twitter": "https://x.com/yourproject", // twitter URL
"telegram": "https://t.me/yourproject" // telegram URL
}
},
/* dbcSwap is only used in the following actions:
* 1. dbc-swap (Buy or Sell)
*/
"dbcSwap": {
"amountIn": 1.03, // the amount of quoteMint or baseMint to be swapped
"slippageBps": 100, // slippage in bps
"swapBaseForQuote": false, // if true, swap base for quote | if false, swap quote for base
"referralTokenAccount": null // optional referral token account address
},
/* dbcTransferPoolCreator is only used in the following actions:
* 1. dbc-transfer-pool-creator
*/
"dbcTransferPoolCreator": {
"newCreator": "YOUR_NEW_CREATOR_ADDRESS" // new creator address
}
}