This commit is contained in:
aozhiwei 2024-09-24 14:32:29 +08:00
parent f992504030
commit edbf314dd0

View File

@ -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)