From edbf314dd01de447b35b1863ad5d514acd678b37 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 24 Sep 2024 14:32:29 +0800 Subject: [PATCH] 1 --- server/light_backtask/service/vip.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/light_backtask/service/vip.go b/server/light_backtask/service/vip.go index 5efc8000..75c61ea2 100644 --- a/server/light_backtask/service/vip.go +++ b/server/light_backtask/service/vip.go @@ -142,8 +142,9 @@ func (this *vip) RecalcEsCecConvert(accountAddress string) error { if nowTime > lastDeposit.chainTimestamp { bnPassTime := new(big.Int).SetInt64(int64(nowTime - lastDeposit.chainTimestamp)) bnTotalTime := new(big.Int).SetInt64(int64(365 * 24 * 2600)) - bnRate := bnPassTime.Div(bnPassTime, bnTotalTime) - bnTotal.Mul(bnTotal, bnRate) + bnTmp := bnTotal.Mul(bnTotal, bnPassTime) + bnInterest := bnTmp.Div(bnTmp, bnTotalTime) + bnTotal = bnTotal.Sub(bnTotal, bnInterest) } } bnAmount, _ := new(big.Int).SetString(val.depositAmount, 10)