1
This commit is contained in:
parent
f992504030
commit
edbf314dd0
@ -142,8 +142,9 @@ func (this *vip) RecalcEsCecConvert(accountAddress string) error {
|
|||||||
if nowTime > lastDeposit.chainTimestamp {
|
if nowTime > lastDeposit.chainTimestamp {
|
||||||
bnPassTime := new(big.Int).SetInt64(int64(nowTime - lastDeposit.chainTimestamp))
|
bnPassTime := new(big.Int).SetInt64(int64(nowTime - lastDeposit.chainTimestamp))
|
||||||
bnTotalTime := new(big.Int).SetInt64(int64(365 * 24 * 2600))
|
bnTotalTime := new(big.Int).SetInt64(int64(365 * 24 * 2600))
|
||||||
bnRate := bnPassTime.Div(bnPassTime, bnTotalTime)
|
bnTmp := bnTotal.Mul(bnTotal, bnPassTime)
|
||||||
bnTotal.Mul(bnTotal, bnRate)
|
bnInterest := bnTmp.Div(bnTmp, bnTotalTime)
|
||||||
|
bnTotal = bnTotal.Sub(bnTotal, bnInterest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bnAmount, _ := new(big.Int).SetString(val.depositAmount, 10)
|
bnAmount, _ := new(big.Int).SetString(val.depositAmount, 10)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user