From dd1176a0184cb12e9e1a1e0a67054835d74eca78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 05:11:05 -0600 Subject: [PATCH 1/8] build(deps): Bump docker/login-action from 2 to 3 (#2238) Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release-umee-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-umee-docker.yml b/.github/workflows/release-umee-docker.yml index 9d0ee31fb7..6a8e426a56 100644 --- a/.github/workflows/release-umee-docker.yml +++ b/.github/workflows/release-umee-docker.yml @@ -41,7 +41,7 @@ jobs: echo labels "${{ steps.meta.outputs.labels }}" - name: Login to GHCR - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} From 3fc6c36b0380c8f5d269162816d64678b6456797 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 05:13:32 -0600 Subject: [PATCH 2/8] build(deps): Bump docker/setup-buildx-action from 2 to 3 (#2241) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release-umee-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-umee-docker.yml b/.github/workflows/release-umee-docker.yml index 6a8e426a56..6bf861fa01 100644 --- a/.github/workflows/release-umee-docker.yml +++ b/.github/workflows/release-umee-docker.yml @@ -32,7 +32,7 @@ jobs: latest=false - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Print tags and labels run: | From bdac3848711e112691030a1d7dc25ff7b6b7394c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 09:27:47 +0200 Subject: [PATCH 3/8] build(deps): Bump docker/build-push-action from 4 to 5 (#2240) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release-umee-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-umee-docker.yml b/.github/workflows/release-umee-docker.yml index 6bf861fa01..afbc466c83 100644 --- a/.github/workflows/release-umee-docker.yml +++ b/.github/workflows/release-umee-docker.yml @@ -53,7 +53,7 @@ jobs: make proto-update-swagger-docs - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: file: ./contrib/images/umeed.dockerfile platforms: linux/amd64 From ab317799274adf34a74a12e640788145c61b05e0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 09:27:51 +0200 Subject: [PATCH 4/8] build(deps): Bump docker/metadata-action from 4 to 5 (#2239) Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5. - [Release notes](https://github.com/docker/metadata-action/releases) - [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md) - [Commits](https://github.com/docker/metadata-action/compare/v4...v5) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/release-umee-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-umee-docker.yml b/.github/workflows/release-umee-docker.yml index afbc466c83..1805f677ef 100644 --- a/.github/workflows/release-umee-docker.yml +++ b/.github/workflows/release-umee-docker.yml @@ -20,7 +20,7 @@ jobs: - name: Extract Docker metadata id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: # github.repository == / images: ghcr.io/${{ github.repository_owner }}/umeed From 64171d436f93070af55ae3dc763d696fc9240768 Mon Sep 17 00:00:00 2001 From: Adam Moser <63419657+toteki@users.noreply.github.com> Date: Thu, 14 Sep 2023 03:09:53 -0600 Subject: [PATCH 5/8] feat: max repay on MsgLeveragedLiquidate (#2242) * proto and cli * tx behavior * lint * lint * fix e2d * nonzero tests --- proto/umee/leverage/v1/tx.proto | 7 + tests/e2e/e2e_leverage_test.go | 2 +- x/leverage/client/cli/tx.go | 13 +- x/leverage/keeper/keeper.go | 17 ++- x/leverage/keeper/liquidate.go | 4 +- x/leverage/keeper/msg_server.go | 3 +- x/leverage/keeper/msg_server_test.go | 76 +++++++++- x/leverage/types/tx.go | 11 +- x/leverage/types/tx.pb.go | 206 +++++++++++++++++---------- x/leverage/types/tx_test.go | 6 +- 10 files changed, 251 insertions(+), 94 deletions(-) diff --git a/proto/umee/leverage/v1/tx.proto b/proto/umee/leverage/v1/tx.proto index f1468554be..46a47c8a3a 100644 --- a/proto/umee/leverage/v1/tx.proto +++ b/proto/umee/leverage/v1/tx.proto @@ -58,6 +58,8 @@ service Msg { // executing this transaction, instead of the regular 100%. Also allows repayment and reward denoms to // be left blank - if not specified, the module will automatically select the first (alphabetically by denom) // borrow and/or collateral on the target account and the proceed normally. + // After v6.0, includes a MaxRepay field which limits repay value in USD. To prevent dust exploits, this + // value cannot be below $1.00 rpc LeveragedLiquidate(MsgLeveragedLiquidate) returns (MsgLeveragedLiquidateResponse); // SupplyCollateral combines the Supply and Collateralize actions. @@ -174,6 +176,11 @@ message MsgLeveragedLiquidate { // RewardDenom is the uToken denom that the liquidator will receive as a liquidation reward // and immediately collateralize. string reward_denom = 4; + // MaxRepay optionally limits the USD value to repay. If specified, this cannot be below $1.00 + string max_repay = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } // MsgSupplyCollateral represents a user's request to supply and collateralize assets to the module. diff --git a/tests/e2e/e2e_leverage_test.go b/tests/e2e/e2e_leverage_test.go index 3765be3829..536a1e392f 100644 --- a/tests/e2e/e2e_leverage_test.go +++ b/tests/e2e/e2e_leverage_test.go @@ -58,7 +58,7 @@ func (s *E2ETest) leverageLiquidate(addr, target sdk.AccAddress, repayDenom stri } func (s *E2ETest) leverageLeveragedLiquidate(addr, target sdk.AccAddress, repay, reward string) { - s.mustSucceedTx(leveragetypes.NewMsgLeveragedLiquidate(addr, target, repay, reward)) + s.mustSucceedTx(leveragetypes.NewMsgLeveragedLiquidate(addr, target, repay, reward, sdk.ZeroDec())) } func (s *E2ETest) TestLeverageBasics() { diff --git a/x/leverage/client/cli/tx.go b/x/leverage/client/cli/tx.go index ac3c74dbb1..c1c193d0cd 100644 --- a/x/leverage/client/cli/tx.go +++ b/x/leverage/client/cli/tx.go @@ -321,19 +321,19 @@ $ umeed tx leverage liquidate %s 50000000uumee u/uumee --from mykey`, // transaction with a MsgLeveragedLiquidate message. func LeveragedLiquidate() *cobra.Command { cmd := &cobra.Command{ - Use: "lev-liquidate [borrower] [repay-denom] [reward-denom]", + Use: "lev-liquidate [borrower] [repay-denom] [reward-denom] [max-repay]", Args: cobra.RangeArgs(1, 3), Short: "Liquidates by moving borrower debt to the liquidator and immediately collateralizes the reward.", Long: strings.TrimSpace( fmt.Sprintf(` Borrow tokens to liquidate a borrower's debt and immediately collateralize the reward. -Will attempt to repay the maximum amount allowed by the targeted borrower's debt and collateral positions. +Will attempt to repay the max amount allowed by the targeted borrower's position unless max repay (USD) is specified. The transaction will fail if the liquidator, with new borrow and collateral positions, would be above 0.8 borrow limit. Example: -$ umeed tx leverage lev-liquidate %s uumee uumee --from mykey`, +$ umeed tx leverage lev-liquidate %s uumee uumee 123.4 --from mykey`, "umee1qqy7cst5qm83ldupph2dcq0wypprkfpc9l3jg2", ), ), @@ -350,6 +350,7 @@ $ umeed tx leverage lev-liquidate %s uumee uumee --from mykey`, } var repayDenom, rewardDenom string + maxRepay := sdk.ZeroDec() if len(args) > 1 { repayDenom = args[1] } @@ -358,7 +359,11 @@ $ umeed tx leverage lev-liquidate %s uumee uumee --from mykey`, rewardDenom = args[2] } - msg := types.NewMsgLeveragedLiquidate(clientCtx.GetFromAddress(), borrowerAddr, repayDenom, rewardDenom) + if len(args) > 3 { + maxRepay = sdk.MustNewDecFromStr(args[3]) + } + + msg := types.NewMsgLeveragedLiquidate(clientCtx.GetFromAddress(), borrowerAddr, repayDenom, rewardDenom, maxRepay) if err = msg.ValidateBasic(); err != nil { return err } diff --git a/x/leverage/keeper/keeper.go b/x/leverage/keeper/keeper.go index 47818cadc3..360097c22a 100644 --- a/x/leverage/keeper/keeper.go +++ b/x/leverage/keeper/keeper.go @@ -463,12 +463,13 @@ func (k Keeper) Liquidate( // LeveragedLiquidate func (k Keeper) LeveragedLiquidate( - ctx sdk.Context, liquidatorAddr, borrowerAddr sdk.AccAddress, repayDenom, rewardDenom string, + ctx sdk.Context, liquidatorAddr, borrowerAddr sdk.AccAddress, + repayDenom, rewardDenom string, maxRepay sdk.Dec, ) (repaid sdk.Coin, reward sdk.Coin, err error) { // If the message did not specify repay or reward denoms, select one arbitrarily (first in // denom alphabetical order) from borrower position. Then proceed normally with the transaction. + borrowed := k.GetBorrowerBorrows(ctx, borrowerAddr) if repayDenom == "" { - borrowed := k.GetBorrowerBorrows(ctx, borrowerAddr) if !borrowed.IsZero() { repayDenom = borrowed[0].Denom } @@ -488,11 +489,21 @@ func (k Keeper) LeveragedLiquidate( } uRewardDenom := coin.ToUTokenDenom(rewardDenom) + // If the message did not specify max repay, attempt to liquidate the full amount + maxRepayCoin := sdk.NewCoin(repayDenom, borrowed.AmountOf(repayDenom)) + if !maxRepay.IsZero() { + // Otherwise, convert from max USD repay to token + maxRepayCoin, err = k.TokenWithValue(ctx, repayDenom, maxRepay, types.PriceModeSpot) + if err != nil { + return sdk.Coin{}, sdk.Coin{}, err + } + } + tokenRepay, uTokenReward, _, err := k.getLiquidationAmounts( ctx, liquidatorAddr, borrowerAddr, - sdk.NewCoin(repayDenom, sdk.OneInt()), // amount is ignored for LeveragedLiquidate + maxRepayCoin, rewardDenom, false, true, diff --git a/x/leverage/keeper/liquidate.go b/x/leverage/keeper/liquidate.go index 41a32b0f05..3e48b68283 100644 --- a/x/leverage/keeper/liquidate.go +++ b/x/leverage/keeper/liquidate.go @@ -95,9 +95,9 @@ func (k Keeper) getLiquidationAmounts( // for traditional liquidations, liquidator account balance limits repayment availableRepay := k.bankKeeper.SpendableCoins(ctx, liquidatorAddr).AmountOf(repayDenom) maxRepay = sdk.MinInt(maxRepay, availableRepay) - // maximum requested by liquidator - maxRepay = sdk.MinInt(maxRepay, requestedRepay.Amount) } + // maximum requested by liquidator + maxRepay = sdk.MinInt(maxRepay, requestedRepay.Amount) maxRepay = sdk.MinInt(maxRepay, maxRepayAfterCloseFactor) // close factor // compute final liquidation amounts diff --git a/x/leverage/keeper/msg_server.go b/x/leverage/keeper/msg_server.go index 2ba34c71d9..832906b800 100644 --- a/x/leverage/keeper/msg_server.go +++ b/x/leverage/keeper/msg_server.go @@ -503,7 +503,8 @@ func (s msgServer) LeveragedLiquidate( return nil, err } - repaid, reward, err := s.keeper.LeveragedLiquidate(ctx, liquidator, borrower, msg.RepayDenom, msg.RewardDenom) + repaid, reward, err := s.keeper.LeveragedLiquidate( + ctx, liquidator, borrower, msg.RepayDenom, msg.RewardDenom, msg.MaxRepay) if err != nil { return nil, err } diff --git a/x/leverage/keeper/msg_server_test.go b/x/leverage/keeper/msg_server_test.go index 1c545dce24..27e7fcba00 100644 --- a/x/leverage/keeper/msg_server_test.go +++ b/x/leverage/keeper/msg_server_test.go @@ -2145,9 +2145,21 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { app, ctx, srv, require := s.app, s.ctx, s.msgSrvr, s.Require() // create and fund a liquidator which supplies plenty of UMEE and ATOM to the module - liquidator := s.newAccount(coin.New(umeeDenom, 10000_000000), coin.New(atomDenom, 10000_000000)) - s.supply(liquidator, coin.New(umeeDenom, 10000_000000), coin.New(atomDenom, 10000_000000)) - s.collateralize(liquidator, coin.New("u/"+umeeDenom, 10000_000000), coin.New("u/"+atomDenom, 10000_000000)) + liquidator := s.newAccount( + coin.New(umeeDenom, 10000_000000), + coin.New(atomDenom, 10000_000000), + coin.New(daiDenom, 10000_000000), + ) + s.supply(liquidator, + coin.New(umeeDenom, 10000_000000), + coin.New(atomDenom, 10000_000000), + coin.New(daiDenom, 10000_000000), + ) + s.collateralize(liquidator, + coin.New("u/"+umeeDenom, 10000_000000), + coin.New("u/"+atomDenom, 10000_000000), + coin.New("u/"+daiDenom, 10000_000000), + ) // create a healthy borrower healthyBorrower := s.newAccount(coin.New(umeeDenom, 100_000000)) @@ -2183,12 +2195,27 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { // artificially borrow just barely above liquidation threshold to simulate interest accruing s.forceBorrow(closeBorrower, coin.New(umeeDenom, 106_000000)) + // creates a borrower with $10 PAIRED (stablecoin) collateral which will have a close factor = 1 + daiBorrower := s.newAccount(coin.New(pairedDenom, 10_000000)) + s.supply(daiBorrower, coin.New(pairedDenom, 10_000000)) + s.collateralize(daiBorrower, coin.New("u/"+pairedDenom, 10_000000)) + // artificially borrow an amount much greater than liquidation threshold + s.forceBorrow(daiBorrower, coin.New(pairedDenom, 7_000000)) + + // creates another realistic borrower with 400 UMEE collateral which will have a close factor < 1 + closeBorrower2 := s.newAccount(coin.New(umeeDenom, 400_000000)) + s.supply(closeBorrower2, coin.New(umeeDenom, 400_000000)) + s.collateralize(closeBorrower2, coin.New("u/"+umeeDenom, 400_000000)) + // artificially borrow just barely above liquidation threshold to simulate interest accruing + s.forceBorrow(closeBorrower2, coin.New(umeeDenom, 106_000000)) + tcs := []struct { msg string liquidator sdk.AccAddress borrower sdk.AccAddress repayDenom string rewardDenom string + maxRepay sdk.Dec expectedRepay sdk.Coin expectedReward sdk.Coin err error @@ -2199,6 +2226,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { healthyBorrower, atomDenom, atomDenom, + sdk.ZeroDec(), sdk.Coin{}, sdk.Coin{}, types.ErrLiquidationIneligible, @@ -2208,6 +2236,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { umeeBorrower, "u/" + umeeDenom, umeeDenom, + sdk.ZeroDec(), sdk.Coin{}, sdk.Coin{}, types.ErrUToken, @@ -2217,6 +2246,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { umeeBorrower, umeeDenom, "u/" + umeeDenom, + sdk.ZeroDec(), sdk.Coin{}, sdk.Coin{}, types.ErrUToken, @@ -2226,6 +2256,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { umeeBorrower, "foo", umeeDenom, + sdk.ZeroDec(), sdk.Coin{}, sdk.Coin{}, types.ErrNotRegisteredToken, @@ -2235,6 +2266,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { umeeBorrower, atomDenom, "foo", + sdk.ZeroDec(), sdk.Coin{}, sdk.Coin{}, types.ErrNotRegisteredToken, @@ -2244,6 +2276,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { umeeBorrower, atomDenom, atomDenom, + sdk.ZeroDec(), sdk.Coin{}, sdk.Coin{}, types.ErrLiquidationRepayZero, @@ -2253,6 +2286,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { atomBorrower, atomDenom, atomDenom, + sdk.ZeroDec(), coin.New(atomDenom, 500_000000), coin.New("u/"+atomDenom, 550_000000), nil, @@ -2262,6 +2296,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { umeeBorrower, umeeDenom, umeeDenom, + sdk.ZeroDec(), coin.New(umeeDenom, 100_000000), coin.New("u/"+umeeDenom, 110_000000), nil, @@ -2271,6 +2306,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { complexBorrower, umeeDenom, atomDenom, + sdk.ZeroDec(), coin.New(umeeDenom, 30_000000), coin.New("u/"+atomDenom, 3_527933), nil, @@ -2280,9 +2316,40 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { closeBorrower, "", "", + sdk.ZeroDec(), coin.New(umeeDenom, 8_150541), coin.New("u/"+umeeDenom, 8_965596), nil, + }, { + "stable borrower with nonzero max repay", + liquidator, + daiBorrower, + "", + "", + sdk.OneDec(), + coin.New(pairedDenom, 1_000000), + coin.New("u/"+pairedDenom, 1_100000), + nil, + }, { + "stable borrower with nonzero max repay (again)", + liquidator, + daiBorrower, + "", + "", + sdk.MustNewDecFromStr("2.0"), + coin.New(pairedDenom, 2_000000), + coin.New("u/"+pairedDenom, 2_200000), + nil, + }, { + "umee borrower with nonzero max repay and close factor < 1", + liquidator, + closeBorrower2, + "", + "", + sdk.MustNewDecFromStr("10.00"), + coin.New(umeeDenom, 2_375296), // $10 of UMEE at price $4.21 + coin.New("u/"+umeeDenom, 2_612826), + nil, }, } @@ -2292,6 +2359,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { Borrower: tc.borrower.String(), RepayDenom: tc.repayDenom, RewardDenom: tc.rewardDenom, + MaxRepay: tc.maxRepay, } if tc.err != nil { _, err := srv.LeveragedLiquidate(ctx, msg) @@ -2327,7 +2395,7 @@ func (s *IntegrationTestSuite) TestMsgLeveragedLiquidate() { liCollateral := app.LeverageKeeper.GetBorrowerCollateral(ctx, tc.liquidator) liBorrowed := app.LeverageKeeper.GetBorrowerBorrows(ctx, tc.liquidator) - // verify the output of fast-liquidate function + // verify the output of leveraged-liquidate function resp, err := srv.LeveragedLiquidate(ctx, msg) require.NoError(err, tc.msg) require.Equal(tc.expectedRepay.String(), resp.Repaid.String(), tc.msg) diff --git a/x/leverage/types/tx.go b/x/leverage/types/tx.go index 76d2302b7e..bc882774b1 100644 --- a/x/leverage/types/tx.go +++ b/x/leverage/types/tx.go @@ -1,6 +1,8 @@ package types import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/umee-network/umee/v6/util/checkers" @@ -255,13 +257,17 @@ func (msg *MsgLiquidate) GetSignBytes() []byte { return sdk.MustSortJSON(bz) } -func NewMsgLeveragedLiquidate(liquidator, borrower sdk.AccAddress, repayDenom, rewardDenom string, +func NewMsgLeveragedLiquidate( + liquidator, borrower sdk.AccAddress, + repayDenom, rewardDenom string, + maxRepay sdk.Dec, ) *MsgLeveragedLiquidate { return &MsgLeveragedLiquidate{ Liquidator: liquidator.String(), Borrower: borrower.String(), RepayDenom: repayDenom, RewardDenom: rewardDenom, + MaxRepay: maxRepay, } } @@ -279,6 +285,9 @@ func (msg *MsgLeveragedLiquidate) ValidateBasic() error { return err } } + if !msg.MaxRepay.IsZero() && msg.MaxRepay.LT(sdk.OneDec()) { + return fmt.Errorf("nonzero max repay %s is less than one", msg.MaxRepay) + } _, err := sdk.AccAddressFromBech32(msg.Borrower) if err != nil { return err diff --git a/x/leverage/types/tx.pb.go b/x/leverage/types/tx.pb.go index 77dc8276af..2d5c6ba55d 100644 --- a/x/leverage/types/tx.pb.go +++ b/x/leverage/types/tx.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/gogo/protobuf/gogoproto" @@ -462,6 +463,8 @@ type MsgLeveragedLiquidate struct { // RewardDenom is the uToken denom that the liquidator will receive as a liquidation reward // and immediately collateralize. RewardDenom string `protobuf:"bytes,4,opt,name=reward_denom,json=rewardDenom,proto3" json:"reward_denom,omitempty"` + // MaxRepay optionally limits the USD value to repay. If specified, this cannot be below $1.00 + MaxRepay github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=max_repay,json=maxRepay,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_repay"` } func (m *MsgLeveragedLiquidate) Reset() { *m = MsgLeveragedLiquidate{} } @@ -1330,81 +1333,84 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/tx.proto", fileDescriptor_72683128ee6e8843) } var fileDescriptor_72683128ee6e8843 = []byte{ - // 1183 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x58, 0xd1, 0x6f, 0xdb, 0xd4, - 0x17, 0x8e, 0x93, 0xb6, 0x6a, 0x4e, 0xba, 0xad, 0xf3, 0xfa, 0x5b, 0x53, 0x6f, 0x73, 0x5a, 0xef, - 0x37, 0x28, 0x83, 0xc6, 0xb4, 0x83, 0x82, 0x18, 0x03, 0x96, 0x4d, 0x9a, 0x54, 0x88, 0x54, 0x25, - 0x20, 0x04, 0x02, 0x8a, 0x1b, 0x5f, 0x5c, 0xab, 0x89, 0x6d, 0xee, 0x75, 0xd2, 0x76, 0x8f, 0x3c, - 0xf1, 0x84, 0x40, 0xda, 0x03, 0x2f, 0x48, 0x7d, 0xe2, 0x89, 0x07, 0x1e, 0xf8, 0x23, 0x8a, 0x78, - 0x99, 0x78, 0xe2, 0x09, 0x41, 0xfb, 0x00, 0x7f, 0x06, 0xf2, 0xbd, 0xd7, 0xd7, 0x4e, 0xec, 0xa4, - 0xee, 0x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c, 0x1b, 0xed, 0xbd, 0x69, 0xd8, 0x38, 0xfc, 0x42, - 0x50, 0xb7, 0x51, 0x65, 0xd3, 0xae, 0xc3, 0xd2, 0xd0, 0x7a, 0x88, 0xaa, 0xfd, 0x20, 0xc1, 0x05, - 0x86, 0x6a, 0x06, 0xfc, 0xd8, 0xe8, 0x3c, 0x79, 0xad, 0xd6, 0x61, 0xca, 0xa3, 0x0c, 0xbc, 0xb3, - 0xca, 0xc9, 0x6c, 0x58, 0x84, 0xb0, 0xb1, 0x18, 0x7a, 0x64, 0x12, 0x0b, 0x30, 0x3f, 0x20, 0x2f, - 0x94, 0xbe, 0xf6, 0x23, 0x40, 0xa1, 0x4e, 0x2c, 0x79, 0x03, 0xa6, 0xf8, 0x82, 0x7f, 0x25, 0x19, - 0x50, 0x74, 0xac, 0x72, 0x7d, 0x84, 0x51, 0x34, 0xf1, 0x26, 0x4c, 0x8b, 0x3d, 0xfb, 0x5a, 0xaa, - 0x43, 0x68, 0x56, 0x6e, 0x8c, 0x34, 0x0b, 0xc6, 0x8f, 0xa0, 0x14, 0x5f, 0xde, 0x17, 0x53, 0xbd, - 0x62, 0x08, 0x65, 0xf9, 0x34, 0x84, 0xa0, 0xde, 0x82, 0x73, 0xfd, 0x3b, 0xbd, 0x96, 0xea, 0xda, - 0x87, 0x51, 0x6e, 0x9e, 0x8e, 0x11, 0x01, 0x10, 0x5c, 0x18, 0xdc, 0xe6, 0xff, 0x9f, 0xea, 0x3e, - 0x80, 0x52, 0x5e, 0xca, 0x82, 0x12, 0x61, 0x36, 0x60, 0x8a, 0x2f, 0xda, 0xe9, 0x0f, 0x90, 0x19, - 0x87, 0x3c, 0xc0, 0x81, 0xcf, 0x71, 0x13, 0x8a, 0xd1, 0xde, 0xae, 0x0e, 0x2b, 0x25, 0x67, 0x7c, - 0x6e, 0xb4, 0x3d, 0x36, 0xda, 0x27, 0xf9, 0x2a, 0x9f, 0xea, 0x40, 0x6d, 0x8a, 0x36, 0xdc, 0x16, - 0x57, 0x17, 0xdb, 0xd9, 0x53, 0x1d, 0x84, 0x7d, 0x88, 0xba, 0xe4, 0x97, 0xd0, 0x01, 0x39, 0x65, - 0xb3, 0x7e, 0x3e, 0xdd, 0x3b, 0x01, 0x54, 0xf4, 0x8c, 0x40, 0x11, 0x6f, 0x07, 0x66, 0x13, 0xcb, - 0xef, 0x8d, 0x11, 0xcd, 0x15, 0xc1, 0x94, 0x95, 0x4c, 0x30, 0x11, 0x69, 0x17, 0x2e, 0x26, 0xbf, - 0x82, 0xe9, 0x65, 0x49, 0xe0, 0x94, 0x6a, 0x36, 0x9c, 0x08, 0xf6, 0x10, 0x2e, 0x0f, 0xf9, 0x76, - 0xbc, 0x38, 0x9a, 0xa9, 0x0f, 0xac, 0xdc, 0x3a, 0x03, 0x58, 0xc4, 0xfe, 0x04, 0x66, 0xfa, 0x26, - 0xf0, 0xd2, 0x30, 0x12, 0x01, 0x51, 0x5e, 0x38, 0x15, 0x12, 0xb2, 0xd7, 0x1a, 0x47, 0x7f, 0xab, - 0xb9, 0xa3, 0x63, 0x55, 0x7a, 0x7c, 0xac, 0x4a, 0x7f, 0x1d, 0xab, 0xd2, 0xb7, 0x27, 0x6a, 0xee, - 0xe8, 0x44, 0x95, 0x1e, 0x9f, 0xa8, 0xb9, 0x3f, 0x4e, 0xd4, 0xdc, 0xc7, 0x2f, 0x5b, 0xb6, 0xbf, - 0xd3, 0xdd, 0xae, 0xb6, 0xdc, 0x8e, 0x1e, 0xd0, 0xae, 0x38, 0xc8, 0xdf, 0x73, 0xf1, 0x2e, 0x3d, - 0xe8, 0xbd, 0x75, 0x7d, 0x3f, 0xfa, 0x93, 0xc5, 0x3f, 0xf0, 0x10, 0xd9, 0x9e, 0xa2, 0xff, 0xaf, - 0xdc, 0xfa, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x7f, 0xf1, 0x0d, 0x19, 0x12, 0x00, 0x00, + // 1228 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0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, 0x44, + 0x19, 0xa0, 0xcd, 0x16, 0x76, 0x10, 0x25, 0xb2, 0xd3, 0xa7, 0x21, 0x3b, 0xa0, 0xe1, 0x36, 0x14, + 0x5d, 0x5f, 0x68, 0x07, 0x59, 0x5e, 0x39, 0x97, 0x4e, 0x47, 0xe8, 0x21, 0x2e, 0xc0, 0x94, 0x8b, + 0x76, 0x35, 0x57, 0xdf, 0xa4, 0x75, 0x98, 0x20, 0xf4, 0x25, 0xba, 0xb7, 0x46, 0xaa, 0xf1, 0x28, + 0x0b, 0x2f, 0xf9, 0x72, 0x59, 0x6f, 0xea, 0xa1, 0xee, 0x77, 0xe2, 0xba, 0x6b, 0xe5, 0x3f, 0x7f, + 0x5f, 0x9a, 0x61, 0xf1, 0xef, 0xe8, 0xba, 0x8b, 0x30, 0x6e, 0x7a, 0xae, 0x69, 0x19, 0x7d, 0x19, + 0xbd, 0x39, 0x98, 0xd1, 0x08, 0xbf, 0x30, 0xd7, 0x0a, 0x94, 0x88, 0x72, 0xa6, 0x35, 0x47, 0x0b, + 0x45, 0xb6, 0x88, 0xd4, 0x14, 0xd9, 0x88, 0xf7, 0xa1, 0xd8, 0xd1, 0xf6, 0x36, 0x89, 0x53, 0x39, + 0x4f, 0x42, 0xab, 0x7e, 0x51, 0xfe, 0x7e, 0x52, 0xb9, 0x6e, 0x98, 0xde, 0x76, 0x77, 0x4b, 0x6d, + 0xd9, 0x1d, 0x36, 0xbe, 0xd8, 0x9f, 0x25, 0xac, 0xef, 0x54, 0xbd, 0x7d, 0x07, 0x61, 0x75, 0x0d, + 0xb5, 0x1a, 0x85, 0x8e, 0xb6, 0x47, 0x5e, 0x0e, 0x65, 0x1b, 0x2e, 0xf0, 0x01, 0x15, 0x36, 0xe8, + 0x38, 0x06, 0xc9, 0x06, 0x9c, 0xe7, 0x91, 0x1a, 0x08, 0x3b, 0xb6, 0x85, 0x91, 0x78, 0x0b, 0x0a, + 0x2e, 0x6a, 0x21, 0xb3, 0x87, 0x74, 0x12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, 0xac, 0x72, 0x3c, 0x1b, 0x1a, 0x21, 0x68, 0x2c, 0x8a, 0x1e, 0x99, 0xc4, 0x1c, 0xcc, + 0x0e, 0xc8, 0x0b, 0xa4, 0xaf, 0xfc, 0x02, 0x90, 0xab, 0x63, 0x43, 0x5c, 0x87, 0x49, 0x76, 0x5b, + 0xb8, 0x14, 0x0f, 0xc8, 0x3b, 0x56, 0xba, 0x3a, 0xc2, 0xc8, 0x9b, 0x78, 0x03, 0x0a, 0xfc, 0xd0, + 0x7e, 0x25, 0xd1, 0x21, 0x30, 0x4b, 0xd7, 0x46, 0x9a, 0x39, 0xe3, 0x67, 0x50, 0x8a, 0xde, 0x04, + 0xe6, 0x13, 0xbd, 0x22, 0x08, 0x69, 0xf1, 0x24, 0x04, 0xa7, 0xde, 0x84, 0x33, 0xfd, 0x17, 0x04, + 0x25, 0xd1, 0xb5, 0x0f, 0x23, 0xdd, 0x38, 0x19, 0xc3, 0x03, 0x20, 0x38, 0x37, 0x78, 0x35, 0x78, + 0x39, 0xd1, 0x7d, 0x00, 0x25, 0xbd, 0x9e, 0x06, 0xc5, 0xc3, 0xac, 0xc3, 0x24, 0x3b, 0xb5, 0x27, + 0x3f, 0x40, 0x6a, 0x1c, 0xf2, 0x00, 0x07, 0x3e, 0xc7, 0x4d, 0x28, 0x86, 0x97, 0x00, 0x79, 0x58, + 0x29, 0x19, 0xe3, 0xf5, 0xd1, 0xf6, 0xc8, 0x68, 0xcf, 0xb3, 0x7b, 0x41, 0xa2, 0x03, 0xb1, 0x49, + 0xca, 0x70, 0x5b, 0x54, 0x5d, 0xe4, 0x02, 0x90, 0xe8, 0xc0, 0xed, 0x43, 0xd4, 0xc5, 0xbf, 0x84, + 0x16, 0x88, 0x09, 0xc7, 0xf4, 0x57, 0x92, 0xbd, 0x63, 0x40, 0xa9, 0x9a, 0x12, 0xc8, 0xe3, 0x6d, + 0xc3, 0x74, 0xec, 0xf0, 0x7b, 0x6d, 0x44, 0x73, 0x85, 0x30, 0x69, 0x29, 0x15, 0x8c, 0x47, 0xda, + 0x81, 0xf3, 0xf1, 0xaf, 0x60, 0x72, 0x59, 0x62, 0x38, 0x49, 0x4d, 0x87, 0xe3, 0xc1, 0x1e, 0xc0, + 0xc5, 0x21, 0xdf, 0x8e, 0xd7, 0x46, 0x33, 0xf5, 0x81, 0xa5, 0x9b, 0xa7, 0x00, 0xf3, 0xd8, 0x5f, + 0xc0, 0x54, 0xdf, 0x04, 0x5e, 0x18, 0x46, 0xc2, 0x21, 0xd2, 0xab, 0x27, 0x42, 0x02, 0xf6, 0x5a, + 0xe3, 0xf0, 0x5f, 0x39, 0x73, 0x78, 0x24, 0x0b, 0x8f, 0x8f, 0x64, 0xe1, 0x9f, 0x23, 0x59, 0xf8, + 0xf1, 0x58, 0xce, 0x1c, 0x1e, 0xcb, 0xc2, 0xe3, 0x63, 0x39, 0xf3, 0xd7, 0xb1, 0x9c, 0xf9, 0xfc, + 0x8d, 0xc8, 0x25, 0xc8, 0xa7, 0x5d, 0xb2, 0x90, 0xb7, 0x6b, 0xbb, 0x3b, 0x64, 0x51, 0xed, 0xad, + 0x56, 0xf7, 0xc2, 0x5f, 0x6c, 0xc8, 0x95, 0x68, 0x6b, 0x92, 0xfc, 0x58, 0x73, 0xf3, 0x69, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x84, 0xae, 0x8c, 0x87, 0x66, 0x12, 0x00, 0x00, } func (this *MsgGovUpdateRegistry) Equal(that interface{}) bool { @@ -1568,6 +1574,8 @@ type MsgClient interface { // executing this transaction, instead of the regular 100%. Also allows repayment and reward denoms to // be left blank - if not specified, the module will automatically select the first (alphabetically by denom) // borrow and/or collateral on the target account and the proceed normally. + // After v6.0, includes a MaxRepay field which limits repay value in USD. To prevent dust exploits, this + // value cannot be below $1.00 LeveragedLiquidate(ctx context.Context, in *MsgLeveragedLiquidate, opts ...grpc.CallOption) (*MsgLeveragedLiquidateResponse, error) // SupplyCollateral combines the Supply and Collateralize actions. SupplyCollateral(ctx context.Context, in *MsgSupplyCollateral, opts ...grpc.CallOption) (*MsgSupplyCollateralResponse, error) @@ -1753,6 +1761,8 @@ type MsgServer interface { // executing this transaction, instead of the regular 100%. Also allows repayment and reward denoms to // be left blank - if not specified, the module will automatically select the first (alphabetically by denom) // borrow and/or collateral on the target account and the proceed normally. + // After v6.0, includes a MaxRepay field which limits repay value in USD. To prevent dust exploits, this + // value cannot be below $1.00 LeveragedLiquidate(context.Context, *MsgLeveragedLiquidate) (*MsgLeveragedLiquidateResponse, error) // SupplyCollateral combines the Supply and Collateralize actions. SupplyCollateral(context.Context, *MsgSupplyCollateral) (*MsgSupplyCollateralResponse, error) @@ -2523,6 +2533,16 @@ func (m *MsgLeveragedLiquidate) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size := m.MaxRepay.Size() + i -= size + if _, err := m.MaxRepay.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a if len(m.RewardDenom) > 0 { i -= len(m.RewardDenom) copy(dAtA[i:], m.RewardDenom) @@ -3386,6 +3406,8 @@ func (m *MsgLeveragedLiquidate) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = m.MaxRepay.Size() + n += 1 + l + sovTx(uint64(l)) return n } @@ -4887,6 +4909,40 @@ func (m *MsgLeveragedLiquidate) Unmarshal(dAtA []byte) error { } m.RewardDenom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxRepay", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MaxRepay.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/leverage/types/tx_test.go b/x/leverage/types/tx_test.go index f935215266..a46e06ec57 100644 --- a/x/leverage/types/tx_test.go +++ b/x/leverage/types/tx_test.go @@ -34,8 +34,8 @@ func TestTxs(t *testing.T) { types.NewMsgMaxBorrow(testAddr, denom), types.NewMsgRepay(testAddr, token), types.NewMsgLiquidate(testAddr, testAddr, token, uDenom), - types.NewMsgLeveragedLiquidate(testAddr, testAddr, token.Denom, uDenom), - types.NewMsgLeveragedLiquidate(testAddr, testAddr, "", ""), + types.NewMsgLeveragedLiquidate(testAddr, testAddr, token.Denom, uDenom, sdk.OneDec()), + types.NewMsgLeveragedLiquidate(testAddr, testAddr, "", "", sdk.ZeroDec()), // empty optional fields } for _, tx := range txs { @@ -66,7 +66,7 @@ func TestRoutes(t *testing.T) { types.NewMsgMaxBorrow(testAddr, denom), types.NewMsgRepay(testAddr, token), types.NewMsgLiquidate(testAddr, testAddr, token, uDenom), - types.NewMsgLeveragedLiquidate(testAddr, testAddr, token.Denom, uDenom), + types.NewMsgLeveragedLiquidate(testAddr, testAddr, token.Denom, uDenom, sdk.OneDec()), } for _, tx := range txs { From ed0db2a6ae614ae042f3e96d57334c6587e0a6c8 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 14 Sep 2023 16:38:30 +0200 Subject: [PATCH 6/8] chore: set mainnet EG address (#2244) --- app/upgrades.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/upgrades.go b/app/upgrades.go index 4dad006d09..46e7dd8d45 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -62,8 +62,7 @@ func (app UmeeApp) RegisterUpgradeHandlers() { func (app *UmeeApp) registerUpgrade6(upgradeInfo upgradetypes.Plan) { planName := "v6.0" gravityModuleName := "gravity" // hardcoded to avoid dependency on GB module - // TODO: update the address for the mainnet - emergencyGroup, err := sdk.AccAddressFromBech32("umee178nsnzse8capyfak4nwlntvfg64p4lmsau4t5n") + emergencyGroup, err := sdk.AccAddressFromBech32("umee1gy3c8n2xysawysq2xf2hxn253srx4ehduevq6c") util.Panic(err) app.UpgradeKeeper.SetUpgradeHandler(planName, From b96b8798b6cad6c02342c1893d1d95529592c9ff Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 14 Sep 2023 17:01:16 +0200 Subject: [PATCH 7/8] docs: v6 release notes (#2237) * docs: v6.0 changelog * release notes * set tag in the changelog * changelog update * lint * lint --------- Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com> --- CHANGELOG.md | 56 +++++++++++++++++++++++++++++++++++++----------- RELEASE_NOTES.md | 15 ++++++++++++- 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb348ffac8..2029343b2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,10 +15,10 @@ Mention whether you follow Semantic Versioning. Usage: Change log entries are to be added to the Unreleased section under the -appropriate stanza (see below). Each entry should ideally include a tag and -the Github PR referenced in the following format: +appropriate stanza (see below). Each entry should ideally include the Github +PR referenced in the following format: -* () [#](https://github.com/umee-network/umee/pull/) +* [PR-number](https://github.com/umee-network/umee/pull/PR-number) description Types of changes (Stanzas): @@ -34,7 +34,7 @@ To release a new version, ensure an appropriate release branch exists. Add a release version and date to the existing Unreleased section which takes the form of: -## [](https://github.com/umee-network/umee/releases/tag/) - YYYY-MM-DD +## [version](https://github.com/umee-network/umee/releases/tag/version) - YYYY-MM-DD Once the version is tagged and released, a PR should be made against the main branch to incorporate the new changelog updates. @@ -46,43 +46,75 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +## [v6.0.0](https://github.com/umee-network/umee/releases/tag/v6.0.0) - 2023-09-14 + ### Features +- [2128](https://github.com/umee-network/umee/pull/2128) CW transaction and query handlers for the incentive module. - [2129](https://github.com/umee-network/umee/pull/2129) Emergency Group x/ugov proto. +- [2145](https://github.com/umee-network/umee/pull/2145) UMEE v2 Inflation. - [2146](https://github.com/umee-network/umee/pull/2146) Add store `GetTimeMs` and `SetTimeMs`. - [2157](https://github.com/umee-network/umee/pull/2157) Add `x/metoken` module. -- [2150](https://github.com/umee-network/umee/pull/2150) Add gov message to create Special Asset Pairs +- [2150](https://github.com/umee-network/umee/pull/2150), [2178](https://github.com/umee-network/umee/pull/2178) `x/leverage` Special Asset Pairs. - [2145](https://github.com/umee-network/umee/pull/2145) Add New `Inflation Parms` to x/ugov proto and added `inflation rate` change logic to umint - [2159](https://github.com/umee-network/umee/pull/2159) Add hard market cap for token emission. - [2155](https://github.com/umee-network/umee/pull/2155) `bpmath`: basis points math package. - [2166](https://github.com/umee-network/umee/pull/2166) Basis Points: `MulDec` -- [2170](https://github.com/umee-network/umee/pull/2170) Add SupplyFromModule and WithdrawToModule to leverage keeper. +- [2170](https://github.com/umee-network/umee/pull/2170) Add `SupplyFromModule` and `WithdrawToModule` to leverage keeper. +- [2177](https://github.com/umee-network/umee/pull/2177) metoken queries to cosmwasm and stargate queries. +- [2187](https://github.com/umee-network/umee/pull/2187) New CMD: `ibc_denom`. It creates ibc denom by base denom and channel-id. +- [2188](https://github.com/umee-network/umee/pull/2188) Emergency Group support for `x/leverage`. +- [2191](https://github.com/umee-network/umee/pull/2191) Emergency Group support for IBC Quota. +- [2242](https://github.com/umee-network/umee/pull/2242) New `MsgLeveragedLiquidate.MaxRepay` which allows to limit the liquidation size using the leveraged liquidation mechanism. ### Improvements -- [2134](https://github.com/umee-network/umee/pull/2134) Bump CometBFT to 34.29. +- [2135](https://github.com/umee-network/umee/pull/2135) Remove Gravity Bridge module. - [2209](https://github.com/umee-network/umee/pull/2209) Move leverage module params from paramspace to regular leverage module state. ### State Machine Breaking -- [2197](https://github.com/umee-network/umee/pull/2197) Allowing duplicate symbols on leverage token registry. Fix the oracle voting miss counter on duplicate symbol denoms. +- [2145](https://github.com/umee-network/umee/pull/2145) new UMEE inflation schedule. +- [2176](https://github.com/umee-network/umee/pull/2176) x/ugov module v2: adding token emission params. ### Bug Fixes -- [2148](https://github.com/umee-network/umee/pull/2148) Fix MsgBeginUnbonding counting existing unbondings against max unbond twice. -- [2148](https://github.com/umee-network/umee/pull/2148) Fix MsgLeverageLiquidate CLI not actually allowing wildcard denoms. -- [2197](https://github.com/umee-network/umee/pull/2197) Allowing duplicate symbols on leverage token registry. Fix the oracle voting miss counter on duplicate symbol denoms. -- [2212](https://github.com/umee-network/umee/pull/2212) Fixes an x/oracle RPC endpoint spelling, changing "/umee/oracle/v1/valdiators/{validator_addr}/aggregate_vote" to "/umee/oracle/v1/validators/{validator_addr}/aggregate_vote" +- [2185](https://github.com/umee-network/umee/pull/2185) `x/oracle` end_blocker panic. ### API Breaking +- [2135](https://github.com/umee-network/umee/pull/2135) Gravity Bridge API is removed. - [2140](https://github.com/umee-network/umee/pull/2140) Renamed ugov EventMinTxFees to EventMinGasPrice. - [2165](https://github.com/umee-network/umee/pull/2165) Use underscore for message part in the web gRPC path format: - `/umee/ugov/v1/min-gas-price` --> `/umee/ugov/v1/min_gas_price` - `/umee/ugov/v1/emergency-group` --> `/umee/ugov/v1/emergency_group` - `/umee/uibc/v1/all-outflows` --> `/umee/uibc/v1/all_outflows` +- [2169](https://github.com/umee-network/umee/pull/2169) Update numeric store getters (`util/store` package) to return bool if value is missing. - [2180](https://github.com/umee-network/umee/pull/2180) Rename leverage `Keeper.ExchangeToken -> ToUToken`, `Keeper.ExchangeUToken -> ToToken` and `Keeper.ExchangeUTokens -> ToTokens`. - [2183](https://github.com/umee-network/umee/pull/2183) Move `ToUTokenDenom`, `StripUTokenDenom` and `HasUTokenPrefix` from `leverage/keeper` to `coin` package. +- [2203](https://github.com/umee-network/umee/pull/2203) Rework proposal messages. Remove Title from `ugov/MsgGovSetIBCStatus`, `ugov/MsgGovUpdateQuota`, `leverage/MsgGovUpdateRegistry` +- [2234](https://github.com/umee-network/umee/pull/2234) Remove "Get" prefix from cli/ ref tests. + +## [v5.2.0](https://github.com/umee-network/umee/releases/tag/v5.2.0) - 2023-08-31 + +### Improvements + +- [2134](https://github.com/umee-network/umee/pull/2134) Bump CometBFT to 34.29. +- [2196](https://github.com/umee-network/umee/pull/2196) Adding Amino support to `x/leverage.MsgLeveragedLiquidate`. + +### State Machine Breaking + +- [2197](https://github.com/umee-network/umee/pull/2197) Allowing duplicate symbols on leverage token registry. Fix the oracle voting miss counter on duplicate symbol denoms. + +### Bug Fixes + +- [2148](https://github.com/umee-network/umee/pull/2148) Fix MsgBeginUnbonding counting existing unbondings against max unbond twice. +- [2148](https://github.com/umee-network/umee/pull/2148) Fix MsgLeverageLiquidate CLI not actually allowing wildcard denoms. +- [2197](https://github.com/umee-network/umee/pull/2197) Allowing duplicate symbols on leverage token registry. Fix the oracle voting miss counter on duplicate symbol denoms. + +### API Breaking + +- [2212](https://github.com/umee-network/umee/pull/2212) Fixes an x/oracle RPC endpoint spelling, changing "/umee/oracle/v1/valdiators/{validator_addr}/aggregate_vote" to "/umee/oracle/v1/validators/{validator_addr}/aggregate_vote" ## [v5.1.0](https://github.com/umee-network/umee/releases/tag/v5.1.0) - 2023-07-07 diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index bf8c44ef5f..8956d556c3 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -10,8 +10,12 @@ Release Procedure is defined in the [CONTRIBUTING](CONTRIBUTING.md#release-proce Highlights: -- TODO: special assets, new Gov messages +- We introduce [Special Assets](https://github.com/umee-network/umee/blob/v6.0.0-beta2/x/leverage/README.md#special-asset-pairs): a new primitive to optimize positions in x/leverage. - New [inflation mechanism](./docs/design_docs/012-umee-inflation-v2.md). +- [Emergency Groups](#emergency-groups). +- Full Gravity Bridge removal. We don't include GB module any more in Umee. +- New `MsgLeveragedLiquidate.MaxRepay` which allows to limit the liquidation size using the leveraged liquidation mechanism. +- Renamed ugov `EventMinTxFees` to `EventMinGasPrice`. ### New Inflation Mechanism @@ -28,6 +32,15 @@ The new Inflation Cycle will start on 2023-10-15 15:00 UTC. This will mark the f The x/staking Bonded Goal stays the same: 33.00%. +### Emergency Groups + +Currently, any parameter update requires going through a standard governance process, which takes 4 days. In a critical situation we need to act immediately: + +- Control IBC Quota parameters (eg disable IBC) +- apply safe updates to oracle, leverage or incentive module parameters. + +Emergency Group can trigger safe parameter updates at any time as a standard transaction. The Emergency Group address is controlled by the Umee Chain governance (`x/gov`) and can be disabled at any time. + ### Validators #### libwasmvm update From 87159cb51fb90d59b9cea832efaadf83693bf083 Mon Sep 17 00:00:00 2001 From: Sai Kumar <17549398+gsk967@users.noreply.github.com> Date: Thu, 14 Sep 2023 22:29:37 +0530 Subject: [PATCH 8/8] add emergency group ugov cli query (#2245) --- x/ugov/client/cli/query.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/x/ugov/client/cli/query.go b/x/ugov/client/cli/query.go index 65edb43f68..43dec209b6 100644 --- a/x/ugov/client/cli/query.go +++ b/x/ugov/client/cli/query.go @@ -24,11 +24,35 @@ func GetQueryCmd() *cobra.Command { QueryMinGasPrice(), QueryInflationParams(), QueryInflationCyleEnd(), + QueryEmergencyGroup(), ) return cmd } +// QueryEmergencyGroup creates the Msg/QueryEmergencyGroup CLI. +func QueryEmergencyGroup() *cobra.Command { + cmd := &cobra.Command{ + Use: "emergency-group", + Args: cobra.NoArgs, + Short: "Query the emergency group address.", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := ugov.NewQueryClient(clientCtx) + resp, err := queryClient.EmergencyGroup(cmd.Context(), &ugov.QueryEmergencyGroup{}) + return cli.PrintOrErr(resp, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + // QueryMinGasPrice creates the Msg/QueryMinGasPrice CLI. func QueryMinGasPrice() *cobra.Command { cmd := &cobra.Command{