diff --git a/CHANGELOG.md b/CHANGELOG.md index a4f2e97735..16b35b52d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Fixes + +- [1800](https://github.com/umee-network/umee/pull/1800) Handle non-capitalized assets when calling the historacle data. + +## [v4.0.0](https://github.com/umee-network/umee/releases/tag/v4.0.0) - 2023-01-20 + ### API Breaking - [1683](https://github.com/umee-network/umee/pull/1683) MaxWithdraw query now returns `sdk.Coins`, not `sdk.Coin` and will be empty (not zero coin) when returning a zero amount. Denom field in query is now optional. diff --git a/proto/umee/leverage/v1/query.proto b/proto/umee/leverage/v1/query.proto index f9516fb96b..ae6e4b1cf9 100644 --- a/proto/umee/leverage/v1/query.proto +++ b/proto/umee/leverage/v1/query.proto @@ -187,6 +187,7 @@ message QueryMarketSummaryResponse { (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = true ]; + string errors = 20; } // QueryAccountBalances defines the request structure for the AccountBalances gRPC service handler. diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index c9e43fcc08..cc07b38a01 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -454,6 +454,8 @@ paths: price is used if required medians is zero. Price is nil when the oracle is down or insufficient historic medians are available. + errors: + type: string description: >- QueryMarketSummaryResponse defines the response structure for the MarketSummary gRPC service handler. @@ -2228,6 +2230,8 @@ definitions: the leverage registry. Current price is used if required medians is zero. Price is nil when the oracle is down or insufficient historic medians are available. + errors: + type: string description: >- QueryMarketSummaryResponse defines the response structure for the MarketSummary gRPC service handler. diff --git a/x/leverage/keeper/grpc_query.go b/x/leverage/keeper/grpc_query.go index 65c3c77326..e3c9ae7936 100644 --- a/x/leverage/keeper/grpc_query.go +++ b/x/leverage/keeper/grpc_query.go @@ -135,11 +135,17 @@ func (q Querier) MarketSummary( } // Oracle prices in response will be nil if it is unavailable - if oraclePrice, _, oracleErr := q.Keeper.TokenPrice(ctx, req.Denom, types.PriceModeSpot); oracleErr == nil { + oraclePrice, _, oracleErr := q.Keeper.TokenPrice(ctx, req.Denom, types.PriceModeSpot) + if oracleErr == nil { resp.OraclePrice = &oraclePrice + } else { + resp.Errors += oracleErr.Error() } - if historicPrice, _, historicErr := q.Keeper.TokenPrice(ctx, req.Denom, types.PriceModeHistoric); historicErr == nil { + historicPrice, _, historicErr := q.Keeper.TokenPrice(ctx, req.Denom, types.PriceModeHistoric) + if historicErr == nil { resp.OracleHistoricPrice = &historicPrice + } else { + resp.Errors += historicErr.Error() } return &resp, nil diff --git a/x/leverage/keeper/oracle.go b/x/leverage/keeper/oracle.go index f30f24352d..7576beb8cc 100644 --- a/x/leverage/keeper/oracle.go +++ b/x/leverage/keeper/oracle.go @@ -1,6 +1,8 @@ package keeper import ( + "strings" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -40,7 +42,7 @@ func (k Keeper) TokenPrice(ctx sdk.Context, baseDenom string, mode types.PriceMo // historic price is required for modes other than spot var numStamps uint32 historicPrice, numStamps, err = k.oracleKeeper.MedianOfHistoricMedians( - ctx, t.SymbolDenom, uint64(t.HistoricMedians)) + ctx, strings.ToUpper(t.SymbolDenom), uint64(t.HistoricMedians)) if err != nil { return sdk.ZeroDec(), t.Exponent, sdkerrors.Wrap(err, "oracle") } diff --git a/x/leverage/keeper/oracle_test.go b/x/leverage/keeper/oracle_test.go index 73ee66c8be..892bcfb2e3 100644 --- a/x/leverage/keeper/oracle_test.go +++ b/x/leverage/keeper/oracle_test.go @@ -2,6 +2,7 @@ package keeper_test import ( "fmt" + "strings" sdk "github.com/cosmos/cosmos-sdk/types" @@ -154,6 +155,12 @@ func (s *IntegrationTestSuite) TestOracle_TokenPrice() { require.NoError(err) require.Equal(sdk.MustNewDecFromStr("0.50"), p) require.Equal(uint32(6), e) + + // Lowercase must be converted to uppercase symbol denom ("DUMP" from "dump") + p, e, err = app.LeverageKeeper.TokenPrice(ctx, strings.ToLower(dumpDenom), types.PriceModeLow) + require.NoError(err) + require.Equal(sdk.MustNewDecFromStr("0.50"), p) + require.Equal(uint32(6), e) } func (s *IntegrationTestSuite) TestOracle_TokenValue() { @@ -220,6 +227,11 @@ func (s *IntegrationTestSuite) TestOracle_TokenValue() { v, err = app.LeverageKeeper.TokenValue(ctx, coin(pumpDenom, 2_400000), types.PriceModeLow) require.NoError(err) require.Equal(sdk.MustNewDecFromStr("2.4"), v) + + // lowercase 2.4 PUMP * $1.00 + v, err = app.LeverageKeeper.TokenValue(ctx, coin(strings.ToLower(pumpDenom), 2_400000), types.PriceModeLow) + require.NoError(err) + require.Equal(sdk.MustNewDecFromStr("2.4"), v) } func (s *IntegrationTestSuite) TestOracle_TotalTokenValue() { diff --git a/x/leverage/types/query.pb.go b/x/leverage/types/query.pb.go index de398fc371..14a47f62fb 100644 --- a/x/leverage/types/query.pb.go +++ b/x/leverage/types/query.pb.go @@ -263,6 +263,7 @@ type QueryMarketSummaryResponse struct { AvailableCollateralize github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,18,opt,name=available_collateralize,json=availableCollateralize,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"available_collateralize"` // Oracle Historic Price is the historic USD value of a token. Historic price is defined as the median of the last N historic median prices from the oracle module, with N being this token's HistoricMedians in the leverage registry. Current price is used if required medians is zero. Price is nil when the oracle is down or insufficient historic medians are available. OracleHistoricPrice *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,19,opt,name=oracle_historic_price,json=oracleHistoricPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"oracle_historic_price,omitempty"` + Errors string `protobuf:"bytes,20,opt,name=errors,proto3" json:"errors,omitempty"` } func (m *QueryMarketSummaryResponse) Reset() { *m = QueryMarketSummaryResponse{} } @@ -805,97 +806,98 @@ func init() { func init() { proto.RegisterFile("umee/leverage/v1/query.proto", fileDescriptor_1e8137dcabb0ccc7) } var fileDescriptor_1e8137dcabb0ccc7 = []byte{ - // 1425 bytes of a gzipped FileDescriptorProto + // 1442 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x98, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0xb3, 0x49, 0x9b, 0xc4, 0xcf, 0x71, 0x92, 0x4e, 0xd3, 0x66, 0xeb, 0xa6, 0xb6, 0xbb, - 0x6d, 0xda, 0xb4, 0x10, 0x6f, 0x53, 0x10, 0x12, 0x02, 0x09, 0xea, 0x16, 0x04, 0x28, 0xad, 0x52, - 0xb7, 0x05, 0xb5, 0x15, 0xb2, 0xc6, 0xbb, 0x23, 0x67, 0x95, 0xfd, 0xe1, 0xee, 0xae, 0x1d, 0x1b, - 0xa9, 0x17, 0x24, 0x8e, 0x48, 0x20, 0xc4, 0x81, 0x23, 0x57, 0xfe, 0x92, 0x1c, 0x2b, 0x71, 0x41, - 0x48, 0x04, 0x68, 0x2b, 0x0e, 0xfd, 0x07, 0xb8, 0xa2, 0x9d, 0x5f, 0xbb, 0xf1, 0xc6, 0x8d, 0xb3, - 0x22, 0xa7, 0x78, 0x77, 0xde, 0xfb, 0xbc, 0xef, 0xbc, 0x99, 0x7d, 0xf3, 0x26, 0xb0, 0xd4, 0x71, - 0x08, 0xd1, 0x6d, 0xd2, 0x25, 0x3e, 0x6e, 0x11, 0xbd, 0xbb, 0xa6, 0x3f, 0xe9, 0x10, 0xbf, 0x5f, - 0x6d, 0xfb, 0x5e, 0xe8, 0xa1, 0xf9, 0x68, 0xb4, 0x2a, 0x46, 0xab, 0xdd, 0xb5, 0xe2, 0x52, 0xcb, - 0xf3, 0x5a, 0x36, 0xd1, 0x71, 0xdb, 0xd2, 0xb1, 0xeb, 0x7a, 0x21, 0x0e, 0x2d, 0xcf, 0x0d, 0x98, - 0x7d, 0xb1, 0x94, 0xa2, 0xb5, 0x88, 0x4b, 0x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 0x58, 0x16, 0x6d, + 0xfb, 0x61, 0x15, 0xbb, 0xd8, 0xb7, 0x48, 0x80, 0x74, 0x98, 0xc2, 0xb6, 0xcd, 0x48, 0x10, 0xc8, + 0x2b, 0x27, 0x1e, 0x1a, 0xbf, 0x8c, 0xc3, 0xf2, 0x41, 0x2e, 0xea, 0xca, 0x6a, 0x26, 0x8a, 0x9d, + 0xb8, 0x38, 0xcf, 0x54, 0x84, 0xd0, 0x4a, 0xd4, 0x03, 0x54, 0x64, 0x0f, 0x50, 0xb9, 0x49, 0x1d, + 0xbf, 0x7a, 0x2d, 0xca, 0xe1, 0x0f, 0xbf, 0x96, 0x56, 0x47, 0x58, 0x5c, 0xe4, 0x10, 0x24, 0x2a, + 0xe1, 0xf6, 0xbe, 0xea, 0x35, 0xfe, 0xef, 0x87, 0x4a, 0x96, 0xb6, 0x66, 0xa2, 0xb4, 0x4d, 0x1c, + 0xc1, 0xaa, 0x62, 0xb8, 0x61, 0xca, 0x06, 0x48, 0xa6, 0x37, 0xee, 0x1e, 0x86, 0x6f, 0xc8, 0xde, + 0x04, 0x9c, 0x3d, 0xc0, 0x43, 0xed, 0xc7, 0x03, 0x98, 0x8b, 0x53, 0x56, 0xef, 0x60, 0xb7, 0x4d, + 0x04, 0xe0, 0x50, 0xc7, 0x37, 0x3a, 0x57, 0xf9, 0x98, 0xf2, 0x71, 0x04, 0x89, 0x5e, 0xec, 0x7e, + 0x7a, 0x24, 0x78, 0x3c, 0x13, 0x78, 0xbe, 0xcf, 0x11, 0xe8, 0x07, 0x30, 0x17, 0xa7, 0x43, 0x82, + 0x27, 0xb2, 0x29, 0x8e, 0x29, 0x02, 0x7b, 0x17, 0x66, 0xe5, 0xf5, 0xec, 0x3a, 0x9e, 0x13, 0xca, + 0x8e, 0xe5, 0xb0, 0xd0, 0x9c, 0x60, 0x6c, 0x44, 0x08, 0x64, 0xc1, 0x29, 0x51, 0x98, 0x79, 0x27, + 0x5d, 0x0f, 0xb7, 0x18, 0x09, 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0xb6, 0xeb, + 0x36, 0x0f, 0xf7, 0x85, 0x06, 0xb9, 0x64, 0x71, 0x37, 0x86, 0x1e, 0x59, 0x65, 0x53, 0xb8, 0xfa, + 0x7a, 0x1b, 0x25, 0xe2, 0x12, 0x17, 0x51, 0x46, 0xc5, 0x83, 0x0e, 0x75, 0x57, 0xf5, 0xfd, 0xe8, + 0x29, 0xcc, 0xf4, 0xcb, 0x66, 0x79, 0x78, 0x00, 0x61, 0x51, 0x58, 0x7d, 0x9d, 0x85, 0x12, 0x70, + 0x91, 0x0b, 0x28, 0xa2, 0xe5, 0x83, 0x05, 0x88, 0x76, 0xa0, 0x7a, 0x67, 0xf7, 0xf7, 0xe2, 0xd8, + 0xee, 0xf3, 0xa2, 0xf6, 0xec, 0x79, 0x51, 0xfb, 0xed, 0x79, 0x51, 0xfb, 0xea, 0x45, 0x71, 0xec, + 0xd9, 0x8b, 0xe2, 0xd8, 0x4f, 0x2f, 0x8a, 0x63, 0x8f, 0xae, 0x25, 0x2a, 0x69, 0x44, 0x59, 0xf3, + 0x49, 0xb8, 0x43, 0xd9, 0xb6, 0x40, 0x76, 0xfe, 0x6f, 0x76, 0xfb, 0x5c, 0x5e, 0x57, 0x1b, 0x93, + 0xfc, 0xbf, 0x63, 0xff, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0x2b, 0xa0, 0xd2, 0xea, 0xe4, 0x13, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1450,6 +1452,15 @@ func (m *QueryMarketSummaryResponse) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + if len(m.Errors) > 0 { + i -= len(m.Errors) + copy(dAtA[i:], m.Errors) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Errors))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } if m.OracleHistoricPrice != nil { { size := m.OracleHistoricPrice.Size() @@ -2241,6 +2252,10 @@ func (m *QueryMarketSummaryResponse) Size() (n int) { l = m.OracleHistoricPrice.Size() n += 2 + l + sovQuery(uint64(l)) } + l = len(m.Errors) + if l > 0 { + n += 2 + l + sovQuery(uint64(l)) + } return n } @@ -3451,6 +3466,38 @@ func (m *QueryMarketSummaryResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Errors", 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.Errors = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:])