From 8fe5d42a38651f48c1d97e46f278537b10dd539a Mon Sep 17 00:00:00 2001 From: Adam Moser <63419657+toteki@users.noreply.github.com> Date: Wed, 27 Sep 2023 11:34:20 -0600 Subject: [PATCH] feat: account summary to display both spot and leverage prices (#2263) * add inspectAccount query * -- * -- * unstable field note * new query fields and logic * fix tests * suggestion++ Co-authored-by: Robert Zaremba * fix suggestion * cl++ --------- Co-authored-by: Robert Zaremba --- CHANGELOG.md | 1 + proto/umee/leverage/v1/query.proto | 40 +- swagger/swagger.yaml | 275 ++++++++- x/leverage/client/cli/query.go | 27 + x/leverage/client/tests/tests.go | 9 +- x/leverage/keeper/grpc_query.go | 53 +- x/leverage/keeper/grpc_query_test.go | 9 +- x/leverage/keeper/inspector.go | 61 ++ x/leverage/types/query.pb.go | 800 +++++++++++++++++++++++---- x/leverage/types/query.pb.gw.go | 83 +++ 10 files changed, 1210 insertions(+), 148 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4065a56351..6c4c82b2c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements - [2261](https://github.com/umee-network/umee/pull/2261) Use go 1.21 +- [2263](https://github.com/umee-network/umee/pull/2263) Add spot price fields to account summary, and ensure all other fields use leverage logic prices. ### Bug Fixes diff --git a/proto/umee/leverage/v1/query.proto b/proto/umee/leverage/v1/query.proto index 22ec0ec772..22c8782cb1 100644 --- a/proto/umee/leverage/v1/query.proto +++ b/proto/umee/leverage/v1/query.proto @@ -82,6 +82,12 @@ service Query { returns (QueryInspectResponse) { option (google.api.http).get = "/umee/leverage/v1/inspect"; } + + // InspectAccount runs the inspect query on a single address + rpc InspectAccount(QueryInspectAccount) + returns (QueryInspectAccountResponse) { + option (google.api.http).get = "/umee/leverage/v1/inspect-account"; + } } // QueryParams defines the request structure for the Params gRPC service @@ -254,6 +260,7 @@ message QueryAccountSummary { // QueryAccountSummaryResponse defines the response structure for the AccountSummary gRPC service handler. message QueryAccountSummaryResponse { // Supplied Value is the sum of the USD value of all tokens the account has supplied, including interest earned. + // It uses the lower of spot or historic price for each token. // Computation skips assets which are missing oracle prices, potentially resulting in a lower supplied // value than if prices were all available. string supplied_value = 1 [ @@ -261,6 +268,7 @@ message QueryAccountSummaryResponse { (gogoproto.nullable) = false ]; // Collateral Value is the sum of the USD value of all uTokens the account has collateralized. + // It uses the lower of spot or historic price for each token. // Computation skips collateral which is missing an oracle price, potentially resulting in a lower collateral // value than if prices were all available. string collateral_value = 2 [ @@ -268,7 +276,7 @@ message QueryAccountSummaryResponse { (gogoproto.nullable) = false ]; // Borrowed Value is the sum of the USD value of all tokens the account has borrowed, including interest owed. - // It always uses spot prices. + // It uses the higher of spot or historic price for each token. // Computation skips borrows which are missing oracle prices, potentially resulting in a lower borrowed // value than if prices were all available. string borrowed_value = 3 [ @@ -289,6 +297,21 @@ message QueryAccountSummaryResponse { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = true ]; + // Spot Supplied Value is supplied value but always uses spot prices. + string spot_supplied_value = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // Spot Collateral Value is collateral value but always uses spot prices. + string spot_collateral_value = 7 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; + // Spot Borrowed Value is borrowed value but always uses spot prices. + string spot_borrowed_value = 8 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; } // QueryLiquidationTargets defines the request structure for the LiquidationTargets gRPC service handler. @@ -366,6 +389,11 @@ message QueryInspect { double ltv = 5; } +// QueryInspectAccount defines the request structure for the InspectAccount gRPC service handler. +message QueryInspectAccount { + string address = 1; +} + // QueryInspectResponse defines the response structure for the Inspect gRPC service handler. message QueryInspectResponse { repeated InspectAccount borrowers = 1 [ @@ -373,6 +401,13 @@ message QueryInspectResponse { ]; } +// QueryInspectAccountResponse defines the response structure for the InspectAccount gRPC service handler. +message QueryInspectAccountResponse { + InspectAccount borrower = 1 [ + (gogoproto.nullable) = false + ]; +} + // InspectAccount contains risk and balance info for a single account for the inspector query. message InspectAccount { // Address of a borrower @@ -381,6 +416,9 @@ message InspectAccount { RiskInfo analysis = 2; // Collateral and borrowed tokens, denoted in human-readable symbol denom instead of ibc denom. DecBalances position = 3; + // Info is a string which can be used to report additional information of any type. + // UNSTABLE: We do not guarantee consistency of any data structures contained within the string. + string info = 4; } // RiskInfo defines a borrower's account health without requiring sdk.Dec formatting. diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index dcd714d561..2bf7926026 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -133,6 +133,8 @@ paths: Supplied Value is the sum of the USD value of all tokens the account has supplied, including interest earned. + It uses the lower of spot or historic price for each token. + Computation skips assets which are missing oracle prices, potentially resulting in a lower supplied @@ -143,6 +145,8 @@ paths: Collateral Value is the sum of the USD value of all uTokens the account has collateralized. + It uses the lower of spot or historic price for each token. + Computation skips collateral which is missing an oracle price, potentially resulting in a lower collateral @@ -153,7 +157,7 @@ paths: Borrowed Value is the sum of the USD value of all tokens the account has borrowed, including interest owed. - It always uses spot prices. + It uses the higher of spot or historic price for each token. Computation skips borrows which are missing oracle prices, potentially resulting in a lower borrowed @@ -180,6 +184,21 @@ paths: Will be null if an oracle price required for computation is missing. + spot_supplied_value: + type: string + description: >- + Spot Supplied Value is supplied value but always uses spot + prices. + spot_collateral_value: + type: string + description: >- + Spot Collateral Value is collateral value but always uses spot + prices. + spot_borrowed_value: + type: string + description: >- + Spot Borrowed Value is borrowed value but always uses spot + prices. description: >- QueryAccountSummaryResponse defines the response structure for the AccountSummary gRPC service handler. @@ -370,6 +389,14 @@ paths: description: >- Borrowed contains all tokens the account has borrowed, including interest owed. + info: + type: string + description: >- + Info is a string which can be used to report additional + information of any type. + + UNSTABLE: We do not guarantee consistency of any data + structures contained within the string. description: >- InspectAccount contains risk and balance info for a single account for the inspector query. @@ -443,6 +470,132 @@ paths: format: double tags: - Query + /umee/leverage/v1/inspect-account: + get: + summary: InspectAccount runs the inspect query on a single address + operationId: InspectAccount + responses: + '200': + description: A successful response. + schema: + type: object + properties: + borrower: + type: object + properties: + address: + type: string + title: Address of a borrower + analysis: + description: >- + USD totals of borrower's collateral, debt, and liquidation + threshold. + type: object + properties: + Borrowed: + type: number + format: double + description: Borrowed is account's borrowed value in USD. + Liquidation: + type: number + format: double + description: Liquidation is account's liquidation threshold in USD. + Value: + type: number + format: double + description: Value is account's collateral value in USD. + position: + description: >- + Collateral and borrowed tokens, denoted in human-readable + symbol denom instead of ibc denom. + type: object + properties: + collateral: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a + decimal amount. + + + NOTE: The amount field is an Dec which implements + the custom method + + signatures required by gogoproto. + description: >- + Collateral contains all uTokens the account has + collateralized. It has been converted from uTokens to + tokens. + borrowed: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a + decimal amount. + + + NOTE: The amount field is an Dec which implements + the custom method + + signatures required by gogoproto. + description: >- + Borrowed contains all tokens the account has borrowed, + including interest owed. + info: + type: string + description: >- + Info is a string which can be used to report additional + information of any type. + + UNSTABLE: We do not guarantee consistency of any data + structures contained within the string. + description: >- + InspectAccount contains risk and balance info for a single + account for the inspector query. + description: >- + QueryInspectAccountResponse defines the response structure for the + InspectAccount gRPC service handler. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: address + in: query + required: false + type: string + tags: + - Query /umee/leverage/v1/liquidation_targets: get: summary: >- @@ -4404,6 +4557,14 @@ definitions: description: >- Borrowed contains all tokens the account has borrowed, including interest owed. + info: + type: string + description: >- + Info is a string which can be used to report additional information of + any type. + + UNSTABLE: We do not guarantee consistency of any data structures + contained within the string. description: >- InspectAccount contains risk and balance info for a single account for the inspector query. @@ -4554,6 +4715,8 @@ definitions: Supplied Value is the sum of the USD value of all tokens the account has supplied, including interest earned. + It uses the lower of spot or historic price for each token. + Computation skips assets which are missing oracle prices, potentially resulting in a lower supplied @@ -4564,6 +4727,8 @@ definitions: Collateral Value is the sum of the USD value of all uTokens the account has collateralized. + It uses the lower of spot or historic price for each token. + Computation skips collateral which is missing an oracle price, potentially resulting in a lower collateral @@ -4574,7 +4739,7 @@ definitions: Borrowed Value is the sum of the USD value of all tokens the account has borrowed, including interest owed. - It always uses spot prices. + It uses the higher of spot or historic price for each token. Computation skips borrows which are missing oracle prices, potentially resulting in a lower borrowed @@ -4600,6 +4765,15 @@ definitions: becomes eligible for liquidation. Will be null if an oracle price required for computation is missing. + spot_supplied_value: + type: string + description: Spot Supplied Value is supplied value but always uses spot prices. + spot_collateral_value: + type: string + description: Spot Collateral Value is collateral value but always uses spot prices. + spot_borrowed_value: + type: string + description: Spot Borrowed Value is borrowed value but always uses spot prices. description: >- QueryAccountSummaryResponse defines the response structure for the AccountSummary gRPC service handler. @@ -4624,6 +4798,95 @@ definitions: description: >- QueryBadDebtsResponse defines the response structure for the BedDebts gRPC service handler. + umee.leverage.v1.QueryInspectAccountResponse: + type: object + properties: + borrower: + type: object + properties: + address: + type: string + title: Address of a borrower + analysis: + description: >- + USD totals of borrower's collateral, debt, and liquidation + threshold. + type: object + properties: + Borrowed: + type: number + format: double + description: Borrowed is account's borrowed value in USD. + Liquidation: + type: number + format: double + description: Liquidation is account's liquidation threshold in USD. + Value: + type: number + format: double + description: Value is account's collateral value in USD. + position: + description: >- + Collateral and borrowed tokens, denoted in human-readable symbol + denom instead of ibc denom. + type: object + properties: + collateral: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: >- + Collateral contains all uTokens the account has + collateralized. It has been converted from uTokens to tokens. + borrowed: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: >- + Borrowed contains all tokens the account has borrowed, + including interest owed. + info: + type: string + description: >- + Info is a string which can be used to report additional + information of any type. + + UNSTABLE: We do not guarantee consistency of any data structures + contained within the string. + description: >- + InspectAccount contains risk and balance info for a single account for + the inspector query. + description: >- + QueryInspectAccountResponse defines the response structure for the + InspectAccount gRPC service handler. umee.leverage.v1.QueryInspectResponse: type: object properties: @@ -4702,6 +4965,14 @@ definitions: description: >- Borrowed contains all tokens the account has borrowed, including interest owed. + info: + type: string + description: >- + Info is a string which can be used to report additional + information of any type. + + UNSTABLE: We do not guarantee consistency of any data structures + contained within the string. description: >- InspectAccount contains risk and balance info for a single account for the inspector query. diff --git a/x/leverage/client/cli/query.go b/x/leverage/client/cli/query.go index 5f2b42a59a..88c1367cd2 100644 --- a/x/leverage/client/cli/query.go +++ b/x/leverage/client/cli/query.go @@ -39,6 +39,7 @@ func GetQueryCmd() *cobra.Command { QueryMaxWithdraw(), QueryMaxBorrow(), QueryInspect(), + QueryInspectAccount(), ) return cmd @@ -366,3 +367,29 @@ func QueryInspect() *cobra.Command { return cmd } + +// QueryInspectAccount creates a Cobra command to inspect a single account. +func QueryInspectAccount() *cobra.Command { + cmd := &cobra.Command{ + Use: "inspect-account [addr]", + Args: cobra.ExactArgs(1), + Short: "Inspect a single account", + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + req := &types.QueryInspectAccount{ + Address: args[0], + } + resp, err := queryClient.InspectAccount(cmd.Context(), req) + return cli.PrintOrErr(resp, err, clientCtx) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/leverage/client/tests/tests.go b/x/leverage/client/tests/tests.go index 86f49a04ca..b44ad6fa6c 100644 --- a/x/leverage/client/tests/tests.go +++ b/x/leverage/client/tests/tests.go @@ -328,11 +328,14 @@ func (s *IntegrationTests) TestLeverageScenario() { // app/test_helpers.go/IntegrationTestNetworkConfig // times the amount of umee, and then times params // (1001 / 1000000) * 34.21 = 0.03424421 - SuppliedValue: sdk.MustNewDecFromStr("0.03424421"), + SuppliedValue: sdk.MustNewDecFromStr("0.03424421"), + SpotSuppliedValue: sdk.MustNewDecFromStr("0.03424421"), // (1001 / 1000000) * 34.21 = 0.03424421 - CollateralValue: sdk.MustNewDecFromStr("0.03424421"), + CollateralValue: sdk.MustNewDecFromStr("0.03424421"), + SpotCollateralValue: sdk.MustNewDecFromStr("0.03424421"), // (251 / 1000000) * 34.21 = 0.00858671 - BorrowedValue: sdk.MustNewDecFromStr("0.00858671"), + BorrowedValue: sdk.MustNewDecFromStr("0.00858671"), + SpotBorrowedValue: sdk.MustNewDecFromStr("0.00858671"), // (1001 / 1000000) * 34.21 * 0.25 = 0.0085610525 BorrowLimit: sdk.MustNewDecFromStr("0.0085610525"), // (1001 / 1000000) * 0.26 * 34.21 = 0.008903494600000000 diff --git a/x/leverage/keeper/grpc_query.go b/x/leverage/keeper/grpc_query.go index bcd7645138..4ebdf9346e 100644 --- a/x/leverage/keeper/grpc_query.go +++ b/x/leverage/keeper/grpc_query.go @@ -237,47 +237,56 @@ func (q Querier) AccountSummary( collateral := q.Keeper.GetBorrowerCollateral(ctx, addr) borrowed := q.Keeper.GetBorrowerBorrows(ctx, addr) - // supplied value always uses spot prices, and skips supplied assets that are missing prices - suppliedValue, err := q.Keeper.VisibleTokenValue(ctx, supplied, types.PriceModeSpot) + // the following spot price calculations skip assets missing prices, but otherwise always + // use the most up to date prices + spotSuppliedValue, err := q.Keeper.VisibleTokenValue(ctx, supplied, types.PriceModeSpot) if err != nil { return nil, err } - - // borrowed value uses spot prices here, but leverage logic instead uses - // the higher of spot or historic prices for each borrowed token when comparing it - // to borrow limit. This line also skips borrowed assets that are missing prices. - borrowedValue, err := q.Keeper.VisibleTokenValue(ctx, borrowed, types.PriceModeSpot) + spotBorrowedValue, err := q.Keeper.VisibleTokenValue(ctx, borrowed, types.PriceModeSpot) if err != nil { return nil, err } - - // collateral value always uses spot prices, and this line skips assets that are missing prices - collateralValue, err := q.Keeper.VisibleCollateralValue(ctx, collateral, types.PriceModeSpot) + spotCollateralValue, err := q.Keeper.VisibleCollateralValue(ctx, collateral, types.PriceModeSpot) if err != nil { return nil, err } - // borrow limit shown here as it is used in leverage logic: - // using the lower of spot or historic prices for each collateral token - // skips collateral tokens with missing oracle prices - ap, err := q.Keeper.GetAccountPosition(ctx, addr, false) + // this supplied value uses leverage-like prices: the lower of spot or historic price for supplied tokens + suppliedValue, err := q.Keeper.VisibleTokenValue(ctx, supplied, types.PriceModeLow) if err != nil { return nil, err } - borrowLimit := ap.Limit() resp := &types.QueryAccountSummaryResponse{ - SuppliedValue: suppliedValue, - CollateralValue: collateralValue, - BorrowedValue: borrowedValue, - BorrowLimit: borrowLimit, + SuppliedValue: suppliedValue, + SpotSuppliedValue: spotSuppliedValue, + SpotCollateralValue: spotCollateralValue, + SpotBorrowedValue: spotBorrowedValue, } - // borrow limit shown here as it is used in leverage logic: + // values computed from position use the same prices found in leverage logic: // using the lower of spot or historic prices for each collateral token - // error on collateral tokens with missing oracle prices, but skips - // borrow tokens missing collateral prices + // and the higher of spot or historic prices for each borrowed token + // skips collateral tokens with missing prices, but errors on borrow tokens missing prices + // (for oracle errors only the relevant response fields will be left nil) + ap, err := q.Keeper.GetAccountPosition(ctx, addr, false) + if nonOracleError(err) { + return nil, err + } + if err == nil { + resp.BorrowedValue = ap.BorrowedValue() + resp.CollateralValue = ap.CollateralValue() + resp.BorrowLimit = ap.Limit() + } + + // liquidation threshold shown here as it is used in leverage logic: using spot prices. + // skips borrowed tokens with missing prices, but errors on collateral missing prices + // (for oracle errors only the relevant response fields will be left nil) ap, err = q.Keeper.GetAccountPosition(ctx, addr, true) + if nonOracleError(err) { + return nil, err + } if err == nil { // on an error here, simply skip setting the response field liquidationThreshold := ap.Limit() diff --git a/x/leverage/keeper/grpc_query_test.go b/x/leverage/keeper/grpc_query_test.go index 93098e6421..3661dff18b 100644 --- a/x/leverage/keeper/grpc_query_test.go +++ b/x/leverage/keeper/grpc_query_test.go @@ -141,11 +141,14 @@ func (s *IntegrationTestSuite) TestQuerier_AccountSummary() { // times the amount of umee, then sometimes times params // from newToken in x/leverage/keeper/keeper_test.go // (1000) * 4.21 = 4210 - SuppliedValue: sdk.MustNewDecFromStr("4210"), + SuppliedValue: sdk.MustNewDecFromStr("4210"), + SpotSuppliedValue: sdk.MustNewDecFromStr("4210"), // (1000) * 4.21 = 4210 - CollateralValue: sdk.MustNewDecFromStr("4210"), + CollateralValue: sdk.MustNewDecFromStr("4210"), + SpotCollateralValue: sdk.MustNewDecFromStr("4210"), // Nothing borrowed - BorrowedValue: sdk.ZeroDec(), + BorrowedValue: sdk.ZeroDec(), + SpotBorrowedValue: sdk.ZeroDec(), // (1000) * 4.21 * 0.25 = 1052.5 BorrowLimit: sdk.MustNewDecFromStr("1052.5"), // (1000) * 4.21 * 0.26 = 1094.6 diff --git a/x/leverage/keeper/inspector.go b/x/leverage/keeper/inspector.go index 24e0ebfa94..d56fe269f5 100644 --- a/x/leverage/keeper/inspector.go +++ b/x/leverage/keeper/inspector.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "fmt" "math" "sort" "strings" @@ -88,6 +89,7 @@ func (q Querier) Inspect( Collateral: symbolDecCoins(collateral, exchangeRates), Borrowed: symbolDecCoins(borrowed, exchangeRates), }, + Info: "", } ok := account.Analysis.Borrowed > req.Borrowed ok = ok && account.Analysis.Value > req.Collateral @@ -121,6 +123,65 @@ func (q Querier) Inspect( return &types.QueryInspectResponse{Borrowers: sortedBorrowers}, nil } +// Separated from grpc_query.go +func (q Querier) InspectAccount( + goCtx context.Context, + req *types.QueryInspectAccount, +) (*types.QueryInspectAccountResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + k, ctx := q.Keeper, sdk.UnwrapSDKContext(goCtx) + tokens := k.GetAllRegisteredTokens(ctx) + + exchangeRates := map[string]tokenExchangeRate{} + for _, t := range tokens { + exchangeRates[t.BaseDenom] = tokenExchangeRate{ + symbol: t.SymbolDenom, + exponent: t.Exponent, + exchangeRate: k.DeriveExchangeRate(ctx, t.BaseDenom), + } + } + + addr, err := sdk.AccAddressFromBech32(req.Address) + if err != nil { + return nil, err + } + + position, err := k.GetAccountPosition(ctx, addr, true) + if err != nil { + return nil, err + } + borrowedValue := position.BorrowedValue() + collateralValue := position.CollateralValue() + liquidationThreshold := position.Limit() + + borrowPosition, err := k.GetAccountPosition(ctx, addr, false) + if err != nil { + return nil, err + } + + borrowed := k.GetBorrowerBorrows(ctx, addr) + collateral := k.GetBorrowerCollateral(ctx, addr) + + account := types.InspectAccount{ + Address: addr.String(), + Analysis: &types.RiskInfo{ + Borrowed: neat(borrowedValue), + Liquidation: neat(liquidationThreshold), + Value: neat(collateralValue), + }, + Position: &types.DecBalances{ + Collateral: symbolDecCoins(collateral, exchangeRates), + Borrowed: symbolDecCoins(borrowed, exchangeRates), + }, + Info: fmt.Sprint(position.String(), "\n", borrowPosition.String()), + } + + return &types.QueryInspectAccountResponse{Borrower: account}, nil +} + // symbolDecCoins converts an sdk.Coins containing base tokens or uTokens into an sdk.DecCoins containing symbol denom // base tokens. for example, 1000u/uumee becomes 0.0015UMEE at an exponent of 6 and uToken exchange rate of 1.5 func symbolDecCoins( diff --git a/x/leverage/types/query.pb.go b/x/leverage/types/query.pb.go index 17a29ded44..909a18e447 100644 --- a/x/leverage/types/query.pb.go +++ b/x/leverage/types/query.pb.go @@ -502,15 +502,17 @@ var xxx_messageInfo_QueryAccountSummary proto.InternalMessageInfo // QueryAccountSummaryResponse defines the response structure for the AccountSummary gRPC service handler. type QueryAccountSummaryResponse struct { // Supplied Value is the sum of the USD value of all tokens the account has supplied, including interest earned. + // It uses the lower of spot or historic price for each token. // Computation skips assets which are missing oracle prices, potentially resulting in a lower supplied // value than if prices were all available. SuppliedValue github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=supplied_value,json=suppliedValue,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"supplied_value"` // Collateral Value is the sum of the USD value of all uTokens the account has collateralized. + // It uses the lower of spot or historic price for each token. // Computation skips collateral which is missing an oracle price, potentially resulting in a lower collateral // value than if prices were all available. CollateralValue github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=collateral_value,json=collateralValue,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"collateral_value"` // Borrowed Value is the sum of the USD value of all tokens the account has borrowed, including interest owed. - // It always uses spot prices. + // It uses the higher of spot or historic price for each token. // Computation skips borrows which are missing oracle prices, potentially resulting in a lower borrowed // value than if prices were all available. BorrowedValue github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=borrowed_value,json=borrowedValue,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"borrowed_value"` @@ -522,6 +524,12 @@ type QueryAccountSummaryResponse struct { // Liquidation Threshold is the Borrowed Value at which the account becomes eligible for liquidation. // Will be null if an oracle price required for computation is missing. LiquidationThreshold *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=liquidation_threshold,json=liquidationThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"liquidation_threshold,omitempty"` + // Spot Supplied Value is supplied value but always uses spot prices. + SpotSuppliedValue github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=spot_supplied_value,json=spotSuppliedValue,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"spot_supplied_value"` + // Spot Collateral Value is collateral value but always uses spot prices. + SpotCollateralValue github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=spot_collateral_value,json=spotCollateralValue,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"spot_collateral_value"` + // Spot Borrowed Value is borrowed value but always uses spot prices. + SpotBorrowedValue github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,8,opt,name=spot_borrowed_value,json=spotBorrowedValue,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"spot_borrowed_value"` } func (m *QueryAccountSummaryResponse) Reset() { *m = QueryAccountSummaryResponse{} } @@ -920,6 +928,44 @@ func (m *QueryInspect) XXX_DiscardUnknown() { var xxx_messageInfo_QueryInspect proto.InternalMessageInfo +// QueryInspectAccount defines the request structure for the InspectAccount gRPC service handler. +type QueryInspectAccount struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *QueryInspectAccount) Reset() { *m = QueryInspectAccount{} } +func (m *QueryInspectAccount) String() string { return proto.CompactTextString(m) } +func (*QueryInspectAccount) ProtoMessage() {} +func (*QueryInspectAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{21} +} +func (m *QueryInspectAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryInspectAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInspectAccount.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 *QueryInspectAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInspectAccount.Merge(m, src) +} +func (m *QueryInspectAccount) XXX_Size() int { + return m.Size() +} +func (m *QueryInspectAccount) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInspectAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInspectAccount proto.InternalMessageInfo + // QueryInspectResponse defines the response structure for the Inspect gRPC service handler. type QueryInspectResponse struct { Borrowers []InspectAccount `protobuf:"bytes,1,rep,name=borrowers,proto3" json:"borrowers"` @@ -929,7 +975,7 @@ func (m *QueryInspectResponse) Reset() { *m = QueryInspectResponse{} } func (m *QueryInspectResponse) String() string { return proto.CompactTextString(m) } func (*QueryInspectResponse) ProtoMessage() {} func (*QueryInspectResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{21} + return fileDescriptor_1e8137dcabb0ccc7, []int{22} } func (m *QueryInspectResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -958,6 +1004,44 @@ func (m *QueryInspectResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryInspectResponse proto.InternalMessageInfo +// QueryInspectAccountResponse defines the response structure for the InspectAccount gRPC service handler. +type QueryInspectAccountResponse struct { + Borrower InspectAccount `protobuf:"bytes,1,opt,name=borrower,proto3" json:"borrower"` +} + +func (m *QueryInspectAccountResponse) Reset() { *m = QueryInspectAccountResponse{} } +func (m *QueryInspectAccountResponse) String() string { return proto.CompactTextString(m) } +func (*QueryInspectAccountResponse) ProtoMessage() {} +func (*QueryInspectAccountResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1e8137dcabb0ccc7, []int{23} +} +func (m *QueryInspectAccountResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryInspectAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryInspectAccountResponse.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 *QueryInspectAccountResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryInspectAccountResponse.Merge(m, src) +} +func (m *QueryInspectAccountResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryInspectAccountResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryInspectAccountResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryInspectAccountResponse proto.InternalMessageInfo + // InspectAccount contains risk and balance info for a single account for the inspector query. type InspectAccount struct { // Address of a borrower @@ -966,13 +1050,16 @@ type InspectAccount struct { Analysis *RiskInfo `protobuf:"bytes,2,opt,name=analysis,proto3" json:"analysis,omitempty"` // Collateral and borrowed tokens, denoted in human-readable symbol denom instead of ibc denom. Position *DecBalances `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` + // Info is a string which can be used to report additional information of any type. + // UNSTABLE: We do not guarantee consistency of any data structures contained within the string. + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` } func (m *InspectAccount) Reset() { *m = InspectAccount{} } func (m *InspectAccount) String() string { return proto.CompactTextString(m) } func (*InspectAccount) ProtoMessage() {} func (*InspectAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{22} + return fileDescriptor_1e8137dcabb0ccc7, []int{24} } func (m *InspectAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1015,7 +1102,7 @@ func (m *RiskInfo) Reset() { *m = RiskInfo{} } func (m *RiskInfo) String() string { return proto.CompactTextString(m) } func (*RiskInfo) ProtoMessage() {} func (*RiskInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{23} + return fileDescriptor_1e8137dcabb0ccc7, []int{25} } func (m *RiskInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1056,7 +1143,7 @@ func (m *DecBalances) Reset() { *m = DecBalances{} } func (m *DecBalances) String() string { return proto.CompactTextString(m) } func (*DecBalances) ProtoMessage() {} func (*DecBalances) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8137dcabb0ccc7, []int{24} + return fileDescriptor_1e8137dcabb0ccc7, []int{26} } func (m *DecBalances) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1107,7 +1194,9 @@ func init() { proto.RegisterType((*QueryMaxBorrow)(nil), "umee.leverage.v1.QueryMaxBorrow") proto.RegisterType((*QueryMaxBorrowResponse)(nil), "umee.leverage.v1.QueryMaxBorrowResponse") proto.RegisterType((*QueryInspect)(nil), "umee.leverage.v1.QueryInspect") + proto.RegisterType((*QueryInspectAccount)(nil), "umee.leverage.v1.QueryInspectAccount") proto.RegisterType((*QueryInspectResponse)(nil), "umee.leverage.v1.QueryInspectResponse") + proto.RegisterType((*QueryInspectAccountResponse)(nil), "umee.leverage.v1.QueryInspectAccountResponse") proto.RegisterType((*InspectAccount)(nil), "umee.leverage.v1.InspectAccount") proto.RegisterType((*RiskInfo)(nil), "umee.leverage.v1.RiskInfo") proto.RegisterType((*DecBalances)(nil), "umee.leverage.v1.DecBalances") @@ -1116,118 +1205,124 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/query.proto", fileDescriptor_1e8137dcabb0ccc7) } var fileDescriptor_1e8137dcabb0ccc7 = []byte{ - // 1765 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x98, 0xcf, 0x6f, 0xdb, 0xc8, - 0x15, 0xc7, 0x4d, 0x3b, 0xfe, 0xf5, 0x64, 0xd9, 0xce, 0xc4, 0x71, 0x18, 0xc5, 0x96, 0x14, 0x26, - 0x76, 0x9c, 0xa4, 0x96, 0x62, 0x07, 0x30, 0x50, 0xb4, 0x68, 0x6b, 0xc5, 0x2d, 0x9a, 0xc2, 0x09, - 0x1c, 0xe6, 0x47, 0x91, 0x1f, 0xad, 0x30, 0x22, 0xa7, 0x32, 0x61, 0x8a, 0x54, 0x38, 0x94, 0x6c, - 0x15, 0xc8, 0xa5, 0x40, 0x6f, 0x2d, 0xd0, 0xa2, 0xe8, 0xa1, 0x87, 0x1e, 0x7a, 0xed, 0x5f, 0xe2, - 0x63, 0x80, 0xbd, 0x2c, 0x16, 0x58, 0xef, 0x6e, 0xb2, 0xd8, 0x43, 0x2e, 0xfb, 0x0f, 0xec, 0x02, - 0x8b, 0xf9, 0xc1, 0x11, 0x65, 0x4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 0x6d, 0xe2, 0xf9, 0x35, 0x0e, - 0x9d, 0x34, 0x27, 0xd9, 0x95, 0x2d, 0x76, 0xc1, 0x78, 0x01, 0x8b, 0x5d, 0xfd, 0x94, 0xa0, 0x9f, - 0xc2, 0x44, 0xc0, 0xe7, 0x82, 0x96, 0xae, 0xe5, 0x47, 0x56, 0x52, 0xeb, 0x97, 0x92, 0x92, 0xb8, - 0x8f, 0x54, 0xa4, 0xcc, 0x8d, 0x5b, 0x80, 0x38, 0xfb, 0x71, 0x9d, 0x58, 0x0e, 0x76, 0x37, 0x29, - 0x25, 0x21, 0x45, 0x73, 0x30, 0x1a, 0xd7, 0x22, 0x06, 0xc6, 0x2b, 0xc8, 0x24, 0x6d, 0x95, 0x88, - 0x5f, 0xc0, 0x68, 0x1d, 0x3b, 0x01, 0x95, 0x0a, 0x8c, 0xa4, 0x82, 0xb8, 0xdf, 0x0e, 0x76, 0x02, - 0x29, 0x46, 0xb8, 0x29, 0x25, 0x0f, 0x70, 0xb0, 0x47, 0xc2, 0xc7, 0x8d, 0x5a, 0x0d, 0x07, 0xad, - 0x1e, 0x4a, 0xbe, 0x9b, 0x92, 0x52, 0x3a, 0x8c, 0x95, 0x94, 0xab, 0x30, 0x45, 0x5b, 0xb5, 0x8a, - 0xef, 0x76, 0x64, 0x34, 0x25, 0xae, 0xf1, 0x9c, 0xa2, 0x0c, 0x4c, 0x90, 0x83, 0xba, 0xef, 0x11, - 0x2f, 0xd4, 0x87, 0xf3, 0xda, 0x4a, 0xda, 0x54, 0x63, 0xf4, 0x08, 0xa6, 0xfc, 0x00, 0x5b, 0x2e, - 0x29, 0xd7, 0x03, 0xc7, 0x22, 0xfa, 0x08, 0x73, 0x2f, 0x15, 0x0e, 0x8f, 0x72, 0xda, 0x67, 0x47, - 0xb9, 0xe5, 0xaa, 0x13, 0xee, 0x36, 0x2a, 0x05, 0xcb, 0xaf, 0x15, 0xe5, 0x76, 0x12, 0x3f, 0xab, - 0xd4, 0xde, 0x2b, 0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, 0x6e, 0x14, 0x0f, 0xda, 0x50, 0x7e, - 0xc4, 0x54, 0xc6, 0xf8, 0xb7, 0xfa, 0xbb, 0x3f, 0x04, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x52, 0x8d, - 0xcd, 0x72, 0x18, 0x00, 0x00, + // 1872 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x59, 0x4f, 0x6f, 0xdb, 0xc8, + 0x15, 0x37, 0xed, 0x44, 0x96, 0x9f, 0x2c, 0xdb, 0x99, 0x38, 0x09, 0xa3, 0x38, 0x92, 0xc2, 0xc4, + 0x89, 0x37, 0x5b, 0x4b, 0x89, 0x17, 0x08, 0xb0, 0x68, 0xd1, 0x36, 0x8a, 0x5b, 0x34, 0x45, 0x76, + 0xe1, 0x30, 0x9b, 0x2d, 0xb2, 0xbb, 0x5d, 0x61, 0x44, 0xcd, 0xca, 0x84, 0x29, 0x92, 0xe1, 0x50, + 0x8a, 0x55, 0x60, 0x2f, 0x0b, 0xf4, 0xd6, 0x02, 0x0d, 0x8a, 0x1e, 0x7a, 0xec, 0xb5, 0xb7, 0x7e, + 0x8b, 0x1c, 0x17, 0xe8, 0xa5, 0x28, 0x50, 0xb7, 0x4d, 0x8a, 0x1e, 0x72, 0xe9, 0x17, 0xe8, 0xa1, + 0x98, 0x3f, 0x1c, 0x91, 0xa2, 0xe8, 0xc8, 0x44, 0x7d, 0xb2, 0x86, 0xf3, 0xde, 0xef, 0xfd, 0xe6, + 0xcd, 0xbc, 0x3f, 0x33, 0x86, 0x8d, 0x41, 0x9f, 0x90, 0xa6, 0x43, 0x86, 0x24, 0xc0, 0x3d, 0xd2, + 0x1c, 0xde, 0x6d, 0x3e, 0x1f, 0x90, 0x60, 0xd4, 0xf0, 0x03, 0x2f, 0xf4, 0xd0, 0x1a, 0x9b, 0x6d, + 0x44, 0xb3, 0x8d, 0xe1, 0xdd, 0xca, 0x46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+ 0x2f, 0x92, 0xcb, 0xb6, 0x8c, 0x9b, 0xd6, 0xc7, 0xaf, 0xfe, 0x59, 0x9d, 0x7b, 0xf5, 0xba, 0xaa, + 0x7d, 0xfb, 0xba, 0xaa, 0xfd, 0xe3, 0x75, 0x55, 0xfb, 0xcd, 0x9b, 0xea, 0xdc, 0xb7, 0x6f, 0xaa, + 0x73, 0x7f, 0x79, 0x53, 0x9d, 0xfb, 0xec, 0x4e, 0xac, 0xd0, 0x31, 0xa8, 0x6d, 0x97, 0x84, 0x2f, + 0xbc, 0xe0, 0x40, 0xe0, 0x0e, 0xef, 0x35, 0x0f, 0xc7, 0xe0, 0xbc, 0xec, 0x75, 0x0a, 0xfc, 0x7f, + 0x41, 0x1f, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x92, 0x47, 0xd1, 0xd0, 0xd2, 0x1a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1269,6 +1364,8 @@ type QueryClient interface { // with its address and borrowed/liquidation/collateral USD values, as well as its // actual token positions in human-readable symbol denoms instead of uTokens or ibc denoms. Inspect(ctx context.Context, in *QueryInspect, opts ...grpc.CallOption) (*QueryInspectResponse, error) + // InspectAccount runs the inspect query on a single address + InspectAccount(ctx context.Context, in *QueryInspectAccount, opts ...grpc.CallOption) (*QueryInspectAccountResponse, error) } type queryClient struct { @@ -1378,6 +1475,15 @@ func (c *queryClient) Inspect(ctx context.Context, in *QueryInspect, opts ...grp return out, nil } +func (c *queryClient) InspectAccount(ctx context.Context, in *QueryInspectAccount, opts ...grpc.CallOption) (*QueryInspectAccountResponse, error) { + out := new(QueryInspectAccountResponse) + err := c.cc.Invoke(ctx, "/umee.leverage.v1.Query/InspectAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Params queries the parameters of the x/leverage module. @@ -1407,6 +1513,8 @@ type QueryServer interface { // with its address and borrowed/liquidation/collateral USD values, as well as its // actual token positions in human-readable symbol denoms instead of uTokens or ibc denoms. Inspect(context.Context, *QueryInspect) (*QueryInspectResponse, error) + // InspectAccount runs the inspect query on a single address + InspectAccount(context.Context, *QueryInspectAccount) (*QueryInspectAccountResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1446,6 +1554,9 @@ func (*UnimplementedQueryServer) MaxBorrow(ctx context.Context, req *QueryMaxBor func (*UnimplementedQueryServer) Inspect(ctx context.Context, req *QueryInspect) (*QueryInspectResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Inspect not implemented") } +func (*UnimplementedQueryServer) InspectAccount(ctx context.Context, req *QueryInspectAccount) (*QueryInspectAccountResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method InspectAccount not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1649,6 +1760,24 @@ func _Query_Inspect_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_InspectAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryInspectAccount) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).InspectAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/umee.leverage.v1.Query/InspectAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).InspectAccount(ctx, req.(*QueryInspectAccount)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "umee.leverage.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1697,6 +1826,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Inspect", Handler: _Query_Inspect_Handler, }, + { + MethodName: "InspectAccount", + Handler: _Query_InspectAccount_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "umee/leverage/v1/query.proto", @@ -2293,6 +2426,36 @@ func (m *QueryAccountSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l + { + size := m.SpotBorrowedValue.Size() + i -= size + if _, err := m.SpotBorrowedValue.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.SpotCollateralValue.Size() + i -= size + if _, err := m.SpotCollateralValue.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.SpotSuppliedValue.Size() + i -= size + if _, err := m.SpotSuppliedValue.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 if m.LiquidationThreshold != nil { { size := m.LiquidationThreshold.Size() @@ -2679,6 +2842,36 @@ func (m *QueryInspect) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryInspectAccount) 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 *QueryInspectAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryInspectAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryInspectResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2716,6 +2909,39 @@ func (m *QueryInspectResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryInspectAccountResponse) 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 *QueryInspectAccountResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryInspectAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Borrower.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 *InspectAccount) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2736,6 +2962,13 @@ func (m *InspectAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Info) > 0 { + i -= len(m.Info) + copy(dAtA[i:], m.Info) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Info))) + i-- + dAtA[i] = 0x22 + } if m.Position != nil { { size, err := m.Position.MarshalToSizedBuffer(dAtA[:i]) @@ -3091,6 +3324,12 @@ func (m *QueryAccountSummaryResponse) Size() (n int) { l = m.LiquidationThreshold.Size() n += 1 + l + sovQuery(uint64(l)) } + l = m.SpotSuppliedValue.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.SpotCollateralValue.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.SpotBorrowedValue.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -3237,6 +3476,19 @@ func (m *QueryInspect) Size() (n int) { return n } +func (m *QueryInspectAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryInspectResponse) Size() (n int) { if m == nil { return 0 @@ -3252,6 +3504,17 @@ func (m *QueryInspectResponse) Size() (n int) { return n } +func (m *QueryInspectAccountResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Borrower.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *InspectAccount) Size() (n int) { if m == nil { return 0 @@ -3270,6 +3533,10 @@ func (m *InspectAccount) Size() (n int) { l = m.Position.Size() n += 1 + l + sovQuery(uint64(l)) } + l = len(m.Info) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -5097,6 +5364,108 @@ func (m *QueryAccountSummaryResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotSuppliedValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpotSuppliedValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotCollateralValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpotCollateralValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpotBorrowedValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpotBorrowedValue.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5940,6 +6309,88 @@ func (m *QueryInspect) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryInspectAccount) 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: QueryInspectAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInspectAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + 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 *QueryInspectResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6024,6 +6475,89 @@ func (m *QueryInspectResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryInspectAccountResponse) 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: QueryInspectAccountResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryInspectAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Borrower", 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 + } + if err := m.Borrower.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 *InspectAccount) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6157,6 +6691,38 @@ func (m *InspectAccount) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Info = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/leverage/types/query.pb.gw.go b/x/leverage/types/query.pb.gw.go index fbd8829b8c..4d4d6a5591 100644 --- a/x/leverage/types/query.pb.gw.go +++ b/x/leverage/types/query.pb.gw.go @@ -375,6 +375,42 @@ func local_request_Query_Inspect_0(ctx context.Context, marshaler runtime.Marsha } +var ( + filter_Query_InspectAccount_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_InspectAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryInspectAccount + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_InspectAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.InspectAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_InspectAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryInspectAccount + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_InspectAccount_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.InspectAccount(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -634,6 +670,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_InspectAccount_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_InspectAccount_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_InspectAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -895,6 +954,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_InspectAccount_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_InspectAccount_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_InspectAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -920,6 +999,8 @@ var ( pattern_Query_MaxBorrow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "max_borrow"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Inspect_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "inspect"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_InspectAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"umee", "leverage", "v1", "inspect-account"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -944,4 +1025,6 @@ var ( forward_Query_MaxBorrow_0 = runtime.ForwardResponseMessage forward_Query_Inspect_0 = runtime.ForwardResponseMessage + + forward_Query_InspectAccount_0 = runtime.ForwardResponseMessage )