Skip to content

Commit

Permalink
updates (#3119)
Browse files Browse the repository at this point in the history
Co-authored-by: Roman <[email protected]>
  • Loading branch information
mergify[bot] and p0mvn authored Oct 24, 2022
1 parent dfd86cb commit d01291d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func (k Keeper) CreateNewConcentratedLiquidityPool(ctx sdk.Context, poolId uint6
}

func priceToTick(price sdk.Dec) sdk.Int {
logOfPrice := osmomath.BigDecFromSDKDec(price).ApproxLog2()
logOfPrice := osmomath.BigDecFromSDKDec(price).LogBase2()
logInt := osmomath.NewDecWithPrec(10001, 4)
tick := logOfPrice.Quo(logInt.ApproxLog2())
tick := logOfPrice.Quo(logInt.LogBase2())
return tick.SDKDec().TruncateInt()
}

Expand Down

0 comments on commit d01291d

Please sign in to comment.