Repository: osmosis-labs/osmosis
Pull request #2780 (2022-09-19 09:49:13)

[twap] Sort denoms in ascending order
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v                               ✰  Thanks for creating a PR! ✰    
v    Before smashing the submit button please review the checkboxes.
v    If a checkbox is n/a - please still include it but + a little note why
v    If your PR doesn't close an issue, that's OK!  Just remove the Closes: #XXX line!
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  -->

Closes: https://github.com/osmosis-labs/osmosis/issues/2751

What is the purpose of the change

Solve 2751: types.GetAllUniqueDenomPairs returns pairs in increasing order so newTwapRecord doesn't have to perform unnecessary swaps

Brief Changelog

Denoms are sorted in lexicographically increasing order. tests changed

Testing and Verifying

This change is already covered by existing tests, such as "TestGetAllUniqueDenomPairs"

Documentation and Release Note

Does this pull request introduce a new feature or user-facing behavior changes? no
Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? no
How is the feature or change documented? not documented


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 91865a7ac..74b34c9b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -78,6 +78,7 @@ which acts as a fuzz testing tool tailored for the SDK state machine.
 * [#2405](https://github.com/osmosis-labs/osmosis/pull/2405) Make SpotPrice have a max value of 2^160, and no longer be able to panic
 * [#2473](https://github.com/osmosis-labs/osmosis/pull/2473) x/superfluid `AddNewSuperfluidAsset` now returns error, if any occurs instead of ignoring it.
 * [#2714](https://github.com/osmosis-labs/osmosis/pull/2714) Upgrade wasmd to v0.28.0.
+* [#2772](https://github.com/osmosis-labs/osmosis/pull/2772) Remove the ModuleListedCoins grpc query
 
 #### Golang API breaks
 
diff --git a/osmomath/decimal.go b/osmomath/decimal.go
index b6aa442ad..527bab9ca 100644
--- a/osmomath/decimal.go
+++ b/osmomath/decimal.go
@@ -8,6 +8,8 @@ import (
 	"strconv"
 	"strings"
 	"testing"
+
+	sdk "github.com/cosmos/cosmos-sdk/types"
 )
 
 // NOTE: never use new(BigDec) or else we will panic unmarshalling into the
@@ -18,11 +20,11 @@ type BigDec struct {
 
 const (
 	// number of decimal places
-	Precision = 18
+	Precision = 36
 
 	// bytes required to represent the above precision
-	// Ceiling[Log2[999 999 999 999 999 999]]
-	DecimalPrecisionBits = 60
+	// Ceiling[Log2[10**Precision - 1]]
+	DecimalPrecisionBits = 120
 
 	maxDecBitLen = maxBitLen + DecimalPrecisionBits
 
@@ -494,6 +496,27 @@ func (d BigDec) MustFloat64() float64 {
 	}
 }
 
+// SdkDec returns the Sdk.Dec representation of a BigDec.
+// Values in any additional decimal places are truncated.
+func (d BigDec) SdkDec() sdk.Dec {
+	precisionDiff := Precision - sdk.Precision
+	precisionFactor := new(big.Int).Exp(big.NewInt(10), big.NewInt(int64(precisionDiff)), nil)
+
+	if precisionDiff < 0 {
+		panic("invalid decimal precision")
+	}
+
+	truncatedDec := sdk.NewDecFromBigIntWithPrec(new(big.Int).Quo(d.BigInt(), precisionFactor), sdk.Precision)
+
+	return truncatedDec
+}
+
+// BigDecFromSdkDec returns the BigDec representation of an SdkDec.
+// Values in any additional decimal places are truncated.
+func BigDecFromSdkDec(d sdk.Dec) BigDec {
+	return NewDecFromBigIntWithPrec(d.BigInt(), sdk.Precision)
+}
+
 //     ____
 //  __|    |__   "chop 'em
 //       ` \     round!"
diff --git a/osmomath/int.go b/osmomath/int.go
index 9d4f5e650..c3ae4ef28 100644
--- a/osmomath/int.go
+++ b/osmomath/int.go
@@ -8,7 +8,7 @@ import (
 	"testing"
 )
 
-const maxBitLen = 512
+const maxBitLen = 1024
 
 func newIntegerFromString(s string) (*big.Int, bool) {
 	return new(big.Int).SetString(s, 0)
diff --git a/osmoutils/module_account.go b/osmoutils/module_account.go
new file mode 100644
index 000000000..20c57704c
--- /dev/null
+++ b/osmoutils/module_account.go
@@ -0,0 +1,78 @@
+package osmoutils
+
+import (
+	"errors"
+	"fmt"
+	"reflect"
+
+	sdk "github.com/cosmos/cosmos-sdk/types"
+	authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
+	vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
+)
+
+type AccountKeeper interface {
+	NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI
+
+	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
+	SetAccount(ctx sdk.Context, acc authtypes.AccountI)
+}
+
+// CanCreateModuleAccountAtAddr tells us if we can safely make a module account at
+// a given address. By collision resistance of the address (given API safe construction),
+// the only way for an account to be already be at this address is if its claimed by the same
+// pre-image from the correct module,
+// or some SDK command breaks assumptions and creates an account at designated address.
+// This function checks if there is an account at that address, and runs some safety checks
+// to be extra-sure its not a user account (e.g. non-zero sequence, pubkey, of fore-seen account types).
+// If there is no account, or if we believe its not a user-spendable account, we allow module account
+// creation at the address.
+// else, we do not.
+//
+// TODO: This is generally from an SDK design flaw
+// code based off wasmd code: https://github.com/CosmWasm/wasmd/pull/996
+// Its _mandatory_ that the caller do the API safe construction to generate a module account addr,
+// namely, address.Module(ModuleName, {key})
+func CanCreateModuleAccountAtAddr(ctx sdk.Context, ak AccountKeeper, addr sdk.AccAddress) error {
+	existingAcct := ak.GetAccount(ctx, addr)
+	if existingAcct == nil {
+		return nil
+	}
+	if existingAcct.GetSequence() != 0 || existingAcct.GetPubKey() != nil {
+		return fmt.Errorf("cannot create module account %s, "+
+			"due to an account at that address already existing & having sent txs", addr)
+	}
+	var overrideAccountTypes = map[reflect.Type]struct{}{
+		reflect.TypeOf(&authtypes.BaseAccount{}):                 {},
+		reflect.TypeOf(&vestingtypes.DelayedVestingAccount{}):    {},
+		reflect.TypeOf(&vestingtypes.ContinuousVestingAccount{}): {},
+		reflect.TypeOf(&vestingtypes.BaseVestingAccount{}):       {},
+		reflect.TypeOf(&vestingtypes.PeriodicVestingAccount{}):   {},
+		reflect.TypeOf(&vestingtypes.PermanentLockedAccount{}):   {},
+		reflect.TypeOf(&vestingtypes.ClawbackVestingAccount{}):   {},
+	}
+	if _, clear := overrideAccountTypes[reflect.TypeOf(existingAcct)]; clear {
+		return nil
+	}
+	return errors.New("cannot create module account %s, " +
+		"due to an account at that address already existing & not being an overrideable type")
+}
+
+// CreateModuleAccount creates a module account at the provided address.
+// It overrides an account if it exists at that address, with a non-zero sequence number & pubkey
+// Contract: addr is derived from `address.Module(ModuleName, key)`
+func CreateModuleAccount(ctx sdk.Context, ak AccountKeeper, addr sdk.AccAddress) error {
+	err := CanCreateModuleAccountAtAddr(ctx, ak, addr)
+	if err != nil {
+		return err
+	}
+
+	acc := ak.NewAccount(
+		ctx,
+		authtypes.NewModuleAccount(
+			authtypes.NewBaseAccountWithAddress(addr),
+			addr.String(),
+		),
+	)
+	ak.SetAccount(ctx, acc)
+	return nil
+}
diff --git a/proto/osmosis/incentives/query.proto b/proto/osmosis/incentives/query.proto
index 525ae2284..3561b3ed7 100644
--- a/proto/osmosis/incentives/query.proto
+++ b/proto/osmosis/incentives/query.proto
@@ -19,13 +19,6 @@ service Query {
     option (google.api.http).get =
         "/osmosis/incentives/v1beta1/module_to_distribute_coins";
   }
-  // ModuleDistributedCoins returns coins that are distributed by the module so
-  // far
-  rpc ModuleDistributedCoins(ModuleDistributedCoinsRequest)
-      returns (ModuleDistributedCoinsResponse) {
-    option (google.api.http).get =
-        "/osmosis/incentives/v1beta1/module_distributed_coins";
-  }
 
   // GaugeByID returns gauges by their respective ID
   rpc GaugeByID(GaugeByIDRequest) returns (GaugeByIDResponse) {
@@ -84,15 +77,6 @@ message ModuleToDistributeCoinsResponse {
   ];
 }
 
-message ModuleDistributedCoinsRequest {}
-message ModuleDistributedCoinsResponse {
-  // Coins that have been distributed already
-  repeated cosmos.base.v1beta1.Coin coins = 1 [
-    (gogoproto.nullable) = false,
-    (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
-  ];
-}
-
 message GaugeByIDRequest {
   // Gague ID being queried
   uint64 id = 1;
diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go
index 8c02acbfe..98545ea1e 100644
--- a/wasmbinding/stargate_whitelist.go
+++ b/wasmbinding/stargate_whitelist.go
@@ -81,7 +81,6 @@ func init() {
 
 	// incentives
 	setWhitelistedQuery("/osmosis.incentives.Query/ModuleToDistributeCoins", &incentivestypes.ModuleToDistributeCoinsResponse{})
-	setWhitelistedQuery("/osmosis.incentives.Query/ModuleDistributedCoins", &incentivestypes.ModuleDistributedCoinsResponse{})
 	setWhitelistedQuery("/osmosis.incentives.Query/LockableDurations", &incentivestypes.QueryLockableDurationsResponse{})
 
 	// lockup
diff --git a/x/gamm/keeper/pool_service.go b/x/gamm/keeper/pool_service.go
index 12609257f..0f630e10a 100644
--- a/x/gamm/keeper/pool_service.go
+++ b/x/gamm/keeper/pool_service.go
@@ -5,10 +5,10 @@ import (
 
 	sdk "github.com/cosmos/cosmos-sdk/types"
 	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
-	authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
 	banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
 
 	"github.com/osmosis-labs/osmosis/v12/osmomath"
+	"github.com/osmosis-labs/osmosis/v12/osmoutils"
 	"github.com/osmosis-labs/osmosis/v12/x/gamm/types"
 )
 
@@ -101,10 +101,6 @@ func (k Keeper) validateCreatedPool(
 		return sdkerrors.Wrapf(types.ErrInvalidPool,
 			"Pool was attempted to be created with incorrect number of initial shares.")
 	}
-	acc := k.accountKeeper.GetAccount(ctx, pool.GetAddress())
-	if acc != nil {
-		return sdkerrors.Wrapf(types.ErrPoolAlreadyExist, "pool %d already exist", poolId)
-	}
 	return nil
 }
 
@@ -143,14 +139,9 @@ func (k Keeper) CreatePool(ctx sdk.Context, msg types.CreatePoolMsg) (uint64, er
 	}
 
 	// create and save the pool's module account to the account keeper
-	acc := k.accountKeeper.NewAccount(
-		ctx,
-		authtypes.NewModuleAccount(
-			authtypes.NewBaseAccountWithAddress(pool.GetAddress()),
-			pool.GetAddress().String(),
-		),
-	)
-	k.accountKeeper.SetAccount(ctx, acc)
+	if err := osmoutils.CreateModuleAccount(ctx, k.accountKeeper, pool.GetAddress()); err != nil {
+		return 0, fmt.Errorf("creating pool module account for id %d: %w", poolId, err)
+	}
 
 	// send initial liquidity to the pool
 	err = k.bankKeeper.SendCoins(ctx, sender, pool.GetAddress(), initialPoolLiquidity)
diff --git a/x/gamm/pool-models/stableswap/amm.go b/x/gamm/pool-models/stableswap/amm.go
index 30c926208..186c39b4a 100644
--- a/x/gamm/pool-models/stableswap/amm.go
+++ b/x/gamm/pool-models/stableswap/amm.go
@@ -5,17 +5,18 @@ import (
 
 	sdk "github.com/cosmos/cosmos-sdk/types"
 
+	"github.com/osmosis-labs/osmosis/v12/osmomath"
 	"github.com/osmosis-labs/osmosis/v12/x/gamm/pool-models/internal/cfmm_common"
 	types "github.com/osmosis-labs/osmosis/v12/x/gamm/types"
 )
 
 var (
-	cubeRootTwo, _   = sdk.NewDec(2).ApproxRoot(3)
+	cubeRootTwo, _   = osmomath.NewBigDec(2).ApproxRoot(3)
 	threeCubeRootTwo = cubeRootTwo.MulInt64(3)
 )
 
 // solidly CFMM is xy(x^2 + y^2) = k
-func cfmmConstant(xReserve, yReserve sdk.Dec) sdk.Dec {
+func cfmmConstant(xReserve, yReserve osmomath.BigDec) osmomath.BigDec {
 	if !xReserve.IsPositive() || !yReserve.IsPositive() {
 		panic("invalid input: reserves must be positive")
 	}
@@ -30,7 +31,7 @@ func cfmmConstant(xReserve, yReserve sdk.Dec) sdk.Dec {
 // outside of x and y (e.g. u = wz), and v is the sum
 // of their squares (e.g. v = w^2 + z^2).
 // When u = 1 and v = 0, this is equivalent to solidly's CFMM
-func cfmmConstantMulti(xReserve, yReserve, uReserve, vSumSquares sdk.Dec) sdk.Dec {
+func cfmmConstantMulti(xReserve, yReserve, uReserve, vSumSquares osmomath.BigDec) osmomath.BigDec {
 	if !xReserve.IsPositive() || !yReserve.IsPositive() || !uReserve.IsPositive() || vSumSquares.IsNegative() {
 		panic("invalid input: reserves must be positive")
 	}
@@ -46,7 +47,7 @@ func cfmmConstantMulti(xReserve, yReserve, uReserve, vSumSquares sdk.Dec) sdk.De
 // how many units `a` of x do we get out.
 // So we solve the following expression for `a`
 // xy(x^2 + y^2) = (x - a)(y + b)((x - a)^2 + (y + b)^2)
-func solveCfmm(xReserve, yReserve, yIn sdk.Dec) sdk.Dec {
+func solveCfmm(xReserve, yReserve, yIn osmomath.BigDec) osmomath.BigDec {
 	if !xReserve.IsPositive() || !yReserve.IsPositive() || !yIn.IsPositive() {
 		panic("invalid input: reserves and input must be positive")
 	}
@@ -94,7 +95,7 @@ func solveCfmm(xReserve, yReserve, yIn sdk.Dec) sdk.Dec {
 	// and maybe in state.
 	x := xReserve
 	y := yReserve
-	x2py2 := x.Mul(x).AddMut(y.Mul(y))
+	x2py2 := x.Mul(x).Add(y.Mul(y))
 
 	xy := x.Mul(y)
 
@@ -128,19 +129,19 @@ func solveCfmm(xReserve, yReserve, yIn sdk.Dec) sdk.Dec {
 	e := xy.Mul(x2py2) // xy(x^2 + y^2)
 
 	// t1 = -27 (b + y)^2 e
-	t1 := e.Mul(bpy2).MulInt64Mut(-27)
+	t1 := e.Mul(bpy2).MulInt64(-27)
 
 	// compute d = (b + y)^2 sqrt(729 e^2 + 108 (b+y)^8)
 	bpy8 := bpy4.Mul(bpy4)
-	sqrt_inner := e.MulMut(e).MulInt64Mut(729).AddMut(bpy8.MulInt64Mut(108)) // 729 e^2 + 108 (b+y)^8
+	sqrt_inner := e.Mul(e).MulInt64(729).Add(bpy8.MulInt64(108)) // 729 e^2 + 108 (b+y)^8
 	sqrt, err := sqrt_inner.ApproxSqrt()
 	if err != nil {
 		panic(err)
 	}
-	d := sqrt.MulMut(bpy2)
+	d := sqrt.Mul(bpy2)
 
 	// foo = (t1 + d)^(1/3)
-	foo3 := t1.AddMut(d)
+	foo3 := t1.Add(d)
 	foo, _ := foo3.ApproxRoot(3)
 
 	// a = {foo / (3 2^(1/3) (b + y))}
@@ -171,7 +172,7 @@ func solveCfmm(xReserve, yReserve, yIn sdk.Dec) sdk.Dec {
 // how many units `a` of x do we get out.
 // So we solve the following expression for `a`
 // xyz(x^2 + y^2 + w) = (x - a)(y + b)z((x - a)^2 + (y + b)^2 + w)
-func solveCfmmMulti(xReserve, yReserve, wSumSquares, yIn sdk.Dec) sdk.Dec {
+func solveCfmmMulti(xReserve, yReserve, wSumSquares, yIn osmomath.BigDec) osmomath.BigDec {
 	if !xReserve.IsPositive() || !yReserve.IsPositive() || !yIn.IsPositive() {
 		panic("invalid input: reserves and input must be positive")
 	}
@@ -275,23 +276,23 @@ func solveCfmmMulti(xReserve, yReserve, wSumSquares, yIn sdk.Dec) sdk.Dec {
 	return a
 }
 
-func approxDecEqual(a, b, tol sdk.Dec) bool {
+func approxDecEqual(a, b, tol osmomath.BigDec) bool {
 	diff := a.Sub(b).Abs()
 	return diff.Quo(a).LTE(tol) && diff.Quo(b).LTE(tol)
 }
 
 var (
-	twodec    = sdk.MustNewDecFromStr("2.0")
-	threshold = sdk.NewDecWithPrec(1, 10) // Correct within a factor of 1 * 10^{-10}
+	twodec    = osmomath.MustNewDecFromStr("2.0")
+	threshold = osmomath.NewDecWithPrec(1, 10) // Correct within a factor of 1 * 10^{-10}
 )
 
 // solveCFMMBinarySearch searches the correct dx using binary search over constant K.
 // added for future extension
-func solveCFMMBinarySearch(constantFunction func(sdk.Dec, sdk.Dec) sdk.Dec) func(sdk.Dec, sdk.Dec, sdk.Dec) sdk.Dec {
-	return func(xReserve, yReserve, yIn sdk.Dec) sdk.Dec {
+func solveCFMMBinarySearch(constantFunction func(osmomath.BigDec, osmomath.BigDec) osmomath.BigDec) func(osmomath.BigDec, osmomath.BigDec, osmomath.BigDec) osmomath.BigDec {
+	return func(xReserve, yReserve, yIn osmomath.BigDec) osmomath.BigDec {
 		k := constantFunction(xReserve, yReserve)
 		yf := yReserve.Add(yIn)
-		x_low_est := sdk.ZeroDec()
+		x_low_est := osmomath.ZeroDec()
 		x_high_est := xReserve
 		x_est := (x_high_est.Add(x_low_est)).Quo(twodec)
 		cur_k := constantFunction(x_est, yf)
@@ -310,11 +311,11 @@ func solveCFMMBinarySearch(constantFunction func(sdk.Dec, sdk.Dec) sdk.Dec) func
 
 // solveCFMMBinarySearch searches the correct dx using binary search over constant K.
 // added for future extension
-func solveCFMMBinarySearchMulti(constantFunction func(sdk.Dec, sdk.Dec, sdk.Dec, sdk.Dec) sdk.Dec) func(sdk.Dec, sdk.Dec, sdk.Dec, sdk.Dec, sdk.Dec) sdk.Dec {
-	return func(xReserve, yReserve, uReserve, wSumSquares, yIn sdk.Dec) sdk.Dec {
+func solveCFMMBinarySearchMulti(constantFunction func(osmomath.BigDec, osmomath.BigDec, osmomath.BigDec, osmomath.BigDec) osmomath.BigDec) func(osmomath.BigDec, osmomath.BigDec, osmomath.BigDec, osmomath.BigDec, osmomath.BigDec) osmomath.BigDec {
+	return func(xReserve, yReserve, uReserve, wSumSquares, yIn osmomath.BigDec) osmomath.BigDec {
 		k := constantFunction(xReserve, yReserve, uReserve, wSumSquares)
 		yf := yReserve.Add(yIn)
-		x_low_est := sdk.ZeroDec()
+		x_low_est := osmomath.ZeroDec()
 		x_high_est := xReserve
 		x_est := (x_high_est.Add(x_low_est)).Quo(twodec)
 		cur_k := constantFunction(x_est, yf, uReserve, wSumSquares)
@@ -331,7 +332,7 @@ func solveCFMMBinarySearchMulti(constantFunction func(sdk.Dec, sdk.Dec, sdk.Dec,
 	}
 }
 
-func spotPrice(baseReserve, quoteReserve sdk.Dec) sdk.Dec {
+func spotPrice(baseReserve, quoteReserve osmomath.BigDec) osmomath.BigDec {
 	// y = baseAsset, x = quoteAsset
 	// Define f_{y -> x}(a) as the function that outputs the amount of tokens X you'd get by
 	// trading "a" units of Y against the pool, assuming 0 swap fee, at the current liquidity.
@@ -346,7 +347,7 @@ func spotPrice(baseReserve, quoteReserve sdk.Dec) sdk.Dec {
 
 	// We arbitrarily choose a = 1, and anticipate that this is a small value at the scale of
 	// xReserve & yReserve.
-	a := sdk.OneDec()
+	a := osmomath.OneDec()
 	// no need to divide by a, since a = 1.
 	return solveCfmm(baseReserve, quoteReserve, a)
 }
@@ -359,9 +360,9 @@ func (p *Pool) calcOutAmtGivenIn(tokenIn sdk.Coin, tokenOutDenom string, swapFee
 	}
 	tokenInSupply, tokenOutSupply := reserves[0], reserves[1]
 	// We are solving for the amount of token out, hence x = tokenOutSupply, y = tokenInSupply
-	cfmmOut := solveCfmm(tokenOutSupply, tokenInSupply, tokenIn.Amount.ToDec())
+	cfmmOut := solveCfmm(osmomath.BigDecFromSdkDec(tokenOutSupply), osmomath.BigDecFromSdkDec(tokenInSupply), osmomath.BigDecFromSdkDec(tokenIn.Amount.ToDec()))
 	outAmt := p.getDescaledPoolAmt(tokenOutDenom, cfmmOut)
-	return outAmt, nil
+	return outAmt.SdkDec(), nil
 }
 
 // returns inAmt as a decimal
@@ -373,9 +374,9 @@ func (p *Pool) calcInAmtGivenOut(tokenOut sdk.Coin, tokenInDenom string, swapFee
 	tokenInSupply, tokenOutSupply := reserves[0], reserves[1]
 	// We are solving for the amount of token in, cfmm(x,y) = cfmm(x + x_in, y - y_out)
 	// x = tokenInSupply, y = tokenOutSupply, yIn = -tokenOutAmount
-	cfmmIn := solveCfmm(tokenInSupply, tokenOutSupply, tokenOut.Amount.ToDec().Neg())
-	inAmt := p.getDescaledPoolAmt(tokenInDenom, cfmmIn.NegMut())
-	return inAmt, nil
+	cfmmIn := solveCfmm(osmomath.BigDecFromSdkDec(tokenInSupply), osmomath.BigDecFromSdkDec(tokenOutSupply), osmomath.BigDecFromSdkDec(tokenOut.Amount.ToDec().Neg()))
+	inAmt := p.getDescaledPoolAmt(tokenInDenom, cfmmIn.Neg())
+	return inAmt.SdkDec(), nil
 }
 
 func (p *Pool) calcSingleAssetJoinShares(tokenIn sdk.Coin, swapFee sdk.Dec) (sdk.Int, error) {
diff --git a/x/gamm/pool-models/stableswap/pool.go b/x/gamm/pool-models/stableswap/pool.go
index 464c7a569..d88e63ab2 100644
--- a/x/gamm/pool-models/stableswap/pool.go
+++ b/x/gamm/pool-models/stableswap/pool.go
@@ -9,6 +9,7 @@ import (
 	sdk "github.com/cosmos/cosmos-sdk/types"
 	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
 
+	"github.com/osmosis-labs/osmosis/v12/osmomath"
 	"github.com/osmosis-labs/osmosis/v12/x/gamm/pool-models/internal/cfmm_common"
 	"github.com/osmosis-labs/osmosis/v12/x/gamm/types"
 )
@@ -128,7 +129,7 @@ func (p Pool) getScaledPoolAmts(denoms ...string) ([]sdk.Dec, error) {
 }
 
 // getDescaledPoolAmts gets descaled amount of given denom and amount
-func (p Pool) getDescaledPoolAmt(denom string, amount sdk.Dec) sdk.Dec {
+func (p Pool) getDescaledPoolAmt(denom string, amount osmomath.BigDec) osmomath.BigDec {
 	liquidityIndexes := p.getLiquidityIndexMap()
 	liquidityIndex := liquidityIndexes[denom]
 
@@ -241,10 +242,12 @@ func (p Pool) SpotPrice(ctx sdk.Context, baseAssetDenom string, quoteAssetDenom
 	if err != nil {
 		return sdk.Dec{}, err
 	}
-	scaledSpotPrice := spotPrice(reserves[0], reserves[1])
+
+	scaledSpotPrice := spotPrice(osmomath.BigDecFromSdkDec(reserves[0]), osmomath.BigDecFromSdkDec(reserves[1]))
 	spotPrice := p.getDescaledPoolAmt(baseAssetDenom, scaledSpotPrice)
+	spotPriceSdkDec := spotPrice.SdkDec()
 
-	return spotPrice, nil
+	return spotPriceSdkDec, nil
 }
 
 func (p Pool) Copy() Pool {
diff --git a/x/incentives/README.md b/x/incentives/README.md
index e4355f7c4..42a036480 100644
--- a/x/incentives/README.md
+++ b/x/incentives/README.md
@@ -302,8 +302,6 @@ In this section we describe the queries required on grpc server.
 service Query {
   // returns coins that is going to be distributed
   rpc ModuleToDistributeCoins(ModuleToDistributeCoinsRequest) returns (ModuleToDistributeCoinsResponse) {}
-  // returns coins that are distributed by module so far
-  rpc ModuleDistributedCoins(ModuleDistributedCoinsRequest) returns (ModuleDistributedCoinsResponse) {}
   // returns Gauge by id
   rpc GaugeByID(GaugeByIDRequest) returns (GaugeByIDResponse) {}
   // returns gauges both upcoming and active
diff --git a/x/incentives/client/cli/query.go b/x/incentives/client/cli/query.go
index 3e3e05840..2fbef68a6 100644
--- a/x/incentives/client/cli/query.go
+++ b/x/incentives/client/cli/query.go
@@ -30,7 +30,6 @@ func GetQueryCmd() *cobra.Command {
 	cmd.AddCommand(
 		GetCmdGauges(),
 		GetCmdToDistributeCoins(),
-		GetCmdDistributedCoins(),
 		GetCmdGaugeByID(),
 		GetCmdActiveGauges(),
 		GetCmdActiveGaugesPerDenom(),
@@ -122,42 +121,6 @@ $ %s query incentives to-distribute-coins
 	return cmd
 }
 
-// GetCmdDistributedCoins returns coins that have been distributed so far.
-func GetCmdDistributedCoins() *cobra.Command {
-	cmd := &cobra.Command{
-		Use:   "distributed-coins",
-		Short: "Query coins distributed so far",
-		Long: strings.TrimSpace(
-			fmt.Sprintf(`Query coins distributed so far.
-
-Example:
-$ %s query incentives distributed-coins
-`,
-				version.AppName,
-			),
-		),
-		Args: cobra.ExactArgs(0),
-		RunE: func(cmd *cobra.Command, args []string) error {
-			clientCtx, err := client.GetClientQueryContext(cmd)
-			if err != nil {
-				return err
-			}
-			queryClient := types.NewQueryClient(clientCtx)
-
-			res, err := queryClient.ModuleDistributedCoins(cmd.Context(), &types.ModuleDistributedCoinsRequest{})
-			if err != nil {
-				return err
-			}
-
-			return clientCtx.PrintProto(res)
-		},
-	}
-
-	flags.AddQueryFlagsToCmd(cmd)
-
-	return cmd
-}
-
 // GetCmdGaugeByID returns a gauge by ID.
 func GetCmdGaugeByID() *cobra.Command {
 	cmd := &cobra.Command{
diff --git a/x/incentives/keeper/grpc_query.go b/x/incentives/keeper/grpc_query.go
index 2aadbcfb5..c13894ebe 100644
--- a/x/incentives/keeper/grpc_query.go
+++ b/x/incentives/keeper/grpc_query.go
@@ -34,12 +34,6 @@ func (q Querier) ModuleToDistributeCoins(goCtx context.Context, _ *types.ModuleT
 	return &types.ModuleToDistributeCoinsResponse{Coins: q.Keeper.GetModuleToDistributeCoins(ctx)}, nil
 }
 
-// ModuleDistributedCoins returns coins that have been distributed by module already.
-func (q Querier) ModuleDistributedCoins(goCtx context.Context, _ *types.ModuleDistributedCoinsRequest) (*types.ModuleDistributedCoinsResponse, error) {
-	ctx := sdk.UnwrapSDKContext(goCtx)
-	return &types.ModuleDistributedCoinsResponse{Coins: q.Keeper.GetModuleDistributedCoins(ctx)}, nil
-}
-
 // GaugeByID takes a gaugeID and returns its respective gauge.
 func (q Querier) GaugeByID(goCtx context.Context, req *types.GaugeByIDRequest) (*types.GaugeByIDResponse, error) {
 	if req == nil {
diff --git a/x/incentives/types/query.pb.go b/x/incentives/types/query.pb.go
index f1f60d6a0..e0c650d20 100644
--- a/x/incentives/types/query.pb.go
+++ b/x/incentives/types/query.pb.go
@@ -118,87 +118,6 @@ func (m *ModuleToDistributeCoinsResponse) GetCoins() github_com_cosmos_cosmos_sd
 	return nil
 }
 
-type ModuleDistributedCoinsRequest struct {
-}
-
-func (m *ModuleDistributedCoinsRequest) Reset()         { *m = ModuleDistributedCoinsRequest{} }
-func (m *ModuleDistributedCoinsRequest) String() string { return proto.CompactTextString(m) }
-func (*ModuleDistributedCoinsRequest) ProtoMessage()    {}
-func (*ModuleDistributedCoinsRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{2}
-}
-func (m *ModuleDistributedCoinsRequest) XXX_Unmarshal(b []byte) error {
-	return m.Unmarshal(b)
-}
-func (m *ModuleDistributedCoinsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	if deterministic {
-		return xxx_messageInfo_ModuleDistributedCoinsRequest.Marshal(b, m, deterministic)
-	} else {
-		b = b[:cap(b)]
-		n, err := m.MarshalToSizedBuffer(b)
-		if err != nil {
-			return nil, err
-		}
-		return b[:n], nil
-	}
-}
-func (m *ModuleDistributedCoinsRequest) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ModuleDistributedCoinsRequest.Merge(m, src)
-}
-func (m *ModuleDistributedCoinsRequest) XXX_Size() int {
-	return m.Size()
-}
-func (m *ModuleDistributedCoinsRequest) XXX_DiscardUnknown() {
-	xxx_messageInfo_ModuleDistributedCoinsRequest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ModuleDistributedCoinsRequest proto.InternalMessageInfo
-
-type ModuleDistributedCoinsResponse struct {
-	// Coins that have been distributed already
-	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
-}
-
-func (m *ModuleDistributedCoinsResponse) Reset()         { *m = ModuleDistributedCoinsResponse{} }
-func (m *ModuleDistributedCoinsResponse) String() string { return proto.CompactTextString(m) }
-func (*ModuleDistributedCoinsResponse) ProtoMessage()    {}
-func (*ModuleDistributedCoinsResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{3}
-}
-func (m *ModuleDistributedCoinsResponse) XXX_Unmarshal(b []byte) error {
-	return m.Unmarshal(b)
-}
-func (m *ModuleDistributedCoinsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	if deterministic {
-		return xxx_messageInfo_ModuleDistributedCoinsResponse.Marshal(b, m, deterministic)
-	} else {
-		b = b[:cap(b)]
-		n, err := m.MarshalToSizedBuffer(b)
-		if err != nil {
-			return nil, err
-		}
-		return b[:n], nil
-	}
-}
-func (m *ModuleDistributedCoinsResponse) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ModuleDistributedCoinsResponse.Merge(m, src)
-}
-func (m *ModuleDistributedCoinsResponse) XXX_Size() int {
-	return m.Size()
-}
-func (m *ModuleDistributedCoinsResponse) XXX_DiscardUnknown() {
-	xxx_messageInfo_ModuleDistributedCoinsResponse.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ModuleDistributedCoinsResponse proto.InternalMessageInfo
-
-func (m *ModuleDistributedCoinsResponse) GetCoins() github_com_cosmos_cosmos_sdk_types.Coins {
-	if m != nil {
-		return m.Coins
-	}
-	return nil
-}
-
 type GaugeByIDRequest struct {
 	// Gague ID being queried
 	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
@@ -208,7 +127,7 @@ func (m *GaugeByIDRequest) Reset()         { *m = GaugeByIDRequest{} }
 func (m *GaugeByIDRequest) String() string { return proto.CompactTextString(m) }
 func (*GaugeByIDRequest) ProtoMessage()    {}
 func (*GaugeByIDRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{4}
+	return fileDescriptor_8124258a89427f98, []int{2}
 }
 func (m *GaugeByIDRequest) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -253,7 +172,7 @@ func (m *GaugeByIDResponse) Reset()         { *m = GaugeByIDResponse{} }
 func (m *GaugeByIDResponse) String() string { return proto.CompactTextString(m) }
 func (*GaugeByIDResponse) ProtoMessage()    {}
 func (*GaugeByIDResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{5}
+	return fileDescriptor_8124258a89427f98, []int{3}
 }
 func (m *GaugeByIDResponse) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -298,7 +217,7 @@ func (m *GaugesRequest) Reset()         { *m = GaugesRequest{} }
 func (m *GaugesRequest) String() string { return proto.CompactTextString(m) }
 func (*GaugesRequest) ProtoMessage()    {}
 func (*GaugesRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{6}
+	return fileDescriptor_8124258a89427f98, []int{4}
 }
 func (m *GaugesRequest) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -345,7 +264,7 @@ func (m *GaugesResponse) Reset()         { *m = GaugesResponse{} }
 func (m *GaugesResponse) String() string { return proto.CompactTextString(m) }
 func (*GaugesResponse) ProtoMessage()    {}
 func (*GaugesResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{7}
+	return fileDescriptor_8124258a89427f98, []int{5}
 }
 func (m *GaugesResponse) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -397,7 +316,7 @@ func (m *ActiveGaugesRequest) Reset()         { *m = ActiveGaugesRequest{} }
 func (m *ActiveGaugesRequest) String() string { return proto.CompactTextString(m) }
 func (*ActiveGaugesRequest) ProtoMessage()    {}
 func (*ActiveGaugesRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{8}
+	return fileDescriptor_8124258a89427f98, []int{6}
 }
 func (m *ActiveGaugesRequest) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -444,7 +363,7 @@ func (m *ActiveGaugesResponse) Reset()         { *m = ActiveGaugesResponse{} }
 func (m *ActiveGaugesResponse) String() string { return proto.CompactTextString(m) }
 func (*ActiveGaugesResponse) ProtoMessage()    {}
 func (*ActiveGaugesResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{9}
+	return fileDescriptor_8124258a89427f98, []int{7}
 }
 func (m *ActiveGaugesResponse) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -498,7 +417,7 @@ func (m *ActiveGaugesPerDenomRequest) Reset()         { *m = ActiveGaugesPerDeno
 func (m *ActiveGaugesPerDenomRequest) String() string { return proto.CompactTextString(m) }
 func (*ActiveGaugesPerDenomRequest) ProtoMessage()    {}
 func (*ActiveGaugesPerDenomRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{10}
+	return fileDescriptor_8124258a89427f98, []int{8}
 }
 func (m *ActiveGaugesPerDenomRequest) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -552,7 +471,7 @@ func (m *ActiveGaugesPerDenomResponse) Reset()         { *m = ActiveGaugesPerDen
 func (m *ActiveGaugesPerDenomResponse) String() string { return proto.CompactTextString(m) }
 func (*ActiveGaugesPerDenomResponse) ProtoMessage()    {}
 func (*ActiveGaugesPerDenomResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{11}
+	return fileDescriptor_8124258a89427f98, []int{9}
 }
 func (m *ActiveGaugesPerDenomResponse) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -604,7 +523,7 @@ func (m *UpcomingGaugesRequest) Reset()         { *m = UpcomingGaugesRequest{} }
 func (m *UpcomingGaugesRequest) String() string { return proto.CompactTextString(m) }
 func (*UpcomingGaugesRequest) ProtoMessage()    {}
 func (*UpcomingGaugesRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{12}
+	return fileDescriptor_8124258a89427f98, []int{10}
 }
 func (m *UpcomingGaugesRequest) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -651,7 +570,7 @@ func (m *UpcomingGaugesResponse) Reset()         { *m = UpcomingGaugesResponse{}
 func (m *UpcomingGaugesResponse) String() string { return proto.CompactTextString(m) }
 func (*UpcomingGaugesResponse) ProtoMessage()    {}
 func (*UpcomingGaugesResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{13}
+	return fileDescriptor_8124258a89427f98, []int{11}
 }
 func (m *UpcomingGaugesResponse) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -705,7 +624,7 @@ func (m *UpcomingGaugesPerDenomRequest) Reset()         { *m = UpcomingGaugesPer
 func (m *UpcomingGaugesPerDenomRequest) String() string { return proto.CompactTextString(m) }
 func (*UpcomingGaugesPerDenomRequest) ProtoMessage()    {}
 func (*UpcomingGaugesPerDenomRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{14}
+	return fileDescriptor_8124258a89427f98, []int{12}
 }
 func (m *UpcomingGaugesPerDenomRequest) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -759,7 +678,7 @@ func (m *UpcomingGaugesPerDenomResponse) Reset()         { *m = UpcomingGaugesPe
 func (m *UpcomingGaugesPerDenomResponse) String() string { return proto.CompactTextString(m) }
 func (*UpcomingGaugesPerDenomResponse) ProtoMessage()    {}
 func (*UpcomingGaugesPerDenomResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{15}
+	return fileDescriptor_8124258a89427f98, []int{13}
 }
 func (m *UpcomingGaugesPerDenomResponse) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -816,7 +735,7 @@ func (m *RewardsEstRequest) Reset()         { *m = RewardsEstRequest{} }
 func (m *RewardsEstRequest) String() string { return proto.CompactTextString(m) }
 func (*RewardsEstRequest) ProtoMessage()    {}
 func (*RewardsEstRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{16}
+	return fileDescriptor_8124258a89427f98, []int{14}
 }
 func (m *RewardsEstRequest) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -876,7 +795,7 @@ func (m *RewardsEstResponse) Reset()         { *m = RewardsEstResponse{} }
 func (m *RewardsEstResponse) String() string { return proto.CompactTextString(m) }
 func (*RewardsEstResponse) ProtoMessage()    {}
 func (*RewardsEstResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{17}
+	return fileDescriptor_8124258a89427f98, []int{15}
 }
 func (m *RewardsEstResponse) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -919,7 +838,7 @@ func (m *QueryLockableDurationsRequest) Reset()         { *m = QueryLockableDura
 func (m *QueryLockableDurationsRequest) String() string { return proto.CompactTextString(m) }
 func (*QueryLockableDurationsRequest) ProtoMessage()    {}
 func (*QueryLockableDurationsRequest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{18}
+	return fileDescriptor_8124258a89427f98, []int{16}
 }
 func (m *QueryLockableDurationsRequest) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -957,7 +876,7 @@ func (m *QueryLockableDurationsResponse) Reset()         { *m = QueryLockableDur
 func (m *QueryLockableDurationsResponse) String() string { return proto.CompactTextString(m) }
 func (*QueryLockableDurationsResponse) ProtoMessage()    {}
 func (*QueryLockableDurationsResponse) Descriptor() ([]byte, []int) {
-	return fileDescriptor_8124258a89427f98, []int{19}
+	return fileDescriptor_8124258a89427f98, []int{17}
 }
 func (m *QueryLockableDurationsResponse) XXX_Unmarshal(b []byte) error {
 	return m.Unmarshal(b)
@@ -996,8 +915,6 @@ func (m *QueryLockableDurationsResponse) GetLockableDurations() []time.Duration
 func init() {
 	proto.RegisterType((*ModuleToDistributeCoinsRequest)(nil), "osmosis.incentives.ModuleToDistributeCoinsRequest")
 	proto.RegisterType((*ModuleToDistributeCoinsResponse)(nil), "osmosis.incentives.ModuleToDistributeCoinsResponse")
-	proto.RegisterType((*ModuleDistributedCoinsRequest)(nil), "osmosis.incentives.ModuleDistributedCoinsRequest")
-	proto.RegisterType((*ModuleDistributedCoinsResponse)(nil), "osmosis.incentives.ModuleDistributedCoinsResponse")
 	proto.RegisterType((*GaugeByIDRequest)(nil), "osmosis.incentives.GaugeByIDRequest")
 	proto.RegisterType((*GaugeByIDResponse)(nil), "osmosis.incentives.GaugeByIDResponse")
 	proto.RegisterType((*GaugesRequest)(nil), "osmosis.incentives.GaugesRequest")
@@ -1019,76 +936,73 @@ func init() {
 func init() { proto.RegisterFile("osmosis/incentives/query.proto", fileDescriptor_8124258a89427f98) }
 
 var fileDescriptor_8124258a89427f98 = []byte{
-	// 1105 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0x4f, 0x6f, 0x1b, 0xc5,
-	0x1b, 0xc7, 0x33, 0x4e, 0xdc, 0x5f, 0xf3, 0xfc, 0xda, 0xd0, 0x0c, 0xa1, 0x24, 0x6e, 0xbb, 0x36,
-	0xab, 0x36, 0x75, 0x53, 0xb2, 0x1b, 0xdb, 0x6d,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x3e, 0xb3, 0x32, 0x89, 0xab, 0xc4, 0x2c, 0x71,
-	0xcc, 0x55, 0x7c, 0x3d, 0x09, 0x73, 0x40, 0xae, 0xf0, 0x6f, 0x43, 0xe2, 0xdf, 0x99, 0x6c, 0x61,
-	0x7c, 0xed, 0xc1, 0xd9, 0x16, 0x8f, 0x12, 0x22, 0xb1, 0xdf, 0xe2, 0xd8, 0xb7, 0xf0, 0xcd, 0x23,
-	0x60, 0xf7, 0xcc, 0x77, 0x0f, 0x01, 0x74, 0xb5, 0x07, 0xc7, 0xfe, 0x30, 0x87, 0x04, 0x31, 0xb3,
-	0x3c, 0xce, 0x4d, 0xc2, 0xdd, 0xe2, 0x70, 0x05, 0xac, 0x27, 0xc1, 0xb5, 0x44, 0x9c, 0x49, 0x98,
-	0xaf, 0xef, 0x70, 0x21, 0xdd, 0xc5, 0x3f, 0x21, 0x98, 0x1f, 0x92, 0x9c, 0xf8, 0x91, 0x26, 0x0a,
-	0x58, 0xfc, 0x48, 0x93, 0x15, 0x4d, 0x5d, 0xe7, 0xd4, 0x6b, 0x58, 0x4b, 0xa2, 0x1e, 0x16, 0xac,
-	0xf2, 0xc6, 0xe3, 0x03, 0x05, 0x3d, 0x39, 0x50, 0xd0, 0x5f, 0x07, 0x0a, 0xfa, 0xf6, 0x50, 0x99,
-	0x7a, 0x72, 0xa8, 0x4c, 0xfd, 0x79, 0xa8, 0x4c, 0x7d, 0xb6, 0xde, 0x23, 0xcc, 0x32, 0xe7, 0x6a,
-	0xdd, 0xaa, 0xb2, 0x4e, 0x81, 0xad, 0x42, 0x51, 0xff, 0xb2, 0xb7, 0x0c, 0x17, 0xeb, 0xea, 0x29,
-	0xae, 0x9b, 0xa5, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x78, 0x62, 0x75, 0x39, 0x8a, 0x10, 0x00,
+	// 1057 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff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f7, 0xf8, 0xb7, 0x91, 0xe5, 0xd9, 0x53, 0xb6, 0x34,
+	0xb9, 0xf6, 0xb0, 0xb6, 0xe5, 0xe3, 0x84, 0x48, 0xec, 0xb7, 0x05, 0xf6, 0x2d, 0x7c, 0xf3, 0x18,
+	0xd8, 0x31, 0x7d, 0xf7, 0x10, 0x40, 0x7f, 0x76, 0xe3, 0xc4, 0x1f, 0xe6, 0xc8, 0x42, 0xc9, 0x2d,
+	0x4f, 0x72, 0x93, 0x70, 0xb7, 0x04, 0x5c, 0x09, 0x93, 0x34, 0xb8, 0x4e, 0x18, 0x67, 0x50, 0xee,
+	0x91, 0x1d, 0xb1, 0x88, 0x76, 0xf1, 0xcf, 0x08, 0xe6, 0x47, 0x46, 0x76, 0xb2, 0xa4, 0xa9, 0x0b,
+	0x20, 0x59, 0xd2, 0xf4, 0x8d, 0xa0, 0xae, 0x0b, 0xea, 0x35, 0xac, 0xa5, 0x51, 0x8f, 0x0e, 0xfc,
+	0xea, 0xc6, 0xa3, 0x03, 0x05, 0x3d, 0x3e, 0x50, 0xd0, 0xdf, 0x07, 0x0a, 0xfa, 0xf6, 0x50, 0x99,
+	0x7a, 0x7c, 0xa8, 0x4c, 0xfd, 0x75, 0xa8, 0x4c, 0x7d, 0xbe, 0x1e, 0x5b, 0x6c, 0x32, 0xe7, 0x6a,
+	0xd3, 0xac, 0xf3, 0x5e, 0x81, 0xad, 0x52, 0x99, 0x7c, 0x15, 0x2f, 0x23, 0x96, 0x5d, 0xfd, 0x8c,
+	0xd8, 0x3b, 0x95, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xab, 0x12, 0x45, 0x20, 0x23, 0x0f, 0x00,
 	0x00,
 }
 
@@ -1106,9 +1020,6 @@ const _ = grpc.SupportPackageIsVersion4
 type QueryClient interface {
 	// ModuleToDistributeCoins returns coins that are going to be distributed
 	ModuleToDistributeCoins(ctx context.Context, in *ModuleToDistributeCoinsRequest, opts ...grpc.CallOption) (*ModuleToDistributeCoinsResponse, error)
-	// ModuleDistributedCoins returns coins that are distributed by the module so
-	// far
-	ModuleDistributedCoins(ctx context.Context, in *ModuleDistributedCoinsRequest, opts ...grpc.CallOption) (*ModuleDistributedCoinsResponse, error)
 	// GaugeByID returns gauges by their respective ID
 	GaugeByID(ctx context.Context, in *GaugeByIDRequest, opts ...grpc.CallOption) (*GaugeByIDResponse, error)
 	// Gauges returns both upcoming and active gauges
@@ -1148,15 +1059,6 @@ func (c *queryClient) ModuleToDistributeCoins(ctx context.Context, in *ModuleToD
 	return out, nil
 }
 
-func (c *queryClient) ModuleDistributedCoins(ctx context.Context, in *ModuleDistributedCoinsRequest, opts ...grpc.CallOption) (*ModuleDistributedCoinsResponse, error) {
-	out := new(ModuleDistributedCoinsResponse)
-	err := c.cc.Invoke(ctx, "/osmosis.incentives.Query/ModuleDistributedCoins", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
 func (c *queryClient) GaugeByID(ctx context.Context, in *GaugeByIDRequest, opts ...grpc.CallOption) (*GaugeByIDResponse, error) {
 	out := new(GaugeByIDResponse)
 	err := c.cc.Invoke(ctx, "/osmosis.incentives.Query/GaugeByID", in, out, opts...)
@@ -1233,9 +1135,6 @@ func (c *queryClient) LockableDurations(ctx context.Context, in *QueryLockableDu
 type QueryServer interface {
 	// ModuleToDistributeCoins returns coins that are going to be distributed
 	ModuleToDistributeCoins(context.Context, *ModuleToDistributeCoinsRequest) (*ModuleToDistributeCoinsResponse, error)
-	// ModuleDistributedCoins returns coins that are distributed by the module so
-	// far
-	ModuleDistributedCoins(context.Context, *ModuleDistributedCoinsRequest) (*ModuleDistributedCoinsResponse, error)
 	// GaugeByID returns gauges by their respective ID
 	GaugeByID(context.Context, *GaugeByIDRequest) (*GaugeByIDResponse, error)
 	// Gauges returns both upcoming and active gauges
@@ -1265,9 +1164,6 @@ type UnimplementedQueryServer struct {
 func (*UnimplementedQueryServer) ModuleToDistributeCoins(ctx context.Context, req *ModuleToDistributeCoinsRequest) (*ModuleToDistributeCoinsResponse, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method ModuleToDistributeCoins not implemented")
 }
-func (*UnimplementedQueryServer) ModuleDistributedCoins(ctx context.Context, req *ModuleDistributedCoinsRequest) (*ModuleDistributedCoinsResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method ModuleDistributedCoins not implemented")
-}
 func (*UnimplementedQueryServer) GaugeByID(ctx context.Context, req *GaugeByIDRequest) (*GaugeByIDResponse, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GaugeByID not implemented")
 }
@@ -1315,24 +1211,6 @@ func _Query_ModuleToDistributeCoins_Handler(srv interface{}, ctx context.Context
 	return interceptor(ctx, in, info, handler)
 }
 
-func _Query_ModuleDistributedCoins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(ModuleDistributedCoinsRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(QueryServer).ModuleDistributedCoins(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/osmosis.incentives.Query/ModuleDistributedCoins",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(QueryServer).ModuleDistributedCoins(ctx, req.(*ModuleDistributedCoinsRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
 func _Query_GaugeByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(GaugeByIDRequest)
 	if err := dec(in); err != nil {
@@ -1485,10 +1363,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{
 			MethodName: "ModuleToDistributeCoins",
 			Handler:    _Query_ModuleToDistributeCoins_Handler,
 		},
-		{
-			MethodName: "ModuleDistributedCoins",
-			Handler:    _Query_ModuleDistributedCoins_Handler,
-		},
 		{
 			MethodName: "GaugeByID",
 			Handler:    _Query_GaugeByID_Handler,
@@ -1586,66 +1460,6 @@ func (m *ModuleToDistributeCoinsResponse) MarshalToSizedBuffer(dAtA []byte) (int
 	return len(dAtA) - i, nil
 }
 
-func (m *ModuleDistributedCoinsRequest) Marshal() (dAtA []byte, err error) {
-	size := m.Size()
-	dAtA = make([]byte, size)
-	n, err := m.MarshalToSizedBuffer(dAtA[:size])
-	if err != nil {
-		return nil, err
-	}
-	return dAtA[:n], nil
-}
-
-func (m *ModuleDistributedCoinsRequest) MarshalTo(dAtA []byte) (int, error) {
-	size := m.Size()
-	return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ModuleDistributedCoinsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
-	i := len(dAtA)
-	_ = i
-	var l int
-	_ = l
-	return len(dAtA) - i, nil
-}
-
-func (m *ModuleDistributedCoinsResponse) Marshal() (dAtA []byte, err error) {
-	size := m.Size()
-	dAtA = make([]byte, size)
-	n, err := m.MarshalToSizedBuffer(dAtA[:size])
-	if err != nil {
-		return nil, err
-	}
-	return dAtA[:n], nil
-}
-
-func (m *ModuleDistributedCoinsResponse) MarshalTo(dAtA []byte) (int, error) {
-	size := m.Size()
-	return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *ModuleDistributedCoinsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
-	i := len(dAtA)
-	_ = i
-	var l int
-	_ = l
-	if len(m.Coins) > 0 {
-		for iNdEx := len(m.Coins) - 1; iNdEx >= 0; iNdEx-- {
-			{
-				size, err := m.Coins[iNdEx].MarshalToSizedBuffer(dAtA[:i])
-				if err != nil {
-					return 0, err
-				}
-				i -= size
-				i = encodeVarintQuery(dAtA, i, uint64(size))
-			}
-			i--
-			dAtA[i] = 0xa
-		}
-	}
-	return len(dAtA) - i, nil
-}
-
 func (m *GaugeByIDRequest) Marshal() (dAtA []byte, err error) {
 	size := m.Size()
 	dAtA = make([]byte, size)
@@ -2326,30 +2140,6 @@ func (m *ModuleToDistributeCoinsResponse) Size() (n int) {
 	return n
 }
 
-func (m *ModuleDistributedCoinsRequest) Size() (n int) {
-	if m == nil {
-		return 0
-	}
-	var l int
-	_ = l
-	return n
-}
-
-func (m *ModuleDistributedCoinsResponse) Size() (n int) {
-	if m == nil {
-		return 0
-	}
-	var l int
-	_ = l
-	if len(m.Coins) > 0 {
-		for _, e := range m.Coins {
-			l = e.Size()
-			n += 1 + l + sovQuery(uint64(l))
-		}
-	}
-	return n
-}
-
 func (m *GaugeByIDRequest) Size() (n int) {
 	if m == nil {
 		return 0
@@ -2745,140 +2535,6 @@ func (m *ModuleToDistributeCoinsResponse) Unmarshal(dAtA []byte) error {
 	}
 	return nil
 }
-func (m *ModuleDistributedCoinsRequest) Unmarshal(dAtA []byte) error {
-	l := len(dAtA)
-	iNdEx := 0
-	for iNdEx < l {
-		preIndex := iNdEx
-		var wire uint64
-		for shift := uint(0); ; shift += 7 {
-			if shift >= 64 {
-				return ErrIntOverflowQuery
-			}
-			if iNdEx >= l {
-				return io.ErrUnexpectedEOF
-			}
-			b := dAtA[iNdEx]
-			iNdEx++
-			wire |= uint64(b&0x7F) << shift
-			if b < 0x80 {
-				break
-			}
-		}
-		fieldNum := int32(wire >> 3)
-		wireType := int(wire & 0x7)
-		if wireType == 4 {
-			return fmt.Errorf("proto: ModuleDistributedCoinsRequest: wiretype end group for non-group")
-		}
-		if fieldNum <= 0 {
-			return fmt.Errorf("proto: ModuleDistributedCoinsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
-		}
-		switch fieldNum {
-		default:
-			iNdEx = preIndex
-			skippy, err := skipQuery(dAtA[iNdEx:])
-			if err != nil {
-				return err
-			}
-			if (skippy < 0) || (iNdEx+skippy) < 0 {
-				return ErrInvalidLengthQuery
-			}
-			if (iNdEx + skippy) > l {
-				return io.ErrUnexpectedEOF
-			}
-			iNdEx += skippy
-		}
-	}
-
-	if iNdEx > l {
-		return io.ErrUnexpectedEOF
-	}
-	return nil
-}
-func (m *ModuleDistributedCoinsResponse) Unmarshal(dAtA []byte) error {
-	l := len(dAtA)
-	iNdEx := 0
-	for iNdEx < l {
-		preIndex := iNdEx
-		var wire uint64
-		for shift := uint(0); ; shift += 7 {
-			if shift >= 64 {
-				return ErrIntOverflowQuery
-			}
-			if iNdEx >= l {
-				return io.ErrUnexpectedEOF
-			}
-			b := dAtA[iNdEx]
-			iNdEx++
-			wire |= uint64(b&0x7F) << shift
-			if b < 0x80 {
-				break
-			}
-		}
-		fieldNum := int32(wire >> 3)
-		wireType := int(wire & 0x7)
-		if wireType == 4 {
-			return fmt.Errorf("proto: ModuleDistributedCoinsResponse: wiretype end group for non-group")
-		}
-		if fieldNum <= 0 {
-			return fmt.Errorf("proto: ModuleDistributedCoinsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
-		}
-		switch fieldNum {
-		case 1:
-			if wireType != 2 {
-				return fmt.Errorf("proto: wrong wireType = %d for field Coins", wireType)
-			}
-			var msglen int
-			for shift := uint(0); ; shift += 7 {
-				if shift >= 64 {
-					return ErrIntOverflowQuery
-				}
-				if iNdEx >= l {
-					return io.ErrUnexpectedEOF
-				}
-				b := dAtA[iNdEx]
-				iNdEx++
-				msglen |= int(b&0x7F) << shift
-				if b < 0x80 {
-					break
-				}
-			}
-			if msglen < 0 {
-				return ErrInvalidLengthQuery
-			}
-			postIndex := iNdEx + msglen
-			if postIndex < 0 {
-				return ErrInvalidLengthQuery
-			}
-			if postIndex > l {
-				return io.ErrUnexpectedEOF
-			}
-			m.Coins = append(m.Coins, types.Coin{})
-			if err := m.Coins[len(m.Coins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
-				return err
-			}
-			iNdEx = postIndex
-		default:
-			iNdEx = preIndex
-			skippy, err := skipQuery(dAtA[iNdEx:])
-			if err != nil {
-				return err
-			}
-			if (skippy < 0) || (iNdEx+skippy) < 0 {
-				return ErrInvalidLengthQuery
-			}
-			if (iNdEx + skippy) > l {
-				return io.ErrUnexpectedEOF
-			}
-			iNdEx += skippy
-		}
-	}
-
-	if iNdEx > l {
-		return io.ErrUnexpectedEOF
-	}
-	return nil
-}
 func (m *GaugeByIDRequest) Unmarshal(dAtA []byte) error {
 	l := len(dAtA)
 	iNdEx := 0
diff --git a/x/incentives/types/query.pb.gw.go b/x/incentives/types/query.pb.gw.go
index 4e1b1e222..cceb75c07 100644
--- a/x/incentives/types/query.pb.gw.go
+++ b/x/incentives/types/query.pb.gw.go
@@ -51,24 +51,6 @@ func local_request_Query_ModuleToDistributeCoins_0(ctx context.Context, marshale
 
 }
 
-func request_Query_ModuleDistributedCoins_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ModuleDistributedCoinsRequest
-	var metadata runtime.ServerMetadata
-
-	msg, err := client.ModuleDistributedCoins(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
-	return msg, metadata, err
-
-}
-
-func local_request_Query_ModuleDistributedCoins_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
-	var protoReq ModuleDistributedCoinsRequest
-	var metadata runtime.ServerMetadata
-
-	msg, err := server.ModuleDistributedCoins(ctx, &protoReq)
-	return msg, metadata, err
-
-}
-
 func request_Query_GaugeByID_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
 	var protoReq GaugeByIDRequest
 	var metadata runtime.ServerMetadata
@@ -422,29 +404,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
 
 	})
 
-	mux.Handle("GET", pattern_Query_ModuleDistributedCoins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		var stream runtime.ServerTransportStream
-		ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := local_request_Query_ModuleDistributedCoins_0(rctx, inboundMarshaler, server, req, pathParams)
-		md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_Query_ModuleDistributedCoins_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
 	mux.Handle("GET", pattern_Query_GaugeByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
 		ctx, cancel := context.WithCancel(req.Context())
 		defer cancel()
@@ -690,26 +649,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
 
 	})
 
-	mux.Handle("GET", pattern_Query_ModuleDistributedCoins_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
-		ctx, cancel := context.WithCancel(req.Context())
-		defer cancel()
-		inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
-		rctx, err := runtime.AnnotateContext(ctx, mux, req)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-		resp, md, err := request_Query_ModuleDistributedCoins_0(rctx, inboundMarshaler, client, req, pathParams)
-		ctx = runtime.NewServerMetadataContext(ctx, md)
-		if err != nil {
-			runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
-			return
-		}
-
-		forward_Query_ModuleDistributedCoins_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
-
-	})
-
 	mux.Handle("GET", pattern_Query_GaugeByID_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
 		ctx, cancel := context.WithCancel(req.Context())
 		defer cancel()
@@ -876,8 +815,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
 var (
 	pattern_Query_ModuleToDistributeCoins_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "incentives", "v1beta1", "module_to_distribute_coins"}, "", runtime.AssumeColonVerbOpt(false)))
 
-	pattern_Query_ModuleDistributedCoins_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "incentives", "v1beta1", "module_distributed_coins"}, "", runtime.AssumeColonVerbOpt(false)))
-
 	pattern_Query_GaugeByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "incentives", "v1beta1", "gauge_by_id", "id"}, "", runtime.AssumeColonVerbOpt(false)))
 
 	pattern_Query_Gauges_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"osmosis", "incentives", "v1beta1", "gauges"}, "", runtime.AssumeColonVerbOpt(false)))
@@ -898,8 +835,6 @@ var (
 var (
 	forward_Query_ModuleToDistributeCoins_0 = runtime.ForwardResponseMessage
 
-	forward_Query_ModuleDistributedCoins_0 = runtime.ForwardResponseMessage
-
 	forward_Query_GaugeByID_0 = runtime.ForwardResponseMessage
 
 	forward_Query_Gauges_0 = runtime.ForwardResponseMessage
diff --git a/x/twap/types/utils.go b/x/twap/types/utils.go
index 18ce483ec..2674aa861 100644
--- a/x/twap/types/utils.go
+++ b/x/twap/types/utils.go
@@ -6,31 +6,28 @@ import (
 	"time"
 
 	sdk "github.com/cosmos/cosmos-sdk/types"
-
-	"github.com/osmosis-labs/osmosis/v12/osmoutils"
 )
 
 var MaxSpotPrice = sdk.NewDec(2).Power(128).Sub(sdk.OneDec())
 
 // GetAllUniqueDenomPairs returns all unique pairs of denoms, where for every pair
-// (X, Y), X > Y.
+// (X, Y), X < Y.
 // The pair (X,Y) should only appear once in the list
 // Panics if finds duplicate pairs.
 //
 // NOTE: Sorts the input denoms slice.
 func GetAllUniqueDenomPairs(denoms []string) ([]string, []string) {
-	// get denoms in descending order
+	// get denoms in ascending order
 	sort.Strings(denoms)
-	reverseDenoms := osmoutils.ReverseSlice(denoms)
 
 	numPairs := len(denoms) * (len(denoms) - 1) / 2
 	pairGT := make([]string, 0, numPairs)
 	pairLT := make([]string, 0, numPairs)
 
-	for i := 0; i < len(reverseDenoms); i++ {
-		for j := i + 1; j < len(reverseDenoms); j++ {
-			pairGT = append(pairGT, reverseDenoms[i])
-			pairLT = append(pairLT, reverseDenoms[j])
+	for i := 0; i < len(denoms); i++ {
+		for j := i + 1; j < len(denoms); j++ {
+			pairGT = append(pairGT, denoms[i])
+			pairLT = append(pairLT, denoms[j])
 		}
 	}
 	// sanity check


Test patch:
diff --git a/osmomath/decimal_test.go b/osmomath/decimal_test.go
index f02e581cb..b5441930e 100644
--- a/osmomath/decimal_test.go
+++ b/osmomath/decimal_test.go
@@ -7,6 +7,7 @@ import (
 	"math/big"
 	"testing"
 
+	sdk "github.com/cosmos/cosmos-sdk/types"
 	"github.com/stretchr/testify/require"
 	"github.com/stretchr/testify/suite"
 	"gopkg.in/yaml.v2"
@@ -68,9 +69,9 @@ func (s *decimalTestSuite) TestNewDecFromStr() {
 		{"0.75", false, NewDecWithPrec(75, 2)},
 		{"0.8", false, NewDecWithPrec(8, 1)},
 		{"0.11111", false, NewDecWithPrec(11111, 5)},
-		{"314460551102969.3144278234343371835", true, NewBigDec(3141203149163817869)},
+		{"314460551102969.31442782343433718353144278234343371835", true, NewBigDec(3141203149163817869)},
 		{
-			"314460551102969314427823434337.1835718092488231350",
+			"314460551102969314427823434337.18357180924882313501835718092488231350",
 			true, NewDecFromBigIntWithPrec(largeBigInt, 4),
 		},
 		{
@@ -83,7 +84,7 @@ func (s *decimalTestSuite) TestNewDecFromStr() {
 		{"foobar", true, BigDec{}},
 		{"0.foobar", true, BigDec{}},
 		{"0.foobar.", true, BigDec{}},
-		{"23258839177459420497578361852416145099316523541994177929007686373780457219628733546438113622840434097944400691400517693873107252115668992", true, BigDec{}},
+		{"179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329624224137216", true, BigDec{}},
 	}
 
 	for tcIndex, tc := range tests {
@@ -112,14 +113,15 @@ func (s *decimalTestSuite) TestDecString() {
 		d    BigDec
 		want string
 	}{
-		{NewBigDec(0), "0.000000000000000000"},
-		{NewBigDec(1), "1.000000000000000000"},
-		{NewBigDec(10), "10.000000000000000000"},
-		{NewBigDec(12340), "12340.000000000000000000"},
-		{NewDecWithPrec(12340, 4), "1.234000000000000000"},
-		{NewDecWithPrec(12340, 5), "0.123400000000000000"},
-		{NewDecWithPrec(12340, 8), "0.000123400000000000"},
-		{NewDecWithPrec(1009009009009009009, 17), "10.090090090090090090"},
+		{NewBigDec(0), "0.000000000000000000000000000000000000"},
+		{NewBigDec(1), "1.000000000000000000000000000000000000"},
+		{NewBigDec(10), "10.000000000000000000000000000000000000"},
+		{NewBigDec(12340), "12340.000000000000000000000000000000000000"},
+		{NewDecWithPrec(12340, 4), "1.234000000000000000000000000000000000"},
+		{NewDecWithPrec(12340, 5), "0.123400000000000000000000000000000000"},
+		{NewDecWithPrec(12340, 8), "0.000123400000000000000000000000000000"},
+		{NewDecWithPrec(1009009009009009009, 17), "10.090090090090090090000000000000000000"},
+		{MustNewDecFromStr("10.090090090090090090090090090090090090"), "10.090090090090090090090090090090090090"},
 	}
 	for tcIndex, tc := range tests {
 		s.Require().Equal(tc.want, tc.d.String(), "bad String(), index: %v", tcIndex)
@@ -148,6 +150,56 @@ func (s *decimalTestSuite) TestDecFloat64() {
 	}
 }
 
+func (s *decimalTestSuite) TestSdkDec() {
+	tests := []struct {
+		d    BigDec
+		want sdk.Dec
+		expPanic bool
+	}{
+		{NewBigDec(0), sdk.MustNewDecFromStr("0.000000000000000000"), false},
+		{NewBigDec(1), sdk.MustNewDecFromStr("1.000000000000000000"), false},
+		{NewBigDec(10), sdk.MustNewDecFromStr("10.000000000000000000"), false},
+		{NewBigDec(12340), sdk.MustNewDecFromStr("12340.000000000000000000"), false},
+		{NewDecWithPrec(12340, 4), sdk.MustNewDecFromStr("1.234000000000000000"), false},
+		{NewDecWithPrec(12340, 5), sdk.MustNewDecFromStr("0.123400000000000000"), false},
+		{NewDecWithPrec(12340, 8), sdk.MustNewDecFromStr("0.000123400000000000"), false},
+		{NewDecWithPrec(1009009009009009009, 17), sdk.MustNewDecFromStr("10.090090090090090090"), false},
+	}
+	for tcIndex, tc := range tests {
+		if tc.expPanic {
+			s.Require().Panics(func() { tc.d.SdkDec() })
+		} else {
+			value := tc.d.SdkDec()
+			s.Require().Equal(tc.want, value, "bad SdkDec(), index: %v", tcIndex)
+		}
+	}
+}
+
+func (s *decimalTestSuite) TestBigDecFromSdkDec() {
+	tests := []struct {
+		d    sdk.Dec
+		want BigDec
+		expPanic bool
+	}{
+		{sdk.MustNewDecFromStr("0.000000000000000000"), NewBigDec(0), false},
+		{sdk.MustNewDecFromStr("1.000000000000000000"), NewBigDec(1), false},
+		{sdk.MustNewDecFromStr("10.000000000000000000"), NewBigDec(10), false},
+		{sdk.MustNewDecFromStr("12340.000000000000000000"), NewBigDec(12340), false},
+		{sdk.MustNewDecFromStr("1.234000000000000000"), NewDecWithPrec(12340, 4), false},
+		{sdk.MustNewDecFromStr("0.123400000000000000"), NewDecWithPrec(12340, 5), false},
+		{sdk.MustNewDecFromStr("0.000123400000000000"), NewDecWithPrec(12340, 8), false},
+		{sdk.MustNewDecFromStr("10.090090090090090090"), NewDecWithPrec(1009009009009009009, 17), false},
+	}
+	for tcIndex, tc := range tests {
+		if tc.expPanic {
+			s.Require().Panics(func() { BigDecFromSdkDec(tc.d) })
+		} else {
+			value := BigDecFromSdkDec(tc.d)
+			s.Require().Equal(tc.want, value, "bad BigDecFromSdkDec(), index: %v", tcIndex)
+		}
+	}
+}
+
 func (s *decimalTestSuite) TestEqualities() {
 	tests := []struct {
 		d1, d2     BigDec
@@ -227,7 +279,7 @@ func (s *decimalTestSuite) TestArithmetic() {
 
 		{
 			NewBigDec(3), NewBigDec(7), NewBigDec(21), NewBigDec(21),
-			NewDecWithPrec(428571428571428571, 18), NewDecWithPrec(428571428571428572, 18), NewDecWithPrec(428571428571428571, 18),
+			MustNewDecFromStr("0.428571428571428571428571428571428571"), MustNewDecFromStr("0.428571428571428571428571428571428572"), MustNewDecFromStr("0.428571428571428571428571428571428571"),
 			NewBigDec(10), NewBigDec(-4),
 		},
 		{
@@ -243,7 +295,7 @@ func (s *decimalTestSuite) TestArithmetic() {
 		},
 		{
 			NewDecWithPrec(3333, 4), NewDecWithPrec(333, 4), NewDecWithPrec(1109889, 8), NewDecWithPrec(1109889, 8),
-			MustNewDecFromStr("10.009009009009009009"), MustNewDecFromStr("10.009009009009009010"), MustNewDecFromStr("10.009009009009009009"),
+			MustNewDecFromStr("10.009009009009009009009009009009009009"), MustNewDecFromStr("10.009009009009009009009009009009009010"), MustNewDecFromStr("10.009009009009009009009009009009009009"),
 			NewDecWithPrec(3666, 4), NewDecWithPrec(3, 1),
 		},
 	}
@@ -336,7 +388,7 @@ func (s *decimalTestSuite) TestStringOverflow() {
 	s.Require().NoError(err)
 	dec3 := dec1.Add(dec2)
 	s.Require().Equal(
-		"19844653375691057515930281852116324640.000000000000000000",
+		"19844653375691057515930281852116324640.000000000000000000000000000000000000",
 		dec3.String(),
 	)
 }
@@ -363,14 +415,14 @@ func (s *decimalTestSuite) TestDecCeil() {
 		input    BigDec
 		expected BigDec
 	}{
-		{NewDecWithPrec(1000000000000000, Precision), NewBigDec(1)}, // 0.001 => 1.0
-		{NewDecWithPrec(-1000000000000000, Precision), ZeroDec()},   // -0.001 => 0.0
+		{MustNewDecFromStr("0.001"), NewBigDec(1)}, // 0.001 => 1.0
+		{MustNewDecFromStr("-0.001"), ZeroDec()},   // -0.001 => 0.0
 		{ZeroDec(), ZeroDec()}, // 0.0 => 0.0
-		{NewDecWithPrec(900000000000000000, Precision), NewBigDec(1)},    // 0.9 => 1.0
-		{NewDecWithPrec(4001000000000000000, Precision), NewBigDec(5)},   // 4.001 => 5.0
-		{NewDecWithPrec(-4001000000000000000, Precision), NewBigDec(-4)}, // -4.001 => -4.0
-		{NewDecWithPrec(4700000000000000000, Precision), NewBigDec(5)},   // 4.7 => 5.0
-		{NewDecWithPrec(-4700000000000000000, Precision), NewBigDec(-4)}, // -4.7 => -4.0
+		{MustNewDecFromStr("0.9"), NewBigDec(1)},    // 0.9 => 1.0
+		{MustNewDecFromStr("4.001"), NewBigDec(5)},   // 4.001 => 5.0
+		{MustNewDecFromStr("-4.001"), NewBigDec(-4)}, // -4.001 => -4.0
+		{MustNewDecFromStr("4.7"), NewBigDec(5)},   // 4.7 => 5.0
+		{MustNewDecFromStr("-4.7"), NewBigDec(-4)}, // -4.7 => -4.0
 	}
 
 	for i, tc := range testCases {
@@ -390,7 +442,7 @@ func (s *decimalTestSuite) TestPower() {
 		{NewDecWithPrec(2, 1), 2, NewDecWithPrec(4, 2)},                        // 0.2 ^ 2 => 0.04
 		{NewDecFromInt(NewInt(3)), 3, NewDecFromInt(NewInt(27))},               // 3 ^ 3 => 27
 		{NewDecFromInt(NewInt(-3)), 4, NewDecFromInt(NewInt(81))},              // -3 ^ 4 = 81
-		{NewDecWithPrec(1414213562373095049, 18), 2, NewDecFromInt(NewInt(2))}, // 1.414213562373095049 ^ 2 = 2
+		{MustNewDecFromStr("1.414213562373095048801688724209698079"), 2, NewDecFromInt(NewInt(2))}, // 1.414213562373095048801688724209698079 ^ 2 = 2
 	}
 
 	for i, tc := range testCases {
@@ -410,11 +462,11 @@ func (s *decimalTestSuite) TestApproxRoot() {
 		{NewDecWithPrec(4, 2), 2, NewDecWithPrec(2, 1)},                                // 0.04 ^ (0.5) => 0.2
 		{NewDecFromInt(NewInt(27)), 3, NewDecFromInt(NewInt(3))},                       // 27 ^ (1/3) => 3
 		{NewDecFromInt(NewInt(-81)), 4, NewDecFromInt(NewInt(-3))},                     // -81 ^ (0.25) => -3
-		{NewDecFromInt(NewInt(2)), 2, NewDecWithPrec(1414213562373095049, 18)},         // 2 ^ (0.5) => 1.414213562373095049
-		{NewDecWithPrec(1005, 3), 31536000, MustNewDecFromStr("1.000000000158153904")}, // 1.005 ^ (1/31536000) ≈ 1.00000000016
-		{SmallestDec(), 2, NewDecWithPrec(1, 9)},                                       // 1e-18 ^ (0.5) => 1e-9
-		{SmallestDec(), 3, MustNewDecFromStr("0.000000999999999997")},                  // 1e-18 ^ (1/3) => 1e-6
-		{NewDecWithPrec(1, 8), 3, MustNewDecFromStr("0.002154434690031900")},           // 1e-8 ^ (1/3) ≈ 0.00215443469
+		{NewDecFromInt(NewInt(2)), 2, MustNewDecFromStr("1.414213562373095048801688724209698079")},         // 2 ^ (0.5) => 1.414213562373095048801688724209698079
+		{NewDecWithPrec(1005, 3), 31536000, MustNewDecFromStr("1.000000000158153903837946258002096839")}, // 1.005 ^ (1/31536000) ≈ 1.000000000158153903837946258002096839
+		{SmallestDec(), 2, NewDecWithPrec(1, 18)},                                       // 1e-36 ^ (0.5) => 1e-18
+		{SmallestDec(), 3, MustNewDecFromStr("0.000000000001000000000000000002431786")},                  // 1e-36 ^ (1/3) => 1e-12
+		{NewDecWithPrec(1, 8), 3, MustNewDecFromStr("0.002154434690031883721759293566519280")},           // 1e-8 ^ (1/3) ≈ 0.002154434690031883721759293566519
 	}
 
 	// In the case of 1e-8 ^ (1/3), the result repeats every 5 iterations starting from iteration 24
@@ -438,7 +490,7 @@ func (s *decimalTestSuite) TestApproxSqrt() {
 		{NewDecWithPrec(4, 2), NewDecWithPrec(2, 1)},                        // 0.09 => 0.3
 		{NewDecFromInt(NewInt(9)), NewDecFromInt(NewInt(3))},                // 9 => 3
 		{NewDecFromInt(NewInt(-9)), NewDecFromInt(NewInt(-3))},              // -9 => -3
-		{NewDecFromInt(NewInt(2)), NewDecWithPrec(1414213562373095049, 18)}, // 2 => 1.414213562373095049
+		{NewDecFromInt(NewInt(2)), MustNewDecFromStr("1.414213562373095048801688724209698079")}, // 2 => 1.414213562373095048801688724209698079
 	}
 
 	for i, tc := range testCases {
@@ -453,24 +505,24 @@ func (s *decimalTestSuite) TestDecSortableBytes() {
 		d    BigDec
 		want []byte
 	}{
-		{NewBigDec(0), []byte("000000000000000000.000000000000000000")},
-		{NewBigDec(1), []byte("000000000000000001.000000000000000000")},
-		{NewBigDec(10), []byte("000000000000000010.000000000000000000")},
-		{NewBigDec(12340), []byte("000000000000012340.000000000000000000")},
-		{NewDecWithPrec(12340, 4), []byte("000000000000000001.234000000000000000")},
-		{NewDecWithPrec(12340, 5), []byte("000000000000000000.123400000000000000")},
-		{NewDecWithPrec(12340, 8), []byte("000000000000000000.000123400000000000")},
-		{NewDecWithPrec(1009009009009009009, 17), []byte("000000000000000010.090090090090090090")},
-		{NewDecWithPrec(-1009009009009009009, 17), []byte("-000000000000000010.090090090090090090")},
-		{NewBigDec(1000000000000000000), []byte("max")},
-		{NewBigDec(-1000000000000000000), []byte("--")},
+		{NewBigDec(0), []byte("000000000000000000000000000000000000.000000000000000000000000000000000000")},
+		{NewBigDec(1), []byte("000000000000000000000000000000000001.000000000000000000000000000000000000")},
+		{NewBigDec(10), []byte("000000000000000000000000000000000010.000000000000000000000000000000000000")},
+		{NewBigDec(12340), []byte("000000000000000000000000000000012340.000000000000000000000000000000000000")},
+		{NewDecWithPrec(12340, 4), []byte("000000000000000000000000000000000001.234000000000000000000000000000000000")},
+		{NewDecWithPrec(12340, 5), []byte("000000000000000000000000000000000000.123400000000000000000000000000000000")},
+		{NewDecWithPrec(12340, 8), []byte("000000000000000000000000000000000000.000123400000000000000000000000000000")},
+		{NewDecWithPrec(1009009009009009009, 17), []byte("000000000000000000000000000000000010.090090090090090090000000000000000000")},
+		{NewDecWithPrec(-1009009009009009009, 17), []byte("-000000000000000000000000000000000010.090090090090090090000000000000000000")},
+		{MustNewDecFromStr("1000000000000000000000000000000000000"), []byte("max")},
+		{MustNewDecFromStr("-1000000000000000000000000000000000000"), []byte("--")},
 	}
 	for tcIndex, tc := range tests {
 		s.Require().Equal(tc.want, SortableDecBytes(tc.d), "bad String(), index: %v", tcIndex)
 	}
 
-	s.Require().Panics(func() { SortableDecBytes(NewBigDec(1000000000000000001)) })
-	s.Require().Panics(func() { SortableDecBytes(NewBigDec(-1000000000000000001)) })
+	s.Require().Panics(func() { SortableDecBytes(MustNewDecFromStr("1000000000000000000000000000000000001")) })
+	s.Require().Panics(func() { SortableDecBytes(MustNewDecFromStr("-1000000000000000000000000000000000001")) })
 }
 
 func (s *decimalTestSuite) TestDecEncoding() {
@@ -482,32 +534,32 @@ func (s *decimalTestSuite) TestDecEncoding() {
 	}{
 		{
 			NewBigDec(0), "30",
-			"\"0.000000000000000000\"",
-			"\"0.000000000000000000\"\n",
+			"\"0.000000000000000000000000000000000000\"",
+			"\"0.000000000000000000000000000000000000\"\n",
 		},
 		{
 			NewDecWithPrec(4, 2),
-			"3430303030303030303030303030303030",
-			"\"0.040000000000000000\"",
-			"\"0.040000000000000000\"\n",
+			"3430303030303030303030303030303030303030303030303030303030303030303030",
+			"\"0.040000000000000000000000000000000000\"",
+			"\"0.040000000000000000000000000000000000\"\n",
 		},
 		{
 			NewDecWithPrec(-4, 2),
-			"2D3430303030303030303030303030303030",
-			"\"-0.040000000000000000\"",
-			"\"-0.040000000000000000\"\n",
+			"2D3430303030303030303030303030303030303030303030303030303030303030303030",
+			"\"-0.040000000000000000000000000000000000\"",
+			"\"-0.040000000000000000000000000000000000\"\n",
 		},
 		{
-			NewDecWithPrec(1414213562373095049, 18),
-			"31343134323133353632333733303935303439",
-			"\"1.414213562373095049\"",
-			"\"1.414213562373095049\"\n",
+			MustNewDecFromStr("1.414213562373095048801688724209698079"),
+			"31343134323133353632333733303935303438383031363838373234323039363938303739",
+			"\"1.414213562373095048801688724209698079\"",
+			"\"1.414213562373095048801688724209698079\"\n",
 		},
 		{
-			NewDecWithPrec(-1414213562373095049, 18),
-			"2D31343134323133353632333733303935303439",
-			"\"-1.414213562373095049\"",
-			"\"-1.414213562373095049\"\n",
+			MustNewDecFromStr("-1.414213562373095048801688724209698079"),
+			"2D31343134323133353632333733303935303438383031363838373234323039363938303739",
+			"\"-1.414213562373095048801688724209698079\"",
+			"\"-1.414213562373095048801688724209698079\"\n",
 		},
 	}
 
diff --git a/osmomath/int_test.go b/osmomath/int_test.go
index 33fe5dbc7..a3e376a95 100644
--- a/osmomath/int_test.go
+++ b/osmomath/int_test.go
@@ -40,17 +40,17 @@ func (s *intTestSuite) TestFromUint64() {
 }
 
 func (s *intTestSuite) TestIntPanic() {
-	// Max Int = 2^512-1 = 1.340781e+154
-	// Min Int = -(2^512-1) = -1.340781e+154
-	s.Require().NotPanics(func() { NewIntWithDecimal(4, 153) })
-	i1 := NewIntWithDecimal(5, 153)
-	s.Require().NotPanics(func() { NewIntWithDecimal(5, 153) })
-	i2 := NewIntWithDecimal(6, 153)
-	s.Require().NotPanics(func() { NewIntWithDecimal(6, 153) })
-	i3 := NewIntWithDecimal(7, 153)
-
-	s.Require().Panics(func() { NewIntWithDecimal(2, 154) })
-	s.Require().Panics(func() { NewIntWithDecimal(9, 160) })
+	// Max Int = 2^1024-1 = 8.988466e+308
+	// Min Int = -(2^1024-1) = -8.988466e+308
+	s.Require().NotPanics(func() { NewIntWithDecimal(4, 307) })
+	i1 := NewIntWithDecimal(4, 307)
+	s.Require().NotPanics(func() { NewIntWithDecimal(5, 307) })
+	i2 := NewIntWithDecimal(5, 307)
+	s.Require().NotPanics(func() { NewIntWithDecimal(92, 306) })
+	i3 := NewIntWithDecimal(92, 306)
+
+	s.Require().Panics(func() { NewIntWithDecimal(2, 308) })
+	s.Require().Panics(func() { NewIntWithDecimal(9, 340) })
 
 	// Overflow check
 	s.Require().NotPanics(func() { i1.Add(i1) })
@@ -84,7 +84,7 @@ func (s *intTestSuite) TestIntPanic() {
 	s.Require().Panics(func() { i3.Mul(i3.Neg()) })
 
 	// Bound check
-	intmax := NewIntFromBigInt(new(big.Int).Sub(new(big.Int).Exp(big.NewInt(2), big.NewInt(512), nil), big.NewInt(1)))
+	intmax := NewIntFromBigInt(new(big.Int).Sub(new(big.Int).Exp(big.NewInt(2), big.NewInt(1024), nil), big.NewInt(1)))
 	intmin := intmax.Neg()
 	s.Require().NotPanics(func() { intmax.Add(ZeroInt()) })
 	s.Require().NotPanics(func() { intmin.Sub(ZeroInt()) })
diff --git a/osmoutils/module_account_test.go b/osmoutils/module_account_test.go
new file mode 100644
index 000000000..0b5cfea03
--- /dev/null
+++ b/osmoutils/module_account_test.go
@@ -0,0 +1,67 @@
+package osmoutils_test
+
+import (
+	"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
+	sdk "github.com/cosmos/cosmos-sdk/types"
+	"github.com/cosmos/cosmos-sdk/types/address"
+	authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
+
+	"github.com/osmosis-labs/osmosis/v12/app/apptesting/osmoassert"
+	"github.com/osmosis-labs/osmosis/v12/osmoutils"
+)
+
+func (s *TestSuite) TestCreateModuleAccount() {
+	baseWithAddr := func(addr sdk.AccAddress) authtypes.AccountI {
+		acc := authtypes.ProtoBaseAccount()
+		acc.SetAddress(addr)
+		return acc
+	}
+	userAccViaSeqnum := func(addr sdk.AccAddress) authtypes.AccountI {
+		base := baseWithAddr(addr)
+		base.SetSequence(2)
+		return base
+	}
+	userAccViaPubkey := func(addr sdk.AccAddress) authtypes.AccountI {
+		base := baseWithAddr(addr)
+		base.SetPubKey(secp256k1.GenPrivKey().PubKey())
+		return base
+	}
+	defaultModuleAccAddr := address.Module("dummy module", []byte{1})
+	testcases := map[string]struct {
+		priorAccounts []authtypes.AccountI
+		moduleAccAddr sdk.AccAddress
+		expErr        bool
+	}{
+		"no prior acc": {
+			priorAccounts: []authtypes.AccountI{},
+			moduleAccAddr: defaultModuleAccAddr,
+			expErr:        false,
+		},
+		"prior empty acc at addr": {
+			priorAccounts: []authtypes.AccountI{baseWithAddr(defaultModuleAccAddr)},
+			moduleAccAddr: defaultModuleAccAddr,
+			expErr:        false,
+		},
+		"prior user acc at addr (sequence)": {
+			priorAccounts: []authtypes.AccountI{userAccViaSeqnum(defaultModuleAccAddr)},
+			moduleAccAddr: defaultModuleAccAddr,
+			expErr:        true,
+		},
+		"prior user acc at addr (pubkey)": {
+			priorAccounts: []authtypes.AccountI{userAccViaPubkey(defaultModuleAccAddr)},
+			moduleAccAddr: defaultModuleAccAddr,
+			expErr:        true,
+		},
+	}
+	for name, tc := range testcases {
+		s.Run(name, func() {
+			s.SetupTest()
+			for _, priorAcc := range tc.priorAccounts {
+				s.App.AccountKeeper.SetAccount(s.Ctx, priorAcc)
+			}
+			err := osmoutils.CreateModuleAccount(s.Ctx, s.App.AccountKeeper, tc.moduleAccAddr)
+			osmoassert.ConditionalError(s.T(), tc.expErr, err)
+		})
+	}
+
+}
diff --git a/osmoutils/store_helper_test.go b/osmoutils/store_helper_test.go
index f35c1186f..bbae8526f 100644
--- a/osmoutils/store_helper_test.go
+++ b/osmoutils/store_helper_test.go
@@ -20,6 +20,11 @@ type TestSuite struct {
 	store sdk.KVStore
 }
 
+func (suite *TestSuite) SetupTest() {
+	suite.Setup()
+
+}
+
 const (
 	keyA               = "a"
 	keyB               = "b"
diff --git a/x/gamm/pool-models/stableswap/amm_bench_test.go b/x/gamm/pool-models/stableswap/amm_bench_test.go
index a23546376..a868b8f86 100644
--- a/x/gamm/pool-models/stableswap/amm_bench_test.go
+++ b/x/gamm/pool-models/stableswap/amm_bench_test.go
@@ -4,7 +4,7 @@ import (
 	"math/rand"
 	"testing"
 
-	sdk "github.com/cosmos/cosmos-sdk/types"
+	"github.com/osmosis-labs/osmosis/v12/osmomath"
 )
 
 func BenchmarkCFMM(b *testing.B) {
@@ -20,9 +20,9 @@ func BenchmarkBinarySearch(b *testing.B) {
 	}
 }
 
-func runCalc(solve func(sdk.Dec, sdk.Dec, sdk.Dec) sdk.Dec) {
-	xReserve := sdk.NewDec(rand.Int63n(100000) + 50000)
-	yReserve := sdk.NewDec(rand.Int63n(100000) + 50000)
-	yIn := sdk.NewDec(rand.Int63n(100000))
+func runCalc(solve func(osmomath.BigDec, osmomath.BigDec, osmomath.BigDec) osmomath.BigDec) {
+	xReserve := osmomath.NewBigDec(rand.Int63n(100000) + 50000)
+	yReserve := osmomath.NewBigDec(rand.Int63n(100000) + 50000)
+	yIn := osmomath.NewBigDec(rand.Int63n(100000))
 	solve(xReserve, yReserve, yIn)
 }
diff --git a/x/gamm/pool-models/stableswap/amm_test.go b/x/gamm/pool-models/stableswap/amm_test.go
index afbf5b5a7..e2c67eadf 100644
--- a/x/gamm/pool-models/stableswap/amm_test.go
+++ b/x/gamm/pool-models/stableswap/amm_test.go
@@ -1,13 +1,14 @@
 package stableswap
 
 import (
-	fmt "fmt"
+	"fmt"
 	"testing"
 
 	sdk "github.com/cosmos/cosmos-sdk/types"
 	"github.com/stretchr/testify/require"
 
 	"github.com/osmosis-labs/osmosis/v12/app/apptesting/osmoassert"
+	"github.com/osmosis-labs/osmosis/v12/osmomath"
 	"github.com/osmosis-labs/osmosis/v12/x/gamm/pool-models/internal/test_helpers"
 )
 
@@ -16,24 +17,24 @@ type StableSwapTestSuite struct {
 }
 
 func TestCFMMInvariantTwoAssets(t *testing.T) {
-	kErrTolerance := sdk.OneDec()
+	kErrTolerance := osmomath.OneDec()
 
 	tests := map[string]struct {
-		xReserve    sdk.Dec
-		yReserve    sdk.Dec
-		yIn         sdk.Dec
+		xReserve    osmomath.BigDec
+		yReserve    osmomath.BigDec
+		yIn         osmomath.BigDec
 		expectPanic bool
 	}{
 		"small pool small input": {
-			sdk.NewDec(100),
-			sdk.NewDec(100),
-			sdk.NewDec(1),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(1),
 			false,
 		},
 		"small pool large input": {
-			sdk.NewDec(100),
-			sdk.NewDec(100),
-			sdk.NewDec(1000),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(1000),
 			false,
 		},
 		// This test fails due to a bug in our original solver
@@ -45,21 +46,21 @@ func TestCFMMInvariantTwoAssets(t *testing.T) {
 
 		// panic catching
 		"xReserve negative": {
-			sdk.NewDec(-100),
-			sdk.NewDec(100),
-			sdk.NewDec(1),
+			osmomath.NewBigDec(-100),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(1),
 			true,
 		},
 		"yReserve negative": {
-			sdk.NewDec(100),
-			sdk.NewDec(-100),
-			sdk.NewDec(1),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(-100),
+			osmomath.NewBigDec(1),
 			true,
 		},
 		"yIn negative": {
-			sdk.NewDec(100),
-			sdk.NewDec(100),
-			sdk.NewDec(-1),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(-1),
 			true,
 		},
 	}
@@ -73,14 +74,14 @@ func TestCFMMInvariantTwoAssets(t *testing.T) {
 				xOut := solveCfmm(test.xReserve, test.yReserve, test.yIn)
 
 				k1 := cfmmConstant(test.xReserve.Sub(xOut), test.yReserve.Add(test.yIn))
-				osmoassert.DecApproxEq(t, k0, k1, kErrTolerance)
+				osmomath.DecApproxEq(t, k0, k1, kErrTolerance)
 
 				// using multi-asset cfmm (should be equivalent with u = 1, w = 0)
-				k2 := cfmmConstantMulti(test.xReserve, test.yReserve, sdk.OneDec(), sdk.ZeroDec())
-				osmoassert.DecApproxEq(t, k2, k0, kErrTolerance)
-				xOut2 := solveCfmmMulti(test.xReserve, test.yReserve, sdk.ZeroDec(), test.yIn)
-				k3 := cfmmConstantMulti(test.xReserve.Sub(xOut2), test.yReserve.Add(test.yIn), sdk.OneDec(), sdk.ZeroDec())
-				osmoassert.DecApproxEq(t, k2, k3, kErrTolerance)
+				k2 := cfmmConstantMulti(test.xReserve, test.yReserve, osmomath.OneDec(), osmomath.ZeroDec())
+				osmomath.DecApproxEq(t, k2, k0, kErrTolerance)
+				xOut2 := solveCfmmMulti(test.xReserve, test.yReserve, osmomath.ZeroDec(), test.yIn)
+				k3 := cfmmConstantMulti(test.xReserve.Sub(xOut2), test.yReserve.Add(test.yIn), osmomath.OneDec(), osmomath.ZeroDec())
+				osmomath.DecApproxEq(t, k2, k3, kErrTolerance)
 			}
 
 			osmoassert.ConditionalPanic(t, test.expectPanic, sut)
@@ -89,31 +90,31 @@ func TestCFMMInvariantTwoAssets(t *testing.T) {
 }
 
 func TestCFMMInvariantMultiAssets(t *testing.T) {
-	kErrTolerance := sdk.OneDec()
+	kErrTolerance := osmomath.OneDec()
 
 	tests := map[string]struct {
-		xReserve    sdk.Dec
-		yReserve    sdk.Dec
-		uReserve    sdk.Dec
-		wSumSquares sdk.Dec
-		yIn         sdk.Dec
+		xReserve    osmomath.BigDec
+		yReserve    osmomath.BigDec
+		uReserve    osmomath.BigDec
+		wSumSquares osmomath.BigDec
+		yIn         osmomath.BigDec
 		expectPanic bool
 	}{
 		"4-asset pool, small input": {
-			sdk.NewDec(100),
-			sdk.NewDec(100),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(100),
 			// represents a 4-asset pool with 100 in each reserve
-			sdk.NewDec(200),
-			sdk.NewDec(20000),
-			sdk.NewDec(1),
+			osmomath.NewBigDec(200),
+			osmomath.NewBigDec(20000),
+			osmomath.NewBigDec(1),
 			false,
 		},
 		"4-asset pool, large input": {
-			sdk.NewDec(100),
-			sdk.NewDec(100),
-			sdk.NewDec(200),
-			sdk.NewDec(20000),
-			sdk.NewDec(1000),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(200),
+			osmomath.NewBigDec(20000),
+			osmomath.NewBigDec(1000),
 			false,
 		},
 		// This test fails due to a bug in our original solver
@@ -125,48 +126,48 @@ func TestCFMMInvariantMultiAssets(t *testing.T) {
 
 		// panic catching
 		"negative xReserve": {
-			sdk.NewDec(-100),
-			sdk.NewDec(100),
+			osmomath.NewBigDec(-100),
+			osmomath.NewBigDec(100),
 			// represents a 4-asset pool with 100 in each reserve
-			sdk.NewDec(200),
-			sdk.NewDec(20000),
-			sdk.NewDec(1),
+			osmomath.NewBigDec(200),
+			osmomath.NewBigDec(20000),
+			osmomath.NewBigDec(1),
 			true,
 		},
 		"negative yReserve": {
-			sdk.NewDec(100),
-			sdk.NewDec(-100),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(-100),
 			// represents a 4-asset pool with 100 in each reserve
-			sdk.NewDec(200),
-			sdk.NewDec(20000),
-			sdk.NewDec(1),
+			osmomath.NewBigDec(200),
+			osmomath.NewBigDec(20000),
+			osmomath.NewBigDec(1),
 			true,
 		},
 		"negative uReserve": {
-			sdk.NewDec(100),
-			sdk.NewDec(100),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(100),
 			// represents a 4-asset pool with 100 in each reserve
-			sdk.NewDec(-200),
-			sdk.NewDec(20000),
-			sdk.NewDec(1),
+			osmomath.NewBigDec(-200),
+			osmomath.NewBigDec(20000),
+			osmomath.NewBigDec(1),
 			true,
 		},
 		"negative sumSquares": {
-			sdk.NewDec(100),
-			sdk.NewDec(100),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(100),
 			// represents a 4-asset pool with 100 in each reserve
-			sdk.NewDec(200),
-			sdk.NewDec(-20000),
-			sdk.NewDec(1),
+			osmomath.NewBigDec(200),
+			osmomath.NewBigDec(-20000),
+			osmomath.NewBigDec(1),
 			true,
 		},
 		"negative yIn": {
-			sdk.NewDec(100),
-			sdk.NewDec(100),
+			osmomath.NewBigDec(100),
+			osmomath.NewBigDec(100),
 			// represents a 4-asset pool with 100 in each reserve
-			sdk.NewDec(200),
-			sdk.NewDec(-20000),
-			sdk.NewDec(1),
+			osmomath.NewBigDec(200),
+			osmomath.NewBigDec(-20000),
+			osmomath.NewBigDec(1),
 			true,
 		},
 	}
@@ -179,7 +180,7 @@ func TestCFMMInvariantMultiAssets(t *testing.T) {
 				k2 := cfmmConstantMulti(test.xReserve, test.yReserve, test.uReserve, test.wSumSquares)
 				xOut2 := solveCfmmMulti(test.xReserve, test.yReserve, test.wSumSquares, test.yIn)
 				k3 := cfmmConstantMulti(test.xReserve.Sub(xOut2), test.yReserve.Add(test.yIn), test.uReserve, test.wSumSquares)
-				osmoassert.DecApproxEq(t, k2, k3, kErrTolerance)
+				osmomath.DecApproxEq(t, k2, k3, kErrTolerance)
 			}
 
 			osmoassert.ConditionalPanic(t, test.expectPanic, sut)
diff --git a/x/incentives/client/cli/cli_test.go b/x/incentives/client/cli/cli_test.go
index 5ed961d0b..56285ecce 100644
--- a/x/incentives/client/cli/cli_test.go
+++ b/x/incentives/client/cli/cli_test.go
@@ -155,41 +155,6 @@ func (s *IntegrationTestSuite) TestGetCmdToDistributeCoins() {
 	}
 }
 
-func (s *IntegrationTestSuite) TestGetCmdDistributedCoins() {
-	val := s.network.Validators[0]
-
-	testCases := []struct {
-		name      string
-		args      []string
-		expectErr bool
-		respType  proto.Message
-	}{
-		{
-			"query to distribute coins",
-			[]string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)},
-			false,
-			&types.ModuleDistributedCoinsResponse{},
-		},
-	}
-
-	for _, tc := range testCases {
-		tc := tc
-
-		s.Run(tc.name, func() {
-			cmd := cli.GetCmdDistributedCoins()
-			clientCtx := val.ClientCtx
-
-			out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
-			if tc.expectErr {
-				s.Require().Error(err)
-			} else {
-				s.Require().NoError(err, out.String())
-				s.Require().NoError(clientCtx.Codec.UnmarshalJSON(out.Bytes(), tc.respType), out.String())
-			}
-		})
-	}
-}
-
 func (s *IntegrationTestSuite) TestGetCmdGaugeByID() {
 	val := s.network.Validators[0]
 
diff --git a/x/incentives/keeper/grpc_query_test.go b/x/incentives/keeper/grpc_query_test.go
index db7b4e999..ba0cc5d87 100644
--- a/x/incentives/keeper/grpc_query_test.go
+++ b/x/incentives/keeper/grpc_query_test.go
@@ -471,11 +471,6 @@ func (suite *KeeperTestSuite) TestGRPCToDistributeCoins() {
 func (suite *KeeperTestSuite) TestGRPCDistributedCoins() {
 	suite.SetupTest()
 
-	// ensure initially querying distributed coins returns no coins
-	res, err := suite.querier.ModuleDistributedCoins(sdk.WrapSDKContext(suite.Ctx), &types.ModuleDistributedCoinsRequest{})
-	suite.Require().NoError(err)
-	suite.Require().Equal(res.Coins, sdk.Coins(nil))
-
 	// create two locks with different durations
 	addr1 := sdk.AccAddress([]byte("addr1---------------"))
 	addr2 := sdk.AccAddress([]byte("addr2---------------"))
@@ -483,17 +478,12 @@ func (suite *KeeperTestSuite) TestGRPCDistributedCoins() {
 	suite.LockTokens(addr2, sdk.Coins{sdk.NewInt64Coin("lptoken", 10)}, 2*time.Second)
 
 	// setup a non perpetual gauge
-	gaugeID, _, coins, startTime := suite.SetupNewGauge(false, sdk.Coins{sdk.NewInt64Coin("stake", 10)})
+	gaugeID, _, _, startTime := suite.SetupNewGauge(false, sdk.Coins{sdk.NewInt64Coin("stake", 10)})
 	gauge, err := suite.querier.GetGaugeByID(suite.Ctx, gaugeID)
 	suite.Require().NoError(err)
 	suite.Require().NotNil(gauge)
 	gauges := []types.Gauge{*gauge}
 
-	// check that after gauge creation distributed coins still returns no coins
-	res, err = suite.querier.ModuleDistributedCoins(sdk.WrapSDKContext(suite.Ctx), &types.ModuleDistributedCoinsRequest{})
-	suite.Require().NoError(err)
-	suite.Require().Equal(res.Coins, sdk.Coins(nil))
-
 	// move gauge from upcoming to active
 	suite.Ctx = suite.Ctx.WithBlockTime(startTime)
 	err = suite.querier.MoveUpcomingGaugeToActiveGauge(suite.Ctx, *gauge)
@@ -514,18 +504,8 @@ func (suite *KeeperTestSuite) TestGRPCDistributedCoins() {
 	suite.Require().Equal(gauge.DistributedCoins, sdk.Coins{sdk.NewInt64Coin("stake", 4)})
 	gauges = []types.Gauge{*gauge}
 
-	// check after distribution that distributed coins query matches coins that were distributed
-	res, err = suite.querier.ModuleDistributedCoins(sdk.WrapSDKContext(suite.Ctx), &types.ModuleDistributedCoinsRequest{})
-	suite.Require().NoError(err)
-	suite.Require().Equal(res.Coins, distrCoins)
-
 	// distribute second round to stakers
 	distrCoins, err = suite.querier.Distribute(suite.Ctx, gauges)
 	suite.Require().NoError(err)
 	suite.Require().Equal(sdk.Coins{sdk.NewInt64Coin("stake", 6)}, distrCoins)
-
-	// ensure distributed coins query equals coins balance of gauge now that it has been completed
-	res, err = suite.querier.ModuleDistributedCoins(sdk.WrapSDKContext(suite.Ctx), &types.ModuleDistributedCoinsRequest{})
-	suite.Require().NoError(err)
-	suite.Require().Equal(res.Coins, coins)
 }
diff --git a/x/twap/types/utils_test.go b/x/twap/types/utils_test.go
index d757faf0e..082344a33 100644
--- a/x/twap/types/utils_test.go
+++ b/x/twap/types/utils_test.go
@@ -21,11 +21,11 @@ func TestGetAllUniqueDenomPairs(t *testing.T) {
 		wantedPairLT []string
 		panics       bool
 	}{
-		"basic":    {[]string{"A", "B"}, []string{"B"}, []string{"A"}, false},
-		"basicRev": {[]string{"B", "A"}, []string{"B"}, []string{"A"}, false},
+		"basic":    {[]string{"A", "B"}, []string{"A"}, []string{"B"}, false},
+		"basicRev": {[]string{"B", "A"}, []string{"A"}, []string{"B"}, false},
 		// AB > A
-		"prefixed": {[]string{"A", "AB"}, []string{"AB"}, []string{"A"}, false},
-		"basic-3":  {[]string{"A", "B", "C"}, []string{"C", "C", "B"}, []string{"B", "A", "A"}, false},
+		"prefixed": {[]string{"A", "AB"}, []string{"A"}, []string{"AB"}, false},
+		"basic-3":  {[]string{"A", "B", "C"}, []string{"A", "A", "B"}, []string{"B", "C", "C"}, false},
 		"panics":   {[]string{"A", "A"}, []string{}, []string{}, true},
 	}
 	for name, tt := range tests {