Skip to content

Commit

Permalink
Merge pull request #191 from stratosnet/qb1542_fix-truncate-NozSupply
Browse files Browse the repository at this point in the history
fix/qb1542: fix truncate impl of noz supply
  • Loading branch information
alexstratos authored Dec 21, 2022
2 parents 31b6277 + 80efcad commit 1f93167
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/register/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ func (k Keeper) NozSupply(ctx sdk.Context) (remaining, total sdk.Int) {
S := k.GetInitialGenesisStakeTotal(ctx)
Pt := k.GetTotalUnissuedPrepay(ctx).Amount
// total supply = Lt * ( 1 + Pt / S )
total = (Pt.ToDec().Quo(S.ToDec()).TruncateInt().Add(sdk.NewInt(1))).Mul(remaining)
total = Pt.ToDec().Quo(S.ToDec()).Add(sdk.NewInt(1).ToDec()).Mul(remaining.ToDec()).TruncateInt()
return remaining, total
}

Expand Down

0 comments on commit 1f93167

Please sign in to comment.