Skip to content

Commit 9935535

Browse files
authored
Merge branch 'master' into dzmitryhil/dex-genesis
2 parents 42d382d + 051b147 commit 9935535

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

x/dex/keeper/keeper_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,12 @@ func TestKeeper_PlaceOrderWithPriceTick(t *testing.T) {
496496
}{
497497
{
498498
name: "valid_default_price",
499-
price: types.MustNewPriceFromString("1e-5"),
499+
price: types.MustNewPriceFromString("1e-8"),
500500
wantTickError: false,
501501
},
502502
{
503503
name: "invalid_default_price",
504-
price: types.MustNewPriceFromString("1e-6"),
504+
price: types.MustNewPriceFromString("1e-9"),
505505
wantTickError: true,
506506
},
507507
{
@@ -533,7 +533,7 @@ func TestKeeper_PlaceOrderWithPriceTick(t *testing.T) {
533533
{
534534
name: "invalid_both_custom_tick_greater_than_one",
535535
price: types.MustNewPriceFromString("14"),
536-
baseDenomRefAmount: lo.ToPtr(sdkmath.LegacyMustNewDecFromStr("0.01")),
536+
baseDenomRefAmount: lo.ToPtr(sdkmath.LegacyMustNewDecFromStr("0.00001")),
537537
quoteDenomRefAmount: lo.ToPtr(sdkmath.LegacyMustNewDecFromStr("10303.3")),
538538
wantTickError: true,
539539
},
@@ -548,7 +548,7 @@ func TestKeeper_PlaceOrderWithPriceTick(t *testing.T) {
548548
name: "invalid_both_custom_base_less_than_one",
549549
price: types.MustNewPriceFromString("3e32"),
550550
baseDenomRefAmount: lo.ToPtr(sdkmath.LegacyMustNewDecFromStr("0.000000000000000001")),
551-
quoteDenomRefAmount: lo.ToPtr(sdkmath.LegacyMustNewDecFromStr("100000000000000000000")),
551+
quoteDenomRefAmount: lo.ToPtr(sdkmath.LegacyMustNewDecFromStr("100000000000000000000000")),
552552
wantTickError: true,
553553
},
554554
}

x/dex/spec/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ price_tick(base_denom/quote_denom) = 10^(floor(log10((unified_ref_amount(quote_d
152152
```
153153

154154
The `price_tick_exponent` is the coefficient used to give better price precision for the token orders. The default
155-
`price_tick_exponent` is `-5`, and can be updated by the governance.
155+
`price_tick_exponent` is `-8`, and can be updated by the governance.
156156

157157
Tick size example:
158158

x/dex/types/msgs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ func TestAmino(t *testing.T) {
233233
Authority: address,
234234
Params: types.DefaultParams(),
235235
},
236-
wantAminoJSON: `{"type":"dex/MsgUpdateParams","value":{"authority":"devcore172rc5sz2uclpsy3vvx3y79ah5dk450z5ruq2r5","params":{"default_unified_ref_amount":"1000000.000000000000000000","max_orders_per_denom":"100","order_reserve":{"amount":"10000000","denom":"stake"},"price_tick_exponent":-5}}}`,
236+
wantAminoJSON: `{"type":"dex/MsgUpdateParams","value":{"authority":"devcore172rc5sz2uclpsy3vvx3y79ah5dk450z5ruq2r5","params":{"default_unified_ref_amount":"1000000.000000000000000000","max_orders_per_denom":"100","order_reserve":{"amount":"10000000","denom":"stake"},"price_tick_exponent":-8}}}`,
237237
},
238238
{
239239
name: sdk.MsgTypeURL(&types.MsgPlaceOrder{}),

x/dex/types/params.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var (
2525
func DefaultParams() Params {
2626
return Params{
2727
DefaultUnifiedRefAmount: sdkmath.LegacyMustNewDecFromStr("1000000"),
28-
PriceTickExponent: -5,
28+
PriceTickExponent: -8,
2929
MaxOrdersPerDenom: 100,
3030
OrderReserve: sdk.NewInt64Coin(sdk.DefaultBondDenom, 10_000_000),
3131
}

0 commit comments

Comments
 (0)