Skip to content

Commit 514844d

Browse files
Merge pull request #22 from zcombinatorio/ztorio-emissions
Ztorio emissions
2 parents 8baff1a + 3cb27fe commit 514844d

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

ui/routes/claims.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -314,18 +314,20 @@ router.post('/mint', async (
314314
// claimersTotal represents the 90% portion for claimers (excluding 10% admin fee)
315315
const splitRecipients: SplitRecipient[] = [];
316316

317-
// Special case for ZC token: split claimersTotal between ztorio, dev, and Percent Markets treasury
317+
// Special case for ZC token: split claimersTotal between ztorio, solpay, dev, and Percent Markets treasury
318318
const ZC_TOKEN_ADDRESS = 'GVvPZpC6ymCoiHzYJ7CWZ8LhVn9tL2AUpRjSAsLh6jZC';
319319
const PERCENT_TREASURY_ADDRESS = '4ySrS3XEn8ouZfA2JAgS9uZ5BWeVCyyR16wgJ1Tyh9aG'; // Treasury for percent markets ($PERC) for their contributions to improving the protocol
320320
const ZTORIO_ADDRESS = 'A6R6fD82TaTSWKTpKKcRhBotYtc5izyauPFw3yHVYwuP'; // ztorio
321+
const SOLPAY_ADDRESS = 'J7xnWtfi5Fa3JC1creRBHzo7DkRf6etugCBv1s9vEe5N'; // solpay ($SP)
321322

322323
if (tokenAddress === ZC_TOKEN_ADDRESS) {
323-
// Split total: 2.5% to ztorio, 43.75% to dev, 43.75% to Percent Markets treasury, 10% to fee
324+
// Split total: 2.5% to ztorio, 2.5% to solpay, 42.5% to dev, 42.5% to Percent Markets treasury, 10% to fee
324325
// Calculate in basis points for precision: 2.5% = 250/10000
325326
const ztorioAmount = (requestedAmount * BigInt(250)) / BigInt(10000); // 2.5% of total
326-
const remainderAfterZtorioAndAdmin = requestedAmount - ztorioAmount - adminAmount; // 87.5% of total
327-
const devAmount = remainderAfterZtorioAndAdmin / BigInt(2); // 43.75% of total
328-
const treasuryAmount = remainderAfterZtorioAndAdmin - devAmount; // 43.75% of total (ensures exact total)
327+
const solpayAmount = (requestedAmount * BigInt(250)) / BigInt(10000); // 2.5% of total
328+
const remainderAfterFixedAllocations = requestedAmount - ztorioAmount - solpayAmount - adminAmount; // 85% of total
329+
const devAmount = remainderAfterFixedAllocations / BigInt(2); // 42.5% of total
330+
const treasuryAmount = remainderAfterFixedAllocations - devAmount; // 42.5% of total (ensures exact total)
329331

330332
splitRecipients.push(
331333
{
@@ -334,21 +336,27 @@ router.post('/mint', async (
334336
amountWithDecimals: ztorioAmount * BigInt(10 ** decimals),
335337
label: 'ztorio'
336338
},
339+
{
340+
wallet: SOLPAY_ADDRESS,
341+
amount: solpayAmount, // 2.5% of total
342+
amountWithDecimals: solpayAmount * BigInt(10 ** decimals),
343+
label: 'solpay'
344+
},
337345
{
338346
wallet: trimmedCreatorWallet,
339-
amount: devAmount, // 43.75% of total
347+
amount: devAmount, // 42.5% of total
340348
amountWithDecimals: devAmount * BigInt(10 ** decimals),
341349
label: 'Developer'
342350
},
343351
{
344352
wallet: PERCENT_TREASURY_ADDRESS,
345-
amount: treasuryAmount, // 43.75% of total
353+
amount: treasuryAmount, // 42.5% of total
346354
amountWithDecimals: treasuryAmount * BigInt(10 ** decimals),
347355
label: 'Percent Markets Treasury'
348356
}
349357
);
350358

351-
console.log(`ZC token emission split: 2.5% to ztorio ${ZTORIO_ADDRESS}, 43.75% to developer ${trimmedCreatorWallet}, 43.75% to Percent Markets treasury ${PERCENT_TREASURY_ADDRESS}, 10% to fee`);
359+
console.log(`ZC token emission split: 2.5% to ztorio ${ZTORIO_ADDRESS}, 2.5% to solpay ${SOLPAY_ADDRESS}, 42.5% to developer ${trimmedCreatorWallet}, 42.5% to Percent Markets treasury ${PERCENT_TREASURY_ADDRESS}, 10% to fee`);
352360
} else {
353361
// Default: 100% of claimersTotal goes to the developer/creator
354362
splitRecipients.push({

0 commit comments

Comments
 (0)