git.delta.rocks / unique-network / refs/commits / 48d238556e7c

difftreelog

refactor(test app promo) fix comment

PraetorP2023-11-15parent: #d56d63a.patch.diff
in: master

1 file changed

modifiedjs-packages/tests/sub/appPromotion/appPromotion.test.tsdiffbeforeafterboth
983function calculateIncome(base: bigint, iter = 0, calcPeriod: bigint = UNLOCKING_PERIOD): bigint {983function calculateIncome(base: bigint, iter = 0, calcPeriod: bigint = UNLOCKING_PERIOD): bigint {
984 const DAY = 7200n;984 const DAY = 7200n;
985 const ACCURACY = 1_000_000_000n;985 const ACCURACY = 1_000_000_000n;
986 // 5n / 10_000n = 0.05% p/day986 // 453_256n / 1_000_000_000n = 0.0453256% /day
987 const income = base + base * (ACCURACY * (calcPeriod * 453_256n) / (1_000_000_000n * DAY)) / ACCURACY ;987 const income = base + base * (ACCURACY * (calcPeriod * 453_256n) / (1_000_000_000n * DAY)) / ACCURACY ;
988988
989 if(iter > 1) {989 if(iter > 1) {