diff --git a/backend/services/trading-service/prisma/seed.ts b/backend/services/trading-service/prisma/seed.ts index e925a554..5a2d1127 100644 --- a/backend/services/trading-service/prisma/seed.ts +++ b/backend/services/trading-service/prisma/seed.ts @@ -94,16 +94,18 @@ async function main() { } // 4. 初始化积分股池(绿积分池) + // 初始绿积分为 57.6亿,使初始价格约为 0.576 (57.6亿 / 100.02亿 ≈ 0.576) + const INITIAL_GREEN_POINTS = '5760000000'; // 57.6亿 const existingSharePool = await prisma.sharePool.findFirst(); if (!existingSharePool) { await prisma.sharePool.create({ data: { - greenPoints: new Decimal(5760), // 初始绿积分为 5760 - totalInflow: new Decimal(5760), + greenPoints: new Decimal(INITIAL_GREEN_POINTS), + totalInflow: new Decimal(INITIAL_GREEN_POINTS), totalOutflow: new Decimal(0), }, }); - console.log('Created share pool with initial green points: 5760'); + console.log(`Created share pool with initial green points: ${INITIAL_GREEN_POINTS} (57.6亿)`); } else { console.log('Share pool already exists'); } diff --git a/backend/services/trading-service/src/application/services/burn.service.ts b/backend/services/trading-service/src/application/services/burn.service.ts index f9be7672..1eacd63d 100644 --- a/backend/services/trading-service/src/application/services/burn.service.ts +++ b/backend/services/trading-service/src/application/services/burn.service.ts @@ -263,11 +263,12 @@ export class BurnService { this.logger.log('Black hole initialized'); } - // 初始化积分股池(绿积分池),初始值 5760 + // 初始化积分股池(绿积分池),初始值 57.6亿 + // 使初始价格约为 0.576 (57.6亿 / 100.02亿 ≈ 0.576) if (!existingSharePool) { - const initialGreenPoints = new Money(5760); + const initialGreenPoints = new Money('5760000000'); // 57.6亿 await this.sharePoolRepository.initializePool(initialGreenPoints); - this.logger.log(`Share pool initialized with ${initialGreenPoints.toFixed(8)} green points`); + this.logger.log(`Share pool initialized with ${initialGreenPoints.toFixed(8)} green points (57.6亿)`); } // 初始化流通池