diff --git a/ui/routes/claims.ts b/ui/routes/claims.ts index 1300a2f..cd5514e 100644 --- a/ui/routes/claims.ts +++ b/ui/routes/claims.ts @@ -314,18 +314,20 @@ router.post('/mint', async ( // claimersTotal represents the 90% portion for claimers (excluding 10% admin fee) const splitRecipients: SplitRecipient[] = []; - // Special case for ZC token: split claimersTotal between ztorio, dev, and Percent Markets treasury + // Special case for ZC token: split claimersTotal between ztorio, solpay, dev, and Percent Markets treasury const ZC_TOKEN_ADDRESS = 'GVvPZpC6ymCoiHzYJ7CWZ8LhVn9tL2AUpRjSAsLh6jZC'; const PERCENT_TREASURY_ADDRESS = '4ySrS3XEn8ouZfA2JAgS9uZ5BWeVCyyR16wgJ1Tyh9aG'; // Treasury for percent markets ($PERC) for their contributions to improving the protocol const ZTORIO_ADDRESS = 'A6R6fD82TaTSWKTpKKcRhBotYtc5izyauPFw3yHVYwuP'; // ztorio + const SOLPAY_ADDRESS = 'J7xnWtfi5Fa3JC1creRBHzo7DkRf6etugCBv1s9vEe5N'; // solpay ($SP) if (tokenAddress === ZC_TOKEN_ADDRESS) { - // Split total: 2.5% to ztorio, 43.75% to dev, 43.75% to Percent Markets treasury, 10% to fee + // Split total: 2.5% to ztorio, 2.5% to solpay, 42.5% to dev, 42.5% to Percent Markets treasury, 10% to fee // Calculate in basis points for precision: 2.5% = 250/10000 const ztorioAmount = (requestedAmount * BigInt(250)) / BigInt(10000); // 2.5% of total - const remainderAfterZtorioAndAdmin = requestedAmount - ztorioAmount - adminAmount; // 87.5% of total - const devAmount = remainderAfterZtorioAndAdmin / BigInt(2); // 43.75% of total - const treasuryAmount = remainderAfterZtorioAndAdmin - devAmount; // 43.75% of total (ensures exact total) + const solpayAmount = (requestedAmount * BigInt(250)) / BigInt(10000); // 2.5% of total + const remainderAfterFixedAllocations = requestedAmount - ztorioAmount - solpayAmount - adminAmount; // 85% of total + const devAmount = remainderAfterFixedAllocations / BigInt(2); // 42.5% of total + const treasuryAmount = remainderAfterFixedAllocations - devAmount; // 42.5% of total (ensures exact total) splitRecipients.push( { @@ -334,21 +336,27 @@ router.post('/mint', async ( amountWithDecimals: ztorioAmount * BigInt(10 ** decimals), label: 'ztorio' }, + { + wallet: SOLPAY_ADDRESS, + amount: solpayAmount, // 2.5% of total + amountWithDecimals: solpayAmount * BigInt(10 ** decimals), + label: 'solpay' + }, { wallet: trimmedCreatorWallet, - amount: devAmount, // 43.75% of total + amount: devAmount, // 42.5% of total amountWithDecimals: devAmount * BigInt(10 ** decimals), label: 'Developer' }, { wallet: PERCENT_TREASURY_ADDRESS, - amount: treasuryAmount, // 43.75% of total + amount: treasuryAmount, // 42.5% of total amountWithDecimals: treasuryAmount * BigInt(10 ** decimals), label: 'Percent Markets Treasury' } ); - 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`); + 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`); } else { // Default: 100% of claimersTotal goes to the developer/creator splitRecipients.push({